Name | VaultAPI JSON |
Version |
0.2.1
JSON |
| download |
home_page | None |
Summary | Lightweight API to store/retrieve secrets to/from an encrypted Database |
upload_time | 2025-01-19 01:28:42 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2024 Vignesh Rao Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
vaultapi
vault
fastapi
sqlite3
fernet
|
VCS |
|
bugtrack_url |
|
requirements |
click
cryptography
fastapi
pydantic
pydantic-settings
python-dotenv
PyYAML
uvicorn
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# VaultAPI
Lightweight API to store/retrieve secrets to/from an encrypted Database
![Python][label-pyversion]
**Platform Supported**
![Platform][label-platform]
![docker-image][image-size]
**Deployments**
[![docker][label-docker-build]][gha_docker]
[![pypi][label-actions-pypi]][gha_pypi]
[![docker_desc][label-docker-desc]][gha_docker_desc]
[![markdown][label-actions-markdown]][gha_md_valid]
[![pages][label-actions-pages]][gha_pages]
[![Pypi][label-pypi]][pypi]
[![Pypi-format][label-pypi-format]][pypi-files]
[![Pypi-status][label-pypi-status]][pypi]
## Kick off
**Recommendations**
- Install `python` [3.10] or [3.11]
- Use a dedicated [virtual environment]
**Install VaultAPI**
```shell
python -m pip install vaultapi
```
**Initiate - IDE**
```python
import vaultapi.server
if __name__ == '__main__':
vaultapi.server.start()
```
**Initiate - CLI**
```shell
vaultapi start
```
> Use `vaultapi --help` for usage instructions.
## Environment Variables
<details>
<summary><strong>Sourcing environment variables from an env file</strong></summary>
> _By default, `VaultAPI` will look for a `.env` file in the current working directory._
</details>
**Mandatory**
- **APIKEY** - API Key for authentication.
- **SECRET** - Secret access key to encode/decode the secrets in Datastore.
**Optional (with defaults)**
- **TRANSIT_KEY_LENGTH** - AES key length for transit encryption. Defaults to `32`
- **TRANSIT_TIME_BUCKET** - Interval for which the transit epoch should remain constant. Defaults to `60`
- **DATABASE** - FilePath to store the secrets' database. Defaults to `secrets.db`
- **HOST** - Hostname for the API server. Defaults to `0.0.0.0` [OR] `localhost`
- **PORT** - Port number for the API server. Defaults to `9010`
- **WORKERS** - Number of workers for the uvicorn server. Defaults to `1`
- **RATE_LIMIT** - List of dictionaries with `max_requests` and `seconds` to apply as rate limit.
Defaults to 5req/2s [AND] 10req/30s
**Optional (without defaults)**
- **LOG_CONFIG** - FilePath or dictionary of key-value pairs for log config.
- **ALLOWED_ORIGINS** - Origins that are allowed to retrieve secrets.
- **ALLOWED_IP_RANGE** - IP range that is allowed to retrieve secrets. _(eg: `10.112.8.10-210`)_
> Checkout [decryptors][decryptors] for more information about decrypting the retrieved secret from the server.
<details>
<summary>Auto generate a <code>SECRET</code> value</summary>
This value will be used to encrypt/decrypt the secrets stored in the database.
**CLI**
```shell
vaultapi keygen
```
**IDE**
```python
from cryptography.fernet import Fernet
print(Fernet.generate_key())
```
</details>
## Coding Standards
Docstring format: [`Google`][google-docs] <br>
Styling conventions: [`PEP 8`][pep8] and [`isort`][isort]
## [Release Notes][release-notes]
**Requirement**
```shell
python -m pip install gitverse
```
**Usage**
```shell
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**
```shell
python -m pip install sphinx==5.1.1 pre-commit recommonmark
```
**Usage**
```shell
pre-commit run --all-files
```
## Pypi Package
[![pypi-module][label-pypi-package]][pypi-repo]
[https://pypi.org/project/VaultAPI/][pypi]
## Docker Image
[![made-with-docker-doc][label-docker-doc]][docker-doc]
[https://hub.docker.com/r/thevickypedia/vaultapi][docker]
## Runbook
[![made-with-sphinx-doc][label-sphinx-doc]][sphinx]
[https://thevickypedia.github.io/VaultAPI/][runbook]
## License & copyright
© Vignesh Rao
Licensed under the [MIT License][license]
[label-actions-markdown]: https://github.com/thevickypedia/VaultAPI/actions/workflows/markdown.yaml/badge.svg
[label-docker-build]: https://github.com/thevickypedia/VaultAPI/actions/workflows/docker-publish.yaml/badge.svg
[label-docker-desc]: https://github.com/thevickypedia/VaultAPI/actions/workflows/docker-description.yaml/badge.svg
[label-pypi-package]: https://img.shields.io/badge/Pypi%20Package-VaultAPI-blue?style=for-the-badge&logo=Python
[label-sphinx-doc]: https://img.shields.io/badge/Made%20with-Sphinx-blue?style=for-the-badge&logo=Sphinx
[label-docker-doc]: https://img.shields.io/badge/Made%20with-Docker-blue?style=for-the-badge&logo=Docker
[label-pyversion]: https://img.shields.io/badge/python-3.10%20%7C%203.11-blue
[label-platform]: https://img.shields.io/badge/Platform-Linux|macOS|Windows-1f425f.svg
[label-actions-pages]: https://github.com/thevickypedia/VaultAPI/actions/workflows/pages/pages-build-deployment/badge.svg
[label-actions-pypi]: https://github.com/thevickypedia/VaultAPI/actions/workflows/python-publish.yaml/badge.svg
[label-pypi]: https://img.shields.io/pypi/v/VaultAPI
[label-pypi-format]: https://img.shields.io/pypi/format/VaultAPI
[label-pypi-status]: https://img.shields.io/pypi/status/VaultAPI
[3.10]: https://docs.python.org/3/whatsnew/3.10.html
[3.11]: https://docs.python.org/3/whatsnew/3.11.html
[virtual environment]: https://docs.python.org/3/tutorial/venv.html
[release-notes]: https://github.com/thevickypedia/VaultAPI/blob/main/release_notes.rst
[decryptors]: https://github.com/thevickypedia/VaultAPI/blob/main/decryptors
[gha_pages]: https://github.com/thevickypedia/VaultAPI/actions/workflows/pages/pages-build-deployment
[gha_docker]: https://github.com/thevickypedia/VaultAPI/actions/workflows/docker-publish.yaml
[gha_docker_desc]: https://github.com/thevickypedia/VaultAPI/actions/workflows/docker-description.yaml
[gha_pypi]: https://github.com/thevickypedia/VaultAPI/actions/workflows/python-publish.yaml
[gha_md_valid]: https://github.com/thevickypedia/VaultAPI/actions/workflows/markdown.yaml
[google-docs]: https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings
[pep8]: https://www.python.org/dev/peps/pep-0008/
[isort]: https://pycqa.github.io/isort/
[docker]: https://hub.docker.com/r/thevickypedia/vaultapi
[docker-doc]: https://docs.docker.com/
[sphinx]: https://www.sphinx-doc.org/en/master/man/sphinx-autogen.html
[image-size]: https://img.shields.io/docker/image-size/thevickypedia/vaultapi/latest
[pypi]: https://pypi.org/project/VaultAPI
[pypi-files]: https://pypi.org/project/VaultAPI/#files
[pypi-repo]: https://packaging.python.org/tutorials/packaging-projects/
[license]: https://github.com/thevickypedia/VaultAPI/blob/main/LICENSE
[runbook]: https://thevickypedia.github.io/VaultAPI/
Raw data
{
"_id": null,
"home_page": null,
"name": "VaultAPI",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "vaultapi, vault, fastapi, sqlite3, fernet",
"author": null,
"author_email": "Vignesh Rao <svignesh1793@gmail.com>",
"download_url": null,
"platform": null,
"description": "# VaultAPI\nLightweight API to store/retrieve secrets to/from an encrypted Database\n\n![Python][label-pyversion]\n\n**Platform Supported**\n\n![Platform][label-platform]\n![docker-image][image-size]\n\n**Deployments**\n\n[![docker][label-docker-build]][gha_docker]\n[![pypi][label-actions-pypi]][gha_pypi]\n[![docker_desc][label-docker-desc]][gha_docker_desc]\n\n[![markdown][label-actions-markdown]][gha_md_valid]\n[![pages][label-actions-pages]][gha_pages]\n\n[![Pypi][label-pypi]][pypi]\n[![Pypi-format][label-pypi-format]][pypi-files]\n[![Pypi-status][label-pypi-status]][pypi]\n\n## Kick off\n\n**Recommendations**\n\n- Install `python` [3.10] or [3.11]\n- Use a dedicated [virtual environment]\n\n**Install VaultAPI**\n```shell\npython -m pip install vaultapi\n```\n\n**Initiate - IDE**\n```python\nimport vaultapi.server\n\n\nif __name__ == '__main__':\n vaultapi.server.start()\n```\n\n**Initiate - CLI**\n```shell\nvaultapi start\n```\n\n> Use `vaultapi --help` for usage instructions.\n\n## Environment Variables\n\n<details>\n<summary><strong>Sourcing environment variables from an env file</strong></summary>\n\n> _By default, `VaultAPI` will look for a `.env` file in the current working directory._\n</details>\n\n**Mandatory**\n- **APIKEY** - API Key for authentication.\n- **SECRET** - Secret access key to encode/decode the secrets in Datastore.\n\n**Optional (with defaults)**\n- **TRANSIT_KEY_LENGTH** - AES key length for transit encryption. Defaults to `32`\n- **TRANSIT_TIME_BUCKET** - Interval for which the transit epoch should remain constant. Defaults to `60`\n- **DATABASE** - FilePath to store the secrets' database. Defaults to `secrets.db`\n- **HOST** - Hostname for the API server. Defaults to `0.0.0.0` [OR] `localhost`\n- **PORT** - Port number for the API server. Defaults to `9010`\n- **WORKERS** - Number of workers for the uvicorn server. Defaults to `1`\n- **RATE_LIMIT** - List of dictionaries with `max_requests` and `seconds` to apply as rate limit.\nDefaults to 5req/2s [AND] 10req/30s\n\n**Optional (without defaults)**\n- **LOG_CONFIG** - FilePath or dictionary of key-value pairs for log config.\n- **ALLOWED_ORIGINS** - Origins that are allowed to retrieve secrets.\n- **ALLOWED_IP_RANGE** - IP range that is allowed to retrieve secrets. _(eg: `10.112.8.10-210`)_\n\n> Checkout [decryptors][decryptors] for more information about decrypting the retrieved secret from the server.\n\n<details>\n<summary>Auto generate a <code>SECRET</code> value</summary>\n\nThis value will be used to encrypt/decrypt the secrets stored in the database.\n\n**CLI**\n```shell\nvaultapi keygen\n```\n\n**IDE**\n```python\nfrom cryptography.fernet import Fernet\nprint(Fernet.generate_key())\n```\n</details>\n\n## Coding Standards\nDocstring format: [`Google`][google-docs] <br>\nStyling conventions: [`PEP 8`][pep8] and [`isort`][isort]\n\n## [Release Notes][release-notes]\n**Requirement**\n```shell\npython -m pip install gitverse\n```\n\n**Usage**\n```shell\ngitverse-release reverse -f release_notes.rst -t 'Release Notes'\n```\n\n## Linting\n`pre-commit` will ensure linting, run pytest, generate runbook & release notes, and validate hyperlinks in ALL\nmarkdown files (including Wiki pages)\n\n**Requirement**\n```shell\npython -m pip install sphinx==5.1.1 pre-commit recommonmark\n```\n\n**Usage**\n```shell\npre-commit run --all-files\n```\n\n## Pypi Package\n[![pypi-module][label-pypi-package]][pypi-repo]\n\n[https://pypi.org/project/VaultAPI/][pypi]\n\n## Docker Image\n[![made-with-docker-doc][label-docker-doc]][docker-doc]\n\n[https://hub.docker.com/r/thevickypedia/vaultapi][docker]\n\n## Runbook\n[![made-with-sphinx-doc][label-sphinx-doc]][sphinx]\n\n[https://thevickypedia.github.io/VaultAPI/][runbook]\n\n## License & copyright\n\n© Vignesh Rao\n\nLicensed under the [MIT License][license]\n\n[label-actions-markdown]: https://github.com/thevickypedia/VaultAPI/actions/workflows/markdown.yaml/badge.svg\n[label-docker-build]: https://github.com/thevickypedia/VaultAPI/actions/workflows/docker-publish.yaml/badge.svg\n[label-docker-desc]: https://github.com/thevickypedia/VaultAPI/actions/workflows/docker-description.yaml/badge.svg\n[label-pypi-package]: https://img.shields.io/badge/Pypi%20Package-VaultAPI-blue?style=for-the-badge&logo=Python\n[label-sphinx-doc]: https://img.shields.io/badge/Made%20with-Sphinx-blue?style=for-the-badge&logo=Sphinx\n[label-docker-doc]: https://img.shields.io/badge/Made%20with-Docker-blue?style=for-the-badge&logo=Docker\n[label-pyversion]: https://img.shields.io/badge/python-3.10%20%7C%203.11-blue\n[label-platform]: https://img.shields.io/badge/Platform-Linux|macOS|Windows-1f425f.svg\n[label-actions-pages]: https://github.com/thevickypedia/VaultAPI/actions/workflows/pages/pages-build-deployment/badge.svg\n[label-actions-pypi]: https://github.com/thevickypedia/VaultAPI/actions/workflows/python-publish.yaml/badge.svg\n[label-pypi]: https://img.shields.io/pypi/v/VaultAPI\n[label-pypi-format]: https://img.shields.io/pypi/format/VaultAPI\n[label-pypi-status]: https://img.shields.io/pypi/status/VaultAPI\n\n[3.10]: https://docs.python.org/3/whatsnew/3.10.html\n[3.11]: https://docs.python.org/3/whatsnew/3.11.html\n[virtual environment]: https://docs.python.org/3/tutorial/venv.html\n[release-notes]: https://github.com/thevickypedia/VaultAPI/blob/main/release_notes.rst\n[decryptors]: https://github.com/thevickypedia/VaultAPI/blob/main/decryptors\n[gha_pages]: https://github.com/thevickypedia/VaultAPI/actions/workflows/pages/pages-build-deployment\n[gha_docker]: https://github.com/thevickypedia/VaultAPI/actions/workflows/docker-publish.yaml\n[gha_docker_desc]: https://github.com/thevickypedia/VaultAPI/actions/workflows/docker-description.yaml\n[gha_pypi]: https://github.com/thevickypedia/VaultAPI/actions/workflows/python-publish.yaml\n[gha_md_valid]: https://github.com/thevickypedia/VaultAPI/actions/workflows/markdown.yaml\n[google-docs]: https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings\n[pep8]: https://www.python.org/dev/peps/pep-0008/\n[isort]: https://pycqa.github.io/isort/\n[docker]: https://hub.docker.com/r/thevickypedia/vaultapi\n[docker-doc]: https://docs.docker.com/\n[sphinx]: https://www.sphinx-doc.org/en/master/man/sphinx-autogen.html\n[image-size]: https://img.shields.io/docker/image-size/thevickypedia/vaultapi/latest\n[pypi]: https://pypi.org/project/VaultAPI\n[pypi-files]: https://pypi.org/project/VaultAPI/#files\n[pypi-repo]: https://packaging.python.org/tutorials/packaging-projects/\n[license]: https://github.com/thevickypedia/VaultAPI/blob/main/LICENSE\n[runbook]: https://thevickypedia.github.io/VaultAPI/\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Vignesh Rao Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Lightweight API to store/retrieve secrets to/from an encrypted Database",
"version": "0.2.1",
"project_urls": {
"Bug Tracker": "https://github.com/thevickypedia/VaultAPI/issues",
"Docs": "https://thevickypedia.github.io/VaultAPI",
"Homepage": "https://github.com/thevickypedia/VaultAPI",
"Release Notes": "https://github.com/thevickypedia/VaultAPI/blob/main/release_notes.rst",
"Source": "https://github.com/thevickypedia/VaultAPI"
},
"split_keywords": [
"vaultapi",
" vault",
" fastapi",
" sqlite3",
" fernet"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "18747c1a95393b2a02673c7635c05d2e5e862c05bd16867ac99530bc21a44b01",
"md5": "f87304c9b85991d806337b9138003457",
"sha256": "fcca5f33a06054366e9bc4accb7c0fa36669736766355ba00dc2594d8b0a5e69"
},
"downloads": -1,
"filename": "VaultAPI-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f87304c9b85991d806337b9138003457",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 19735,
"upload_time": "2025-01-19T01:28:42",
"upload_time_iso_8601": "2025-01-19T01:28:42.156699Z",
"url": "https://files.pythonhosted.org/packages/18/74/7c1a95393b2a02673c7635c05d2e5e862c05bd16867ac99530bc21a44b01/VaultAPI-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-19 01:28:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "thevickypedia",
"github_project": "VaultAPI",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "click",
"specs": [
[
"==",
"8.1.8"
]
]
},
{
"name": "cryptography",
"specs": [
[
"==",
"44.0.0"
]
]
},
{
"name": "fastapi",
"specs": [
[
"==",
"0.115.6"
]
]
},
{
"name": "pydantic",
"specs": [
[
"==",
"2.10.5"
]
]
},
{
"name": "pydantic-settings",
"specs": [
[
"==",
"2.7.1"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
"==",
"1.0.1"
]
]
},
{
"name": "PyYAML",
"specs": [
[
"==",
"6.0.2"
]
]
},
{
"name": "uvicorn",
"specs": [
[
"==",
"0.34.0"
]
]
}
],
"lcname": "vaultapi"
}