shellvars-py
Read environment variables defined in a shell script into Python. This library uses the shell to get variable values, and handles multiline variables.
# Usage
Given a shell file: myvars.env:
`shell #!/bin/bash export VAR1=1 export VAR2="This is a multiline value" export VAR3=3 NOT_EXPORTED=4 `
## get_vars
`python >>> import shellvars >>> shellvars.get_vars('myvars.env') {'VAR1': '1', 'VAR2': 'This\nis\na\nmultiline value', 'VAR3': '3' } `
## list_vars Lists the variable names in the script. `python >>> import shellvars >>> shellvars.list_vars('myvars.env') ['VAR1', 'VAR2', 'VAR3'] `
This is equivalent to, but faster than `python >>> shellvars.get_vars('myvars.env').keys() `
Metadata
Release files for shellvars-py 0.1.2
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 | |
|---|---|---|---|---|
| shellvars-py-0.1.2.tar.gz | 2.5 kB | Without provenance | Details |
Release files / shellvars-py-0.1.2.tar.gz
| Download URL | shellvars-py-0.1.2.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
81d81e188129ad571ade763fa484522302eb78806b0eece4ed11b8115a295729
|
|
BLAKE2b-256 checksum How to use checksums |
3a375f72c2aea402cd2dd1bf05c1eeee4fd089e22c51d279e0579f65f36faf44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for shellvars-py 0.1.2
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.