A lightweight library that works as a connector to the Flare explorer api
If you came here looking for the flare network, then go here. If you want to query flares blockchain using python then stick around.
flare-explorer-python is available on PYPI. Install with pip or poetry:
pip install flare-explorer-python
poetry add flare-explorer-python
from flare_explorer.transaction import (
get_internal_transactions,
get_transaction,
get_transactions_from_address,
)
transaction = get_transaction("transaction_hash")
internal_transactions, page_info = get_internal_transactions(
"transaction_hash",
previous_cursor="previous_page_last_cursor"
)
transactions, page_info = get_transactions_from_address(
"address_hash",
previous_cursor="previous_page_last_cursor"
)
from flare_explorer.address import get_address, get_addresses
address = get_address(
"address_hash",
)
addresses = get_addresses(
[
"address_hash_1",
"address_hash_2",
]
)
from flare_explorer.block import get_block
block = get_block(4463469)
from flare_explorer.token_transfers import get_token_transfers
token_transfers, page_info = get_token_transfers(
"token_contract_address_hash",
previous_cursor="previous_page_last_cursor"
)
- asyncio support
- websocket support
- fast mode (no pydantic serialization)
Any contributions or issue raising is welcomed. If you wish to contribute then:
- fork/clone this repo
- make changes on a branch taken from main
- submit a pull request against main
Pull requests will be blocked from merging automatically if:
- less than 100% coverage
- there are failing tests
- linting rules have been violated.
- Bump version number in
pyproject.toml
- Commit the version bump
- Create a new release on github
poetry build
poetry publish