Skip to main content

Work with environment markers (PEP-496)

Project description

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.

Filename, size & hash SHA256 hash help File type Python version Upload date
dephell_markers-0.2.3-py3-none-any.whl (17.2 kB) Copy SHA256 hash SHA256 Wheel py3
dephell_markers-0.2.3.tar.gz (6.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page