Skip to main content

environ_secretmanager

The environ_secretmanager module is designed to be used to download Google Cloud Secrets Manager secrets and set them as environment variables. This is useful for using secrets in various environments, and works especially well with App Engine and Cloud Functions where the correct environment variables can be created in an env file during CI/CD and used in the final build files for production.

Usage

from environ_secretmanager.env_secrets import EnvironSecretManager

secrets = EnvironSecretManager(GOOGLE_CLOUD_PROJECT_ID="my-project-id")

# To create a .env file with the secrets
secrets.create_dot_env_file()

# To use the secrets in the current environment
MY_SECRET = secrets.get_env_secret("MY_SECRET", 1)

Build For Local Distribution

Build the files then extract the setup.py file from the tarball and run it to install the package locally.

poetry build --format sdist
tar -xvf dist/*-`poetry version -s`.tar.gz -O '*/setup.py' > setup.py

Then on the machine you want to install the package on, run

pip install -e .

Development

This project uses Poetry in development to create a virtual environment and manage dependencies. To install poetry, run

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -

Then, from the same directory as pyproject.toml, run

poetry install

Run poetry commands from this same directory to manage your development environment and/or setup the virtual environment created in the last step in your IDE.

See Poetry Docs for more info.

Metadata

Release files for environ_secretmanager 0.2.1

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

Source distribution (sdist)

Source distribution for environ_secretmanager 0.2.1
File Size Uploaded Provenance Actions
environ_secretmanager-0.2.1.tar.gz 3.2 kB Without provenance Details for environ_secretmanager-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 6.8 kB

Release files / environ_secretmanager-0.2.1.tar.gz

Download URL environ_secretmanager-0.2.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
65d32fc5e129731ec67b9ef0c2e7ac1b2d72f6509a045f29f4999ad0e6d4fd5e
BLAKE2b-256 checksum
How to use checksums
937ebb407051fd17c35a294e23fcc8d04860a884d37535487bf9460c67244b74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.10.10 Darwin/25.3.0

Release files / environ_secretmanager-0.2.1-py3-none-any.whl

Download URL environ_secretmanager-0.2.1-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1b2dcdd02067144db5610a8358d26d9ef725637033c208ce289293a8c7c1585
BLAKE2b-256 checksum
How to use checksums
c6c438d7ed0940da01d6d715742b9963912a6242ce45b0853a51cba41cc77008
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.10.10 Darwin/25.3.0

Security for environ_secretmanager 0.2.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.

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