# 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/78/87/d8b68322b74a1b19b31733665a8fe301df58ca90df3125d3362ab60247a1/ape_infura-0.8.3.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.3",
"project_urls": {
"Homepage": "https://github.com/ApeWorX/ape-infura"
},
"split_keywords": [
"ethereum"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1330dbfef851b187443281f64583af6acbfb66c2ef6ea6c5c716c23df7345f38",
"md5": "fa2eedccbdfc01d0f5f287bcef29b84c",
"sha256": "89c6854bb5a5f9a08eb3835333df27871edd45e154328055ae004e0bd78f1172"
},
"downloads": -1,
"filename": "ape_infura-0.8.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fa2eedccbdfc01d0f5f287bcef29b84c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.9",
"size": 11201,
"upload_time": "2024-12-06T16:38:50",
"upload_time_iso_8601": "2024-12-06T16:38:50.991281Z",
"url": "https://files.pythonhosted.org/packages/13/30/dbfef851b187443281f64583af6acbfb66c2ef6ea6c5c716c23df7345f38/ape_infura-0.8.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7887d8b68322b74a1b19b31733665a8fe301df58ca90df3125d3362ab60247a1",
"md5": "854770442d3af29582c7ab4569e57e50",
"sha256": "a37bbafb0ff7b4acd4c243df4bf9e4e6dabb8c1259c420c110c54e42dcea9d91"
},
"downloads": -1,
"filename": "ape_infura-0.8.3.tar.gz",
"has_sig": false,
"md5_digest": "854770442d3af29582c7ab4569e57e50",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.9",
"size": 20939,
"upload_time": "2024-12-06T16:38:52",
"upload_time_iso_8601": "2024-12-06T16:38:52.856118Z",
"url": "https://files.pythonhosted.org/packages/78/87/d8b68322b74a1b19b31733665a8fe301df58ca90df3125d3362ab60247a1/ape_infura-0.8.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-06 16:38:52",
"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"
}