轻松管理requirements.txt文件!

yippee的Python项目详细描述


伊佩

管理Requirements.txt文件

使用requirements.txt文件很难区分顶级依赖项和临时依赖项。此外,为多个环境分离不同的依赖关系也是一项挑战。yippee试图通过指定生成requirements.txt文件的dsl来减轻痛苦。

例如,使用以下yippee.py文件:

fromyippeeimportgroup,pippip("django",">=2.1.0")withgroup("production"):pip("postgres","2.2.2")withgroup("development"):pip("black")

这将生成:

requirements.txt

Django==2.1.5
pytz==2018.7

requirements-production.txt

-r requirements.txt
postgres==2.2.2
psycopg2-binary==2.7.6.1

以及

requirements-development.txt

-r requirements.txt
appdirs==1.4.3
attrs==18.2.0
black==18.9b0
Click==7.0
toml==0.10.0

用法

通过pypi安装yippee。然后可以运行yippee来生成requirements.txt文件。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java关闭应用程序按钮Listener   Java中的多线程同步在Java示例中的思考   java如何查看Tomcat正在使用/访问的JAR?   java My代码在调用垃圾收集器后不会终止   多线程Java连接线程池和connectionfactory?   java在运行时修改JAR文件   java Android:使用光标时引发IllegaleException   在Netbeans中测试不可执行库的java?   泛型在参数上强制子类Java类型   spring Java:继承与依赖注入“自动连线”   javascript如何解析这个xml元素   java打印特定序列中的数组   带有ProcessingTimeSessionWindow的java Apache Flink自定义触发器   java如何配置消息驱动的Bean应用程序和Glassfish来使用来自远程MessageBroker的消息?