Usage

To use python_active_versions in a python project:

1from python_active_versions.python_active_versions import get_active_python_versions
2_only_python_dict = get_active_python_versions()
3_dict_with_docker = get_active_python_versions(docker_images=True)
4_dict_printing_debug_logs =  get_active_python_versions(log_level='DEBUG')

This library can be used in combination with nox, to run sessions on current active python versions:

1from python_active_versions.python_active_versions import get_active_python_versions
2from typing import List
3
4def _get_active_version(_active_versions: List[dict]) -> List[str]:
5    return [_av['version'] for _av in _active_versions]
6
7@nox.session(python=_get_active_version(get_active_python_versions()))
8def test_something(session):
9    ...

Otherwise it’s possible to call it directly as CLI:

1$ python-active-versions --help
2$ python-active-versions -m -l WARNING

Or it can be used also from its docker image:

1$ docker run --rm -it gpongelli/python-active-versions:1.10.0 --help