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.0.tar.gz
(19.2 kB
view details)
Built Distribution
File details
Details for the file dephell_markers-1.0.0.tar.gz
.
File metadata
- Download URL: dephell_markers-1.0.0.tar.gz
- Upload date:
- Size: 19.2 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 | 0388c16d9752e8a2c28975560829326578180339a8a392f73eb699f5c502c46d |
|
MD5 | 016fc6482565daf3f3f018c7c734a025 |
|
BLAKE2b-256 | 1e58d1ffb05239c5397750c0963e1b21e32e547561cdeb43584e588ff0f27d9d |
File details
Details for the file dephell_markers-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: dephell_markers-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.9 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 | c98488e8268f79786f1d7be1a771b6d1cd3aa44969a33d5cfb69efde0122b3e9 |
|
MD5 | 08748cf4130ab48d868ffa4e9df55b19 |
|
BLAKE2b-256 | 0dc7385a2d74fac7a8d70a99d55aee7505b89fe930348f0180d81dbfd4ce0ee3 |