ape-keyring


Nameape-keyring JSON
Version 0.8.0 PyPI version JSON
download
home_pagehttps://github.com/antazoey/ape-keyring
Summaryape-keyring: Store secrets for ape using Keyring.
upload_time2024-07-04 20:39:41
maintainerNone
docs_urlNone
authorantazoey
requires_python<4,>=3.8
licenseApache-2.0
keywords ethereum
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Quickstart

Avoid hard-coding secrets in your projects using `ape-keyring`.
`ape-keyring` is built on top of [keyring](https://pypi.org/project/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](https://www.python.org/downloads) version 3.9 or greater, python3-dev

## Installation

### via `pip`

You can install the latest release via [`pip`](https://pypi.org/project/pip/):

```bash
pip install ape-keyring
```

### via `setuptools`

You can clone the repository and use [`setuptools`](https://github.com/pypa/setuptools) for the most up-to-date version:

```bash
git clone https://github.com/antazoey/ape-keyring.git
cd ape_keyring
python3 setup.py install
```

## Quick Usage

Use `ape-keyring` for both accounts and secrets.

### Accounts

Use `ape-keyring` as an account plugin.
You can add existing accounts to keyring to use in your scripts, console, or tests:

```bash
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:

```bash
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:

```bash
ape keyring accounts delete-all
```

Finally, list your accounts by doing:

```bash
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:

```bash
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.

```bah
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`:

```yaml
keyring:
  set_env_vars: true
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/antazoey/ape-keyring",
    "name": "ape-keyring",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.8",
    "maintainer_email": null,
    "keywords": "ethereum",
    "author": "antazoey",
    "author_email": "antyzoa@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ad/3c/837fdcc5e847ca40e767550a83120e3e9b608bfc12c9eaee9f5176cf5142/ape-keyring-0.8.0.tar.gz",
    "platform": null,
    "description": "# Quickstart\n\nAvoid hard-coding secrets in your projects using `ape-keyring`.\n`ape-keyring` is built on top of [keyring](https://pypi.org/project/keyring/) and is an account plugin and secret manager.\nBy default, `keyring` uses your OS's secure storage and prompts for authorization upon request.\nThus, `keyring` is useful for securely managing local developer environments.\n\nThis guide demonstrates how to use `ape-keyring` as an account plugin and secret manager.\n\n## Dependencies\n\n- [python3](https://www.python.org/downloads) version 3.9 or greater, python3-dev\n\n## Installation\n\n### via `pip`\n\nYou can install the latest release via [`pip`](https://pypi.org/project/pip/):\n\n```bash\npip install ape-keyring\n```\n\n### via `setuptools`\n\nYou can clone the repository and use [`setuptools`](https://github.com/pypa/setuptools) for the most up-to-date version:\n\n```bash\ngit clone https://github.com/antazoey/ape-keyring.git\ncd ape_keyring\npython3 setup.py install\n```\n\n## Quick Usage\n\nUse `ape-keyring` for both accounts and secrets.\n\n### Accounts\n\nUse `ape-keyring` as an account plugin.\nYou can add existing accounts to keyring to use in your scripts, console, or tests:\n\n```bash\nape keyring import keyring_dev_0\n```\n\nIt then securely prompts you for your private key.\n\n**NOTE**: You can only add existing accounts to keyring and generate new ones.\n\nYou can delete accounts by doing:\n\n```bash\nape keyring accounts delete <alias>\n```\n\nThis only deletes the account from keyring and not the blockchain.\n\nTo remove all your keyring accounts, run the command:\n\n```bash\nape keyring accounts delete-all\n```\n\nFinally, list your accounts by doing:\n\n```bash\nape keyring accounts list\n```\n\n### Secrets\n\nUse `ape-keyring` as a secrets managers, such as Infura project IDs, Etherscan API keys, your mother's maiden name.\nTo add secrets to keyring, do:\n\n```bash\nape keyring set WEB3_API_KEY\n```\n\nand then when it prompts you, input the value to your secret.\n\nOptionally, scope your secrets to the active project.\n\n```bah\nape keyring set DEPLOYMENT_SECRET --scope project \n```\n\nTo enable your secrets to become environment variables at runtime,\nuse the `ape-config.yaml` option `set_env_vars`:\n\n```yaml\nkeyring:\n  set_env_vars: true\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "ape-keyring: Store secrets for ape using Keyring.",
    "version": "0.8.0",
    "project_urls": {
        "Homepage": "https://github.com/antazoey/ape-keyring"
    },
    "split_keywords": [
        "ethereum"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "10646c5f7bb9545eda44af8e5d7543ad66c3acd72c63d28f4b8062555fbd29d5",
                "md5": "4b7552dece4e1747a3eb9152914119ae",
                "sha256": "009ff63fe629515f422e58f91c8eb1a8b2f5dcb180efd4d6708710e20a843ad1"
            },
            "downloads": -1,
            "filename": "ape_keyring-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4b7552dece4e1747a3eb9152914119ae",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.8",
            "size": 16697,
            "upload_time": "2024-07-04T20:39:39",
            "upload_time_iso_8601": "2024-07-04T20:39:39.565055Z",
            "url": "https://files.pythonhosted.org/packages/10/64/6c5f7bb9545eda44af8e5d7543ad66c3acd72c63d28f4b8062555fbd29d5/ape_keyring-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad3c837fdcc5e847ca40e767550a83120e3e9b608bfc12c9eaee9f5176cf5142",
                "md5": "cc49a4eea6c3035c0dfbd0c1cb08b7ac",
                "sha256": "1b101963d43a73493fcfedbeb7e96acd0e0071561e0a5d85db752a639dfca5e7"
            },
            "downloads": -1,
            "filename": "ape-keyring-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "cc49a4eea6c3035c0dfbd0c1cb08b7ac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.8",
            "size": 22694,
            "upload_time": "2024-07-04T20:39:41",
            "upload_time_iso_8601": "2024-07-04T20:39:41.084057Z",
            "url": "https://files.pythonhosted.org/packages/ad/3c/837fdcc5e847ca40e767550a83120e3e9b608bfc12c9eaee9f5176cf5142/ape-keyring-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-04 20:39:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "antazoey",
    "github_project": "ape-keyring",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ape-keyring"
}
        
Elapsed time: 0.26813s