https://github.com/intoli/dysco
Configurable dynamic scoping for python.
https://github.com/intoli/dysco
dynamic-scope python python3 python36 python37 python38
Last synced: about 2 months ago
JSON representation
Configurable dynamic scoping for python.
- Host: GitHub
- URL: https://github.com/intoli/dysco
- Owner: intoli
- License: other
- Created: 2019-11-09T21:37:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-19T02:47:52.000Z (over 5 years ago)
- Last Synced: 2025-02-13T20:49:20.089Z (4 months ago)
- Topics: dynamic-scope, python, python3, python36, python37, python38
- Language: Python
- Size: 480 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README

Dysco - Dynamic Scoping in Python
![]()
![]()
![]()
![]()
###### [Installation](#installation) | [Development](#development) | [Contributing](#contributing)
> Dysco is a lightweight Python library that brings [dynamic scoping](https://en.wikipedia.org/wiki/Scope_(computer_science)#Dynamic_scoping) capabilities to Python in a highly configurable way.
## Installation
Dysco can be installed from [pypy](https://pypi.org/project/dysco/) using `pip` or any compatible Python package manager.
```bash
# Installation with pip.
pip install dysco# Or, installation with poetry.
poetry add dysco
```## Development
To install the dependencies locally, you need [poetry](https://poetry.eustace.io/docs/#installation) to be installed.
You can then run```bash
# This is only required if you're not using poetry v1.0.0 or greater.
# It tells poetry to place the virtual environment in `.venv`.
poetry config settings.virtualenvs.in-project true# Install all of the dependencies.
poetry install
```to install the project dependencies.
The library is tested against Python versions 3.7 and 3.8.
These are most easily installed using [pyenv](https://github.com/pyenv/pyenv#installation) with the following command.```bash
# Install the supported Python versions.
pyenv install --skip-existing 3.7.5
pyenv install --skip-existing 3.8.0
```Testing, linting, and document generation can then be run via [tox](https://tox.readthedocs.io/en/latest/).
The bare `tox` command will run everything in all environments, or you can break it down by Python version and task.
For example, you could run the individual Python 3.8 tasks manually by running the following.```bash
# 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
```## Deployment
You first need to configure your credentials with poetry.
```bash
poetry config http-basic.pypi intoli
```You can then use invoke to bump the version number, commit the changes, tag the version, and deploy to pypi.
```bash
# Bumps the patch version and deploys the package.
# Valid options are major, minor, and patch.
invoke bump patch
```## Contributing
Contributions are welcome, but please follow these contributor guidelines outlined in [CONTRIBUTING.md](CONTRIBUTING.md).
## License
Exodus is licensed under a [BSD 2-Clause License](LICENSE.md) and is copyright [Intoli, LLC](https://intoli.com).