Lightweight API to store/retrieve secrets to/from an encrypted Database
Project description
VaultAPI
Lightweight API to store/retrieve secrets to/from an encrypted Database
Platform Supported
Deployments
Kick off
Recommendations
- Install
python
3.10 or 3.11 - Use a dedicated virtual environment
Install VaultAPI
python -m pip install vaultapi
Initiate - IDE
import vaultapi
if __name__ == '__main__':
vaultapi.start()
Initiate - CLI
vaultapi start
Use
vaultapi --help
for usage instructions.
Environment Variables
Sourcing environment variables from an env file
By default,
VaultAPI
will look for a.env
file in the current working directory.
- HOST - Hostname for the API server.
- PORT - Port number for the API server.
- WORKERS - Number of workers for the uvicorn server.
- APIKEY - API Key for authentication.
- SECRET - Secret access key to encode/decode the secrets in Datastore.
- DATABASE - FilePath to store the secrets' database.
- RATE_LIMIT - List of dictionaries with
max_requests
andseconds
to apply as rate limit.
Auto generate a SECRET
value
This value will be used to encrypt/decrypt the secrets stored in the database.
CLI
vaultapi keygen
IDE
from cryptography.fernet import Fernet
print(Fernet.generate_key())
Coding Standards
Docstring format: Google
Styling conventions: PEP 8
and isort
Release Notes
Requirement
python -m pip install gitverse
Usage
gitverse-release reverse -f release_notes.rst -t 'Release Notes'
Linting
pre-commit
will ensure linting, run pytest, generate runbook & release notes, and validate hyperlinks in ALL
markdown files (including Wiki pages)
Requirement
python -m pip install sphinx==5.1.1 pre-commit recommonmark
Usage
pre-commit run --all-files
Pypi Package
https://pypi.org/project/VaultAPI/
Runbook
https://thevickypedia.github.io/VaultAPI/
License & copyright
© Vignesh Rao
Licensed under the MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.