This release is a pre-release and may not be stable for production use.
Web3 async multi provider
Web3.py compatible async providers that supports multiply RPC URLs
This library allows to create a w3 instance with multiply RPC URLs to prevent failures when a node is down by choosing another one by cycle.
Features
- HTTP async provider
- WebSockets async provider
Overview
HTTP w3 provider
import web3
from web3_async_multi_provider import AsyncWSMultiProvider
provider = AsyncHTTPMultiProvider(
providers=[
web3.AsyncHTTPProvider("https://eth.llamarpc.com"),
web3.AsyncHTTPProvider("https://rpc.flashbots.net"),
]
)
WebSockets provider
import web3
from web3_async_multi_provider import AsyncWSMultiProvider
provider = AsyncWSMultiProvider(
providers=[
web3.providers.WebsocketProvider("wss://example.com/"),
web3.providers.WebsocketProvider("wss://google.com/"),
]
)
And then add it into Web3:
w3 = web3.Web3(
provider
modules={"eth": [web3.eth.AsyncEth]},
middlewares=[]
)
print(await web3.eth.chain_id)
Installation
Via PyPI:
python -m pip install web3_async_multi_provider
Or via GitHub
python -m pip install https://github.com/deknowny/web3-async-multi-provider/archive/main.zip
Contributing
Check out site Contributing section
Metadata
Release files for web3-async-multi-provider 0.1.0b0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| web3_async_multi_provider-0.1.0b0.tar.gz | 3.7 kB | Without provenance | Details for web3_async_multi_provider-0.1.0b0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| web3_async_multi_provider-0.1.0b0-py3-none-any.whl | Python 3 | none | any | Details for web3_async_multi_provider-0.1.0b0-py3-none-any.whl |
Total release size: 7.7 kB
Release files / web3_async_multi_provider-0.1.0b0.tar.gz
| Download URL | web3_async_multi_provider-0.1.0b0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6125f0781b535b67135e9983d7faab6e3981e136c65234431f514af52dbbacf5
|
|
BLAKE2b-256 checksum How to use checksums |
e32ce3deeb7cf816f756bef42daa73f2a3b5512674c81f39de616f259aa202cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.9.16 Linux/5.15.0-1035-azure
|
Release files / web3_async_multi_provider-0.1.0b0-py3-none-any.whl
| Download URL | web3_async_multi_provider-0.1.0b0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06f5ab9035b83b89170976a44d007a719b24353cae137a9d267265f9ab2c5a06
|
|
BLAKE2b-256 checksum How to use checksums |
08cd1d3bdd71fed74bc5776d4bf40ccd1d4df44bb6c774476a7f6d6088df6afb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.9.16 Linux/5.15.0-1035-azure
|
Security for web3-async-multi-provider 0.1.0b0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.