Environment-Parser
A lightweight python library to parse environment variables from current shell or .env files.
Installation
Usage
Create a new environment parser from shell context.
from environment import Environment, SHELL
env = Environment(sources=[SHELL])
You can also create a new environment parser from variables starting with a given prefix.
For example, to find all variables starting with XDG_, you could use the code below...
xdgenv = env.extract_child_from_prefix('XDG_', remove_prefix=True)
print(xdgenv)
... and this will output something like the following :
CONFIG_DIRS /etc/xdg/xdg-budgie-desktop:/etc/xdg
SESSION_PATH /org/freedesktop/DisplayManager/Session0
MENU_PREFIX gnome-
SESSION_DESKTOP budgie-desktop
SESSION_TYPE x11
GREETER_DATA_DIR /var/lib/lightdm-data/sylvan
Metadata
Release files for environment-parser 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| environment-parser-0.0.1.tar.gz | 3.1 kB | Without provenance | Details for environment-parser-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| environment_parser-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for environment_parser-0.0.1-py3-none-any.whl |
Total release size: 7.0 kB
Release files / environment-parser-0.0.1.tar.gz
| Download URL | environment-parser-0.0.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
812e569fea323a6ca724b2d89bf16c15748fa455063d730d12a039cb0bdd7bf3
|
|
BLAKE2b-256 checksum How to use checksums |
d873141780d907a9b2993c2197e73d3ded8d7243bf11fe0e3dbfba4143cb791a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2
|
Release files / environment_parser-0.0.1-py3-none-any.whl
| Download URL | environment_parser-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c838134d3369a2fadd6b8a2d58c72338f27614c6e7c857a099d46857575ee916
|
|
BLAKE2b-256 checksum How to use checksums |
49d10d8b8b14c527a45d0f8a1f537268cc727f99c35c4fcd6de727aa6f618d02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2
|
Security for environment-parser 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.