针对不同环境(如开发、生产或登台)的Python基础部署技术/包库

时间:2023-01-13 21:00:25

I am familiar with environment settings for Node.js using npm packages like "settings". This package allowed me to import different environment settings based on what the NODE_ENV variable is set to.

熟悉Node的环境设置。js使用npm包,如“设置”。这个包允许我根据NODE_ENV变量的设置导入不同的环境设置。

I've been searching for something similar for python but most of the environments settings tutorial is catered towards python developed on Django framework.

我一直在寻找类似于python的东西,但大多数环境设置教程都是针对Django框架开发的python的。

The only one that I found close to what I want is https://pypi.python.org/pypi/yconf

我找到的唯一接近我想要的是https://pypi.python.org/pypi/yconf。

However the config settings for different environment should not be limited to just development, production and staging. Was wondering if anyone can suggest similar alternatives or maybe even argue whether using Django framework is relevant in my case.

但是,不同环境的配置设置不应该仅仅局限于开发、生产和阶段。我想知道是否有人能提出类似的替代方案,或者甚至争论使用Django框架是否与我的情况相关。

1 个解决方案

#1


1  

I think virtualenv is what you needed. Click here for more info.

我认为艺术是你所需要的。点击这里获取更多信息。

#1


1  

I think virtualenv is what you needed. Click here for more info.

我认为艺术是你所需要的。点击这里获取更多信息。