Skip to main content

The lightest weight package for loading secrets into a project.

Project description

PySecrets

The lightest weight package for loading secrets into a project via the os.environ.

Setup

Easy install via pip

pip install pysecrets

The package requires you to have a file in your project directory that is called .secrets. This file will look like the following:

# passwords file

PASSWORD=hello
APIKEY=17886cd8-6d61-4c29-9482-c64fb995ea14
# comments must be on their own lines

Example Usage

This is for your basic usage with a .secrets file.

import os
from pysecrets import secrets

secrets()

print(os.environ['PASSWORD'])

If you have secrets for a different environment, simply

...
secrets('.secrets_stage')
...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysecrets-0.0.3.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

pysecrets-0.0.3-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page