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.2.tar.gz
(9.5 kB
view details)
Built Distribution
File details
Details for the file dephell-pythons-0.1.2.tar.gz
.
File metadata
- Download URL: dephell-pythons-0.1.2.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 | 337fffbe82ef512f5461f9499efd89679f448c96ad07d15d0f69f1ba3181be49 |
|
MD5 | caaa6b7306e003617716642432bb4ddd |
|
BLAKE2b-256 | fa6117ca859c0425ce6b18f56fbcf9364aa136a8707656e8828b18c9c537cad7 |
File details
Details for the file dephell_pythons-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: dephell_pythons-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.3 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 | d156507575d5582e0beb0473fb7ab8386db9c7c0fe12c28578fb1d961bac2ad9 |
|
MD5 | 3015a2305aa911b255a15cd3528d47a9 |
|
BLAKE2b-256 | 99e4f00c289bc5fefcc3ca2a82ace5e1900d4156173eb9c166fd0bb7ae939191 |