Work with python versions
Project description
Work with python versions.
Installation
Install from PyPI:
python3 -m pip install --user dephell_pythons
Usage
from dephell_pythons import Pythons
pythons = Pythons()
# get current:
python = pythons.get_best()
# properties:
python.name # 'python3.7'
python.path # Path('/usr/local/bin/python3.7')
python.version # <Version('3.7.0')>
python.lib_paths
# [Path('/usr/local/lib/python37.zip'), Path('/usr/local/lib/python3.7'), ...]
python.lib_path
# Path('/home/gram/.local/lib/python3.7/site-packages')
# get by version
pythons.get_best('3.5').version
# <Version('3.5.2')>
# get by name
pythons.get_best('python3').version
# <Version('3.6.7')>
# get by specifier
pythons.get_best('<3.7').version
# <Version('3.6.7')>
# get by path
pythons.get_best('/usr/bin/python3.6').version
# <Version('3.6.7')>
# get all
list(pythons)
# [Python(...), Python(...), ...]
# work not only with installed pythons:
Pythons(abstract=True).get_best('>=2.8,<3.5').version
# <Version('3.4')>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dephell_pythons-0.1.14.tar.gz
(11.5 kB
view details)
Built Distribution
File details
Details for the file dephell_pythons-0.1.14.tar.gz
.
File metadata
- Download URL: dephell_pythons-0.1.14.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2da1ba905084f0935392be6e1fee019b98f45439429e45278a181174cff93a9 |
|
MD5 | 2a99e6796525eb5b68cd376679b510ea |
|
BLAKE2b-256 | 1215dd4f22251151ca6c9dcae29c9d3d85c2edf50df7fa472488262ea7d1166e |
File details
Details for the file dephell_pythons-0.1.14-py3-none-any.whl
.
File metadata
- Download URL: dephell_pythons-0.1.14-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2789b495b1d77e435cf4964a0b3f82698b98321cceaa67c4ec6836f3762fc5e2 |
|
MD5 | b9cc792235119f3e892f04e731e7d277 |
|
BLAKE2b-256 | 157aee10a6ee6c791d5912b20b9d907b7da14ffcf24355f35007a0522decc48b |