Skip to main content

Work with environment markers (PEP-496)

Project description

travis appveyor MIT License

Work with environment markers (PEP-496).


Install from PyPI:

python3 -m pip install --user dephell_markers


from dephell_markers import Markers

m = Markers('os_name == "posix" and python_version >= "2.7"')

# '>=2.7'

# 'posix'

Markers('python_version >= "2.4" or python_version <= "2.7"').get_version(name='python_version')
'<=2.7 || >=2.4'

Markers('python_version >= "2.4" or python_version <= "2.7"').python_version
# RangeSpecifier(<=2.7 || >=2.4)

# Nothing better than lie:
Markers('python_version == "2.4" or os_name == "linux"').get_version(name='python_version')
# None

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dephell-markers, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size dephell_markers-1.0.3-py3-none-any.whl (11.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size dephell_markers-1.0.3.tar.gz (10.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page