ape-infura: Infura Provider plugins for Ethereum-based networks
Project description
Quick Start
Use the Infura provider plugin to interact with blockchains via APIs. This plugin supports the following ecosystems:
- Ethereum
- Polygon
- Arbitrum
- Optimism
- Blast
Linea(awaiting ape-linea update)
Dependencies
- python3 version 3.9 up to 3.12.
Installation
via pip
You can install the latest release via pip
:
pip install ape-infura
via setuptools
You can clone the repository and use setuptools
for the most up-to-date version:
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:
export WEB3_INFURA_PROJECT_ID=MY_API_TOKEN
# Multple tokens
export WEB3_INFURA_PROJECT_ID=MY_API_TOKEN1, MY_API_TOKEN2
To use the Infura provider plugin in most commands, set it via the --network
option:
ape console --network ethereum:sepolia:infura
To connect to Infura from a Python script, use the networks
top-level manager:
from ape import networks
with networks.parse_network_choice("ethereum:mainnet:infura") as provider:
# Also, access the websocket URI:
print(provider.ws_uri)
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-infura-0.8.1.tar.gz
.
File metadata
- Download URL: ape-infura-0.8.1.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6aa645c74b1e7ddd378777f7ebbbcf45264316abc683765f695d45420feaa1e4 |
|
MD5 | 7815207752b91df489def40f140da880 |
|
BLAKE2b-256 | 64c3b9301ff0ceb8680012b9041d6bd041266eede08051c6f3ddba88a14e7b14 |
File details
Details for the file ape_infura-0.8.1-py3-none-any.whl
.
File metadata
- Download URL: ape_infura-0.8.1-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | daae707963b2d59eddcb460fdb264c087bd7eea5564f59387c0b2723fa0cbaf3 |
|
MD5 | 090350e8764ad33bdb3631047c3b52a7 |
|
BLAKE2b-256 | 8b71a906a9c0d7fb7b50f2c9c2ac0d10e2f141d096aba43e697f697df7b40f46 |