Skip to main content

Flare explorer python

Package version Linting and tests codecov Supported Python versions Code Style License: MIT

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.

Installation

flare-explorer-python is available on PYPI. Install with pip or poetry:

pip install flare-explorer-python
poetry add flare-explorer-python

Usage

Transactions

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"
)

Addresses

from flare_explorer.address import get_address, get_addresses

address = get_address(
    "address_hash",
)

addresses = get_addresses(
    [
        "address_hash_1",
        "address_hash_2",
    ]
)

Blocks

from flare_explorer.block import get_block

block = get_block(4463469)

Token transfers

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"
)

Upcoming features

  • asyncio support
  • websocket support
  • fast mode (no pydantic serialization)

Testing / Contributing

Any contributions or issue raising is welcomed. If you wish to contribute then:

  1. fork/clone this repo
  2. make changes on a branch taken from main
  3. 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.

Publishing new package version

  1. Bump version number in pyproject.toml
  2. Commit the version bump
  3. Create a new release on github
  4. poetry build
  5. poetry publish

Metadata

Release files for flare-explorer-python 1.0.0

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

Source distribution (sdist)

Source distribution for flare-explorer-python 1.0.0
File Size Uploaded
flare_explorer_python-1.0.0.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flare-explorer-python 1.0.0
File Interpreter ABI Platform
flare_explorer_python-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.3 kB

Release files / flare_explorer_python-1.0.0.tar.gz

Download URL flare_explorer_python-1.0.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
39ee5022202bad3195146617797184e1158a806153d356762266670fb2ad924e
BLAKE2b-256 checksum
How to use checksums
b92a0c45365a1067e2beeb5a809f0cce7897402ae8efbfbc02fe0f4ef11ad91c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.11 Darwin/24.5.0

Release files / flare_explorer_python-1.0.0-py3-none-any.whl

Download URL flare_explorer_python-1.0.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
598b2cceef873948ade161a7fa4723d86b1058dd890b6ec1ebb40c4e622cfbf8
BLAKE2b-256 checksum
How to use checksums
8d4177afba536b5e7dce08ee4b28773227936750dee552ba1b840648e60f3d9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.11 Darwin/24.5.0

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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