Skip to main content

Quick Start

Use the Metamask Developer (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

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

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:

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)

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.4.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ape_infura-0.8.4-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file ape_infura-0.8.4.tar.gz.

File metadata

  • Download URL: ape_infura-0.8.4.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.16

File hashes

Hashes for ape_infura-0.8.4.tar.gz
Algorithm Hash digest
SHA256 d56eba427b796e22c1e4b26fb648e28ff0c82b3304fd0c74e2f844c040ed38c3
MD5 afebece656f96ef8701c7814cefd90de
BLAKE2b-256 702b9424f28ea9217a2d50cce3072d759ad01198857a8e92a1c17649ba46c532

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ape_infura-0.8.4-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.16

File hashes

Hashes for ape_infura-0.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 83ac3a946eb23890a1006fefa3a978a3bbee71ffd88f73435328be8eca8afaa5
MD5 c37a9bedf9bf7e6e70eec930ab7ff32b
BLAKE2b-256 344f4393521cca2b88ec4a185240c428fe8ba14b145fb9fa9754e06654cd9dbd

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.8.4 This release

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page