Skip to main content

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

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

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


Download files

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

Source Distribution

ape-infura-0.8.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

ape_infura-0.8.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file ape-infura-0.8.0.tar.gz.

File metadata

  • Download URL: ape-infura-0.8.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for ape-infura-0.8.0.tar.gz
Algorithm Hash digest
SHA256 999b3eddabaaeec408227c853123393a030c103185dc7291c4f4237a6b2b7a9d
MD5 3b00475e21bfb82f4ecf4ddc242e792d
BLAKE2b-256 bfbcb9ef9cf580d899ebe17f6a565f56b078546d65c547b15c8fc053158ee15c

See more details on using hashes here.

File details

Details for the file ape_infura-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: ape_infura-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for ape_infura-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7669cde840df66e0fc7dd663cfc4934e187956fd72dd9f9e062ac08da692139a
MD5 e91df992fe376b8af7bf106608df1a4b
BLAKE2b-256 ead96fa40434866167122c366449111dc8f24c9d0b157cdc5ed2beb775907efc

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