Dysco在Python中提供了可配置的动态作用域行为。
dysco的Python项目详细描述
Python中的Dysco动态范围界定
![Tweet](https://warehouse-camo.ingress.cmh1.psfhosted.org/ba1b66fba3a2972dc171052e0fa280bf18a10b84/68747470733a2f2f73696d706c657368617265627574746f6e732e636f6d2f696d616765732f736f6d6163726f2f747769747465722e706e67)
![Share on Facebook](https://warehouse-camo.ingress.cmh1.psfhosted.org/29d308045fd3a52156dd5eed158e1b226a8c12c2/68747470733a2f2f73696d706c657368617265627574746f6e732e636f6d2f696d616765732f736f6d6163726f2f66616365626f6f6b2e706e67)
![Share on Reddit](https://warehouse-camo.ingress.cmh1.psfhosted.org/ca9cae7e160a33ec2cb88c6128439f23505de529/68747470733a2f2f73696d706c657368617265627574746f6e732e636f6d2f696d616765732f736f6d6163726f2f7265646469742e706e67)
在
align=“left”>Installation| Development| Contributing
Dysco is a lightweight Python library that brings dynamic scoping capabilities to Python in a highly configurable way.
安装
可以使用pip
或任何兼容的Python包管理器从pypy安装Dysco。在
# Installation with pip. pip install dysco # Or, installation with poetry. poetry add dysco
发展
要在本地安装依赖项,需要安装poetry。 然后你就可以跑了
^{pr2}$安装项目依赖项。在
该库是针对python3.7和3.8版本进行测试的。 使用pyenv和以下命令最容易安装它们。在
# Install the supported Python versions. pyenv install --skip-existing 3.7.5 pyenv install --skip-existing 3.8.0
然后可以通过tox运行测试、linting和文档生成。
bare tox
命令将运行所有环境中的所有内容,也可以按Python版本和任务对其进行分解。
例如,可以通过运行以下命令手动运行单个Python3.8任务。在
# Install the project dependencies in `.tox/py38/`. tox -e py38-init # Run black, flake8, isort, and mypy. tox -e py38-lint # Run the tests and generate a coverage report. tox -e py38-test --coverage ## Build the project documentation. tox -e py38-docs
部署
您首先需要用诗歌配置您的凭证。在
poetry config http-basic.pypi intoli <pypi-password>
然后可以使用invoke来转换版本号、提交更改、标记版本并部署到pypi。在
# Bumps the patch version and deploys the package.# Valid options are major, minor, and patch. invoke bump patch
贡献
欢迎投稿,但请遵循CONTRIBUTING.md中列出的投稿人指南。在
许可证
出埃及记是根据BSD 2-Clause License授权的,版权是Intoli, LLC。在
- 项目
标签: