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.6.tar.gz
(9.5 kB
view details)
Built Distribution
File details
Details for the file dephell_pythons-0.1.6.tar.gz
.
File metadata
- Download URL: dephell_pythons-0.1.6.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38fe4af4050b64bdd631d8fd22ab38d8bf6adbc7a866ac94f66ce3cf3a5df455 |
|
MD5 | 420e5872100d7affcb9dc7e9c4eca852 |
|
BLAKE2b-256 | 69c4b3410e2f9c60f23e5f6ad934b73e47d8a1fc45e1091e9078f55d5c3994af |
File details
Details for the file dephell_pythons-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: dephell_pythons-0.1.6-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ca66fb33bad282f69f0148ce424fa802e35826b5dc29e1e9ef0ba72345a9b12 |
|
MD5 | 5e714e8241a8d2ab1168b609534115ba |
|
BLAKE2b-256 | 6bed61877f1b8a25cb83300617a7afcf5dba5b80663153a1e655a4afe730b5ef |