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.1.tar.gz
(6.5 kB
view details)
Built Distribution
File details
Details for the file dephell_markers-0.2.1.tar.gz
.
File metadata
- Download URL: dephell_markers-0.2.1.tar.gz
- Upload date:
- Size: 6.5 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 | 7a061331c185ae01e9af4b63e0a5795dc0f21ecfc1d987761e4756e2419bc76b |
|
MD5 | fdf550252366d854df1f214491f6a754 |
|
BLAKE2b-256 | d1ff4497a8b2594a815885a0ac0486b9257421f62cbbcd96ccfe7f8212e6e5c8 |
File details
Details for the file dephell_markers-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: dephell_markers-0.2.1-py3-none-any.whl
- Upload date:
- Size: 17.1 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 | 9b137b83345c76fc45ec39f1cea9133e0a34e611d8830cd2793d667be751ef94 |
|
MD5 | 9705c2cc663169e1265ba6cb89b4bee7 |
|
BLAKE2b-256 | 2917622d770c4af3750d7602513bcfe472bc28e85df149d0dcafcad2faed6d4d |