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-0.2.4.tar.gz
(7.7 kB
view details)
Built Distribution
File details
Details for the file dephell_markers-0.2.4.tar.gz
.
File metadata
- Download URL: dephell_markers-0.2.4.tar.gz
- Upload date:
- Size: 7.7 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 | 1d5b8ddbf631257c58716913ef3c851ff7e54bf95f76f4a730d9db324a9a1a1f |
|
MD5 | c68912880b6c300575eb3eda4eed5152 |
|
BLAKE2b-256 | 90bc2b0f2a865fe5fda4565dc87d4f03d1a52c776f0766f5b3dcf86308c96dab |
File details
Details for the file dephell_markers-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: dephell_markers-0.2.4-py3-none-any.whl
- Upload date:
- Size: 11.6 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 | 5de97c8d4e64c5bb814a78baac7292a71bf68c40929a4e789c1355a0ebd1d71d |
|
MD5 | c0f906e35412626f429a8788f8dca494 |
|
BLAKE2b-256 | 591b0cd266dc8102baea2a58039dcd7f7a0dd74e04c2e864b4fa162808e584c9 |