Skip to main content

Work with python versions

Project description

travis appveyor MIT License

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


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.11.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

dephell_pythons-0.1.11-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file dephell_pythons-0.1.11.tar.gz.

File metadata

  • Download URL: dephell_pythons-0.1.11.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for dephell_pythons-0.1.11.tar.gz
Algorithm Hash digest
SHA256 300d9b73ec8d7537b672fe7a1c8df2cf1ae812e8d3bac1b099fb724816a295d6
MD5 4b4daa999390ff6d35e563a334a8ec95
BLAKE2b-256 db347c05db9507c96f908e705d6e0db0cdb181b9739d764f82abc7afa62885bc

See more details on using hashes here.

File details

Details for the file dephell_pythons-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: dephell_pythons-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for dephell_pythons-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 badf2bf315e68b4fc38d87ed692f3fae196652df4e3ae9f22a478e8a4a32140e
MD5 5025944d8fd1a08b171728fb8820de6e
BLAKE2b-256 c385e11c31d98948c8b33f5d94a9cf1c437c23381f8043178898bb9b32f25cbb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page