New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pysecrets

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pysecrets

The lightest weight package for loading secrets into a project.

pipPyPI
Version
0.0.3
Maintainers
1

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')
...

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts