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.9.tar.gz
(9.7 kB
view details)
Built Distribution
File details
Details for the file dephell_pythons-0.1.9.tar.gz
.
File metadata
- Download URL: dephell_pythons-0.1.9.tar.gz
- Upload date:
- Size: 9.7 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 | 92619d23832778c8d57ef1213b1d613d250f312e342fc8eafbd84909c1aea02c |
|
MD5 | b64c7a5cba5b54baca7dfab139b19336 |
|
BLAKE2b-256 | aac809623e05a0416e1fa0caa85e187f7efbf4c69686995d9e03c2de5f97708a |
File details
Details for the file dephell_pythons-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: dephell_pythons-0.1.9-py3-none-any.whl
- Upload date:
- Size: 13.4 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 | 922869d83ceb1386d7afd9763bfbb09a035cbf0b4ac1174f59667d16e0553316 |
|
MD5 | df687509cace12aedcfbf8afffbd5465 |
|
BLAKE2b-256 | 3bcbdf393f8df7cd663d4fa45a7ffc892d34dffb5543660df2a73ba69532bcde |