Skip to main content

Web3Research Python Toolkit

web3research-py is the official python software development kit for leveraging datasets on Web3Research Platform

WARNING: This package is not built for Web3Research dashboards, which means that you might not be able to run on the Python Cards.

Installation

From pypi (stable)

pip install -U web3research

From github (latest)

pip install -U git+https://github.com/njublockchain/web3research-py

Usage

Example: fetch and parse a USDT Transfer Event

import os
import web3
import web3research
from web3research.evm import SingleEventDecoder
from web3research.common import Address

# for internet
w3r = web3research.Web3Research(api_token=YOUT_APIKEY)

USDT_address = Address('0xdac17f958d2ee523a2206206994597c13d831ec7')

log = w3r.eth.events(
    where=f"address = {USDT_address}", 
    order_by={"blockNumber", True},
    limit=1
)[0]

w3 = web3.Web3()

abi = {
    "anonymous": False,
    "inputs": [
        {"indexed": True, "name": "from", "type": "address"},
        {"indexed": True, "name": "to", "type": "address"},
        {"indexed": False, "name": "value", "type": "uint256"},
    ],
    "name": "Transfer",
    "type": "event",
}
decoder = SingleEventDecoder(w3, event_abi=abi)
result = decoder.decode(log)
print(result)

More practical examples are shown on web3research-py-examples

You can read detailed guide on our document site. Auto-generated python API document is available on https://web3research.readthedocs.io/.

Development

Release Process

This project uses uv for automated releases. Set up your PyPI tokens via environment variables or .env file:

# Using .env file (recommended)
echo 'PYPI_TOKEN=pypi-your-token-here' >> .env
python scripts/release.py patch  # or minor/major

# Using environment variables
export PYPI_TOKEN=pypi-your-token-here
python scripts/release.py patch

For TestPyPI: use TEST_PYPI_TOKEN and add --test-pypi flag.

Metadata

Release files for web3research 0.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for web3research 0.0.10
File Size Uploaded
web3research-0.0.10.tar.gz 3.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for web3research 0.0.10
File Interpreter ABI Platform
web3research-0.0.10-py3-none-any.whl Python 3 none any Details

Total release size: 3.2 MB

Release files / web3research-0.0.10.tar.gz

Download URL web3research-0.0.10.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
221c79b4820149b3d61e44674c3fb2ff469787d4c53e32bf447910540437c5a3
BLAKE2b-256 checksum
How to use checksums
7b3dc43bb48aa08c37f30c6e5f087382466f6e04d95e9d749c23f7a563897004
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.11

Release files / web3research-0.0.10-py3-none-any.whl

Download URL web3research-0.0.10-py3-none-any.whl
Size 24.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47333d4fa5b398460143891e803e69915384977f0d37f300c0039158474ed8a9
BLAKE2b-256 checksum
How to use checksums
73a0f9ba07cd2d2c4b61405d55604927e34b1a55b36a95396695f3f3f5c5b5fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.11
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page