Skip to content

bagof

bagof is a namespace package that houses miscellaneous tools that I found useful when implementing python packages.

The core idea behind this project is that each "bag" can be installed on its own, and with a minimal set of dependencies (none when possible, other bags when useful, well-known external packages only if necessary).

Another important point is to ensure compatibility with (some) older versions of python, even if they have reached end of life. Python has a 5-year support policy for each version (2 years of bug fixes + 3 years of security updates), which is quite short compared to most research projects. While updating python is preferred for security reasons, it is sometimes not possible, and I would like these users to benefit from up-to-date versions of my tools nonetheless. Most bags will support the same range of python versions as the most recent version of typing_extensions, although some will support older versions (when possible) and others only newer ones (when required).

List of public bags

Module Description
hints Reusable typing hints
validators Hint-based runtime validators
converters Hint-based runtime converters
factories Hint-based runtime factories
magic Dataclass-like structures built on hint-based magic
paths One pathlib-style API for local and cloud paths
dispatchers Multiple dispatch driven by type hints

List of private bags

These packages contain internal utilities and should not be relied upon by most users.

Module Description
core-magic Core tools used by the magic converters, validators, factories, etc