Gamma Pytools
raw JSON → 3.0.2 verified Mon Apr 27 auth: no python
A collection of Python extensions and tools used in BCG GAMMA's open-source libraries. Current version 3.0.2, with support for Python >=3.10 and <4a. Released under MIT license. Maintenance and feature updates with monthly releases.
pip install gamma-pytools Common errors
error ImportError: No module named 'pytools' ↓
cause The package is installed under the name 'gamma-pytools', but the import is 'pytools'.
fix
Run
pip install gamma-pytools and then use import pytools. error ModuleNotFoundError: No module named 'gamma_pytools' ↓
cause Trying to import the package using its PyPI name with underscores.
fix
Use
import pytools instead. Warnings
breaking Version 3.0.0 introduced breaking API changes: methods like `to_list()` and `to_se` were renamed. ↓
fix Update your code to use the new method names. See the release notes for details.
breaking Python 3.10 minimum requirement. Older Python versions (3.9 and below) are no longer supported. ↓
fix Upgrade to Python 3.10 or higher.
deprecated Some functions in `pytools.api` module may be deprecated in future releases. ↓
fix Check the documentation for alternatives.
gotcha The package is named `gamma-pytools` on PyPI, but imports use `pytools`. Do not use `import gamma-pytools`. ↓
fix Always use `import pytools`.
Imports
- Pytools wrong
import Pytoolscorrectfrom pytools import Pytools
Quickstart
from pytools import Pytools, Api
# Initialize with optional API token for advanced features
pt = Pytools(api_token=os.environ.get('PYTOOLS_API_TOKEN', ''))
print(pt.__version__)