Skip to main content

getsecret

Reads credentials from a file .getsecret.yaml

Install

pip install getsecret

Using

Create a file .getsecret.yaml. It should be in YAML format. An example follows:

username: foobar
password: supersecret

Now you can access those variables in your code as follows:

from getsecret import getsecret
username = getsecret('username')
password = getsecet('password')

Now the values of username and password are the ones specified in .getsecret.yaml (foobar and supersecret, respectively).

The file .getsecret.yaml can be located in the working directory (./.getsecret.yaml), or at the user's home directory (~/.getsecret.yaml)

If you pass an additional parameter, it will be used as the default if the key is not found in .getsecret.yaml. For example, the following will look for the username key in .getsecret.yaml, and will default to root if it is not found:

from getsecret import getsecret
username = getsecret('username', 'root')

Author

Geza Kovacs

License

MIT

getsecret npm package for javascript on browser/nodejs

Metadata

Release files for getsecret 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for getsecret 0.0.6
File Size Uploaded Provenance Actions
getsecret-0.0.6.tar.gz 1.9 kB Without provenance Details for getsecret-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for getsecret 0.0.6
File Interpreter ABI Platform Actions
getsecret-0.0.6-py3-none-any.whl Python 3 none any Details for getsecret-0.0.6-py3-none-any.whl

Total release size: 4.1 kB

Release files / getsecret-0.0.6.tar.gz

Download URL getsecret-0.0.6.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5580bc89f9e538c1cf7aba5c305440eea744f999ef23a47351cac0bca9b8b433
BLAKE2b-256 checksum
How to use checksums
ada24c7b9f151a96c08adf72bd7f19cdd4bff86c087a117bc67b834e9b3de204
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.4

Release files / getsecret-0.0.6-py3-none-any.whl

Download URL getsecret-0.0.6-py3-none-any.whl
Size 2.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
502d5c3949590fb8c05b99d4001c0e340fda21eb274a5282b2532db1c9df318f
BLAKE2b-256 checksum
How to use checksums
af256571a67d6bceed84d0023353f5559aa46e02ebf6c9ab2cdaa1e9dbf00ea8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.4

Security for getsecret 0.0.6

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page