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.6.tar.gz
(18.3 kB
view details)
Built Distribution
File details
Details for the file dephell_markers-0.2.6.tar.gz
.
File metadata
- Download URL: dephell_markers-0.2.6.tar.gz
- Upload date:
- Size: 18.3 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 | fe4cb15a060973a58186b8bb0325b8d0a62cb14a31dbc3ee4a687dc619eb0685 |
|
MD5 | 87fe93cf8298041df8d8c49b7fc96b49 |
|
BLAKE2b-256 | cd161e9244c5a12862d415303f5f653bb7df305da0f972e70af0af6ecb4f313e |
File details
Details for the file dephell_markers-0.2.6-py3-none-any.whl
.
File metadata
- Download URL: dephell_markers-0.2.6-py3-none-any.whl
- Upload date:
- Size: 11.8 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 | 8c6d2a4383b71d1ff66ac6613a51ca7b0b5d233020b5cf21d44bfed27eaa632e |
|
MD5 | 7a0cc0f5b417d0a1e2e6a7ce6e291ebd |
|
BLAKE2b-256 | c64683a9db97af64c8cef6bebd2afe63887d747c41d5b94ab2839805740b1fd4 |