ape-keyring: Store secrets for ape using Keyring.
Project description
Quickstart
Avoid hard-coding secrets in your projects using ape-keyring
.
ape-keyring
is built on top of keyring and is an account plugin and secret manager.
By default, keyring
uses your OS's secure storage and prompts for authorization upon request.
Thus, keyring
is useful for securely managing local developer environments.
This guide demonstrates how to use ape-keyring
as an account plugin and secret manager.
Dependencies
- python3 version 3.8 or greater, python3-dev
Installation
via pip
You can install the latest release via pip
:
pip install ape-keyring
via setuptools
You can clone the repository and use setuptools
for the most up-to-date version:
git clone https://github.com/ApeWorX/ape-keyring.git
cd ape_keyring
python3 setup.py install
Quick Usage
Accounts
Use ape-keyring
as an account plugin.
You can add existing accounts to keyring to use in your scripts, console, or tests:
ape keyring import keyring_dev_0
It then securely prompts you for your private key.
NOTE: You can only add existing accounts to keyring and generate new ones.
You can delete accounts by doing:
ape keyring accounts delete <alias>
This only deletes the account from keyring and not the blockchain.
To remove all your keyring accounts, run the command:
ape keyring accounts delete-all
Finally, list your accounts by doing:
ape keyring accounts list
Secrets
Use ape-keyring
as a secrets managers, such as Infura project IDs, Etherscan API keys, your mother's maiden name.
To add secrets to keyring, do:
ape keyring set WEB3_API_KEY
and then when it prompts you, input the value to your secret.
Optionally, scope your secrets to the active project.
ape keyring set DEPLOYMENT_SECRET --scope project
To enable your secrets to become environment variables at runtime,
use the ape-config.yaml
option set_env_vars
:
keyring:
set_env_vars: true
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.
Source Distribution
Built Distribution
File details
Details for the file ape-keyring-0.5.0b1.tar.gz
.
File metadata
- Download URL: ape-keyring-0.5.0b1.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2214fed47d71f44e82264875e1848f38e064088bf5233311b51d91d3698fe4da |
|
MD5 | 93f0da7536d4cf7f420f39a4ee5123fa |
|
BLAKE2b-256 | f60dcee3357c74ae1328a4baba9359d35426984d96f5eebbe41da526fc7d86b7 |
File details
Details for the file ape_keyring-0.5.0b1-py3-none-any.whl
.
File metadata
- Download URL: ape_keyring-0.5.0b1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77af3bc749b1e450011d45e4e6c657a322d2f6e3b92028dc127200a145580dc5 |
|
MD5 | 992c4bfabab7986206285ce591ec37da |
|
BLAKE2b-256 | 11d34f879b7291911975a144924c9c22fe12629e4ac043c14875b2b1629b6b85 |