secret_key_database
This is a very simple library to encrypt and store secret keys (or any text)
locally.
The keys are stored in a local sqlite database. The keys are encrypted using
AES-GCM. That's it. In theory, the database file can be shared publicly since
the keys are encrypted and require a password to decrypt, but it's best to keep
it private.
This approach works great when:
- Number of keys is small
- The keys are not very sensitive (e.g. low risk API keys)
- You store the database in a semi-secure location (computer with a password, private repository, etc.)
- You don't want to use an external or cloud service as a key/password manager
- You need a simple API to store and retrieve keys
Installation
pip install secret_key_database
from source:
git clone https://github.com/RichieHakim/secret_key_database
cd secret_key_database
pip install -e .
Demo
import secret_key_database as skd
# Create a new database
path_db = 'path/to/database.db'
db = skd.database.create_database(path_db)
# Add a new key
skd.user.add_key_to_database(
path_db=path_db,
name='key_name',
)
# Get a key
key = skd.user.get_key_from_database(
path_db=path_db,
name='key_name',
)
# Check out available keys by name
print(skd.database.get_names_from_database(path_db=path_db))
Metadata
Release files for secret-key-database 0.1.3
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 | Actions |
|---|---|---|---|---|
| secret_key_database-0.1.3.tar.gz | 9.8 kB | With provenance | Details for secret_key_database-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| secret_key_database-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for secret_key_database-0.1.3-py3-none-any.whl |
Total release size: 17.6 kB
Release files / secret_key_database-0.1.3.tar.gz
| Download URL | secret_key_database-0.1.3.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a6639ee4daa2bed5ef7cbea6ff0bcb46217d17309e0a402c61a2120292f03f6
|
|
BLAKE2b-256 checksum How to use checksums |
bbf220f24c21e78b98d3c8ba32bc2302eeda5ad829a337353113e766d6b152da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 8, 2025.
Transparency logRelease files / secret_key_database-0.1.3-py3-none-any.whl
| Download URL | secret_key_database-0.1.3-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
011462f4ed470e4a654068aa5f81ef30b82b5c8c85fd1c0d3a22b6589f956e66
|
|
BLAKE2b-256 checksum How to use checksums |
af58f3a104493020a5534eb862f77f1a031add30949a2e8626ea6af7239f429c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 8, 2025.
Transparency logSecurity for secret-key-database 0.1.3
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for secret_key_database-0.1.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 8, 2025.
Transparency logA 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.