# Quick Start
Use the [Metamask Developer](https://developer.metamask.io/) (F.K.A. Infura) provider plugin to interact with blockchains via APIs.
This plugin supports the following ecosystems:
- Arbitrum
- Avalanche
- Base
- Blast
- BSC
- Celo
- Ethereum
- Linea
- Mantle
- Optimism
- Palm
- Polygon
- Scroll
- Starknet
- Unichain
- zkSync
## Dependencies
- [python3](https://www.python.org/downloads) version 3.9 up to 3.12.
## Installation
### via `pip`
You can install the latest release via [`pip`](https://pypi.org/project/pip/):
```bash
pip install ape-infura
```
### 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/ApeWorX/ape-infura.git
cd ape-infura
python3 setup.py install
```
## Quick Usage
First, make sure you have one of the following environment variables set (it doesn't matter which one):
- WEB3_INFURA_PROJECT_ID
- WEB3_INFURA_API_KEY
Either in your current terminal session or in your root RC file (e.g. `.bashrc`), add the following:
```bash
export WEB3_INFURA_PROJECT_ID=MY_API_TOKEN
# Multple tokens
export WEB3_INFURA_PROJECT_ID=MY_API_TOKEN1, MY_API_TOKEN2
```
Additionally, if your app requires an API secret as well, use either of the following environment variables:
- WEB3_INFURA_PROJECT_ID
- WEB3_INFURA_API_KEY
And each request will use the secret as a form of authentication.
To use the Infura provider plugin in most commands, set it via the `--network` option:
```bash
ape console --network ethereum:sepolia:infura
```
To connect to Infura from a Python script, use the `networks` top-level manager:
```python
from ape import networks
with networks.parse_network_choice("ethereum:mainnet:infura") as provider:
# Also, access the websocket URI:
print(provider.ws_uri)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ApeWorX/ape-infura",
"name": "ape-infura",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.9",
"maintainer_email": null,
"keywords": "ethereum",
"author": "ApeWorX Ltd.",
"author_email": "admin@apeworx.io",
"download_url": "https://files.pythonhosted.org/packages/70/2b/9424f28ea9217a2d50cce3072d759ad01198857a8e92a1c17649ba46c532/ape_infura-0.8.4.tar.gz",
"platform": null,
"description": "# Quick Start\n\nUse the [Metamask Developer](https://developer.metamask.io/) (F.K.A. Infura) provider plugin to interact with blockchains via APIs.\nThis plugin supports the following ecosystems:\n\n- Arbitrum\n- Avalanche\n- Base\n- Blast\n- BSC\n- Celo\n- Ethereum\n- Linea\n- Mantle\n- Optimism\n- Palm\n- Polygon\n- Scroll\n- Starknet\n- Unichain\n- zkSync\n\n## Dependencies\n\n- [python3](https://www.python.org/downloads) version 3.9 up to 3.12.\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-infura\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/ApeWorX/ape-infura.git\ncd ape-infura\npython3 setup.py install\n```\n\n## Quick Usage\n\nFirst, make sure you have one of the following environment variables set (it doesn't matter which one):\n\n- WEB3_INFURA_PROJECT_ID\n- WEB3_INFURA_API_KEY\n\nEither in your current terminal session or in your root RC file (e.g. `.bashrc`), add the following:\n\n```bash\nexport WEB3_INFURA_PROJECT_ID=MY_API_TOKEN\n\n# Multple tokens\nexport WEB3_INFURA_PROJECT_ID=MY_API_TOKEN1, MY_API_TOKEN2\n```\n\nAdditionally, if your app requires an API secret as well, use either of the following environment variables:\n\n- WEB3_INFURA_PROJECT_ID\n- WEB3_INFURA_API_KEY\n\nAnd each request will use the secret as a form of authentication.\n\nTo use the Infura provider plugin in most commands, set it via the `--network` option:\n\n```bash\nape console --network ethereum:sepolia:infura\n```\n\nTo connect to Infura from a Python script, use the `networks` top-level manager:\n\n```python\nfrom ape import networks\n\nwith networks.parse_network_choice(\"ethereum:mainnet:infura\") as provider:\n # Also, access the websocket URI:\n print(provider.ws_uri)\n```\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "ape-infura: Infura Provider plugins for Ethereum-based networks",
"version": "0.8.4",
"project_urls": {
"Homepage": "https://github.com/ApeWorX/ape-infura"
},
"split_keywords": [
"ethereum"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "344f4393521cca2b88ec4a185240c428fe8ba14b145fb9fa9754e06654cd9dbd",
"md5": "c37a9bedf9bf7e6e70eec930ab7ff32b",
"sha256": "83ac3a946eb23890a1006fefa3a978a3bbee71ffd88f73435328be8eca8afaa5"
},
"downloads": -1,
"filename": "ape_infura-0.8.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c37a9bedf9bf7e6e70eec930ab7ff32b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.9",
"size": 11126,
"upload_time": "2025-01-08T19:42:29",
"upload_time_iso_8601": "2025-01-08T19:42:29.670299Z",
"url": "https://files.pythonhosted.org/packages/34/4f/4393521cca2b88ec4a185240c428fe8ba14b145fb9fa9754e06654cd9dbd/ape_infura-0.8.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "702b9424f28ea9217a2d50cce3072d759ad01198857a8e92a1c17649ba46c532",
"md5": "afebece656f96ef8701c7814cefd90de",
"sha256": "d56eba427b796e22c1e4b26fb648e28ff0c82b3304fd0c74e2f844c040ed38c3"
},
"downloads": -1,
"filename": "ape_infura-0.8.4.tar.gz",
"has_sig": false,
"md5_digest": "afebece656f96ef8701c7814cefd90de",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.9",
"size": 21192,
"upload_time": "2025-01-08T19:42:31",
"upload_time_iso_8601": "2025-01-08T19:42:31.036137Z",
"url": "https://files.pythonhosted.org/packages/70/2b/9424f28ea9217a2d50cce3072d759ad01198857a8e92a1c17649ba46c532/ape_infura-0.8.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-08 19:42:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ApeWorX",
"github_project": "ape-infura",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ape-infura"
}