Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ape-keyring-0.5.0b0.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

ape_keyring-0.5.0b0-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file ape-keyring-0.5.0b0.tar.gz.

File metadata

  • Download URL: ape-keyring-0.5.0b0.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.1 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.1 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13

File hashes

Hashes for ape-keyring-0.5.0b0.tar.gz
Algorithm Hash digest
SHA256 1f5c2daae2ef7854e4a605f40fe8b46d24ad09d93d4a27fce434f73dddabad5f
MD5 5612d5d731a85b89b4e5207600e6f455
BLAKE2b-256 847f66161823add60f874a6173e5235ed4a057499e94c9ba496c50a34b37a0e4

See more details on using hashes here.

File details

Details for the file ape_keyring-0.5.0b0-py3-none-any.whl.

File metadata

  • Download URL: ape_keyring-0.5.0b0-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.1 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.1 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13

File hashes

Hashes for ape_keyring-0.5.0b0-py3-none-any.whl
Algorithm Hash digest
SHA256 7769bf1d991bdd517dfbb5feb692fb1a24e949baa7d504c1b805369f3e18e9a0
MD5 bcaed353401949647eed18f181eb5b3c
BLAKE2b-256 6828f8993f0de3ad3fedb184707700881d269990244ef6d14bf2267647cead7a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page