Work with environment markers (PEP-496)
Project description
Work with environment markers (PEP-496).
Installation
Install from PyPI:
python3 -m pip install --user dephell_markers
Usage
from dephell_markers import Markers
m = Markers('os_name == "posix" and python_version >= "2.7"')
m.get_version(name='python_version')
# '>=2.7'
m.get_string(name='os_name')
# '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
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_markers-1.0.3.tar.gz
(10.0 kB
view details)
Built Distribution
File details
Details for the file dephell_markers-1.0.3.tar.gz
.
File metadata
- Download URL: dephell_markers-1.0.3.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 525e17914e705acf8652dd8681fccdec912432a747d8def4720f49416817f2d4 |
|
MD5 | 4cdb662b9b64bca1e54cb86f9702abf8 |
|
BLAKE2b-256 | 6aa79cae07b074f7fd3fedd0cf415292f4fb18ec95bb7fe1a0cc4764061939d3 |
File details
Details for the file dephell_markers-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: dephell_markers-1.0.3-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54ad6807b087d6c9171efc2d94eda3a9e3cad7ea2ca4b27186789d455a6c730a |
|
MD5 | 706db173800084b61c717c7b18428073 |
|
BLAKE2b-256 | dae436df3acf05d258dcfdcaa1d11270572a1d22a1968bd8455b591ecbe46ec1 |