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
Release files for dephell-markers 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dephell_markers-1.0.3.tar.gz | 10.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dephell_markers-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.9 kB
Release files / dephell_markers-1.0.3.tar.gz
| Download URL | dephell_markers-1.0.3.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
525e17914e705acf8652dd8681fccdec912432a747d8def4720f49416817f2d4
|
|
BLAKE2b-256 checksum How to use checksums |
6aa79cae07b074f7fd3fedd0cf415292f4fb18ec95bb7fe1a0cc4764061939d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / dephell_markers-1.0.3-py3-none-any.whl
| Download URL | dephell_markers-1.0.3-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54ad6807b087d6c9171efc2d94eda3a9e3cad7ea2ca4b27186789d455a6c730a
|
|
BLAKE2b-256 checksum How to use checksums |
dae436df3acf05d258dcfdcaa1d11270572a1d22a1968bd8455b591ecbe46ec1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|