Skip to main content

A lightweight library that works as a connector to the Flare explorer api

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flare_explorer_python-0.1.2.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

flare_explorer_python-0.1.2-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file flare_explorer_python-0.1.2.tar.gz.

File metadata

  • Download URL: flare_explorer_python-0.1.2.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.1 Darwin/22.3.0

File hashes

Hashes for flare_explorer_python-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b8c05637dbcb6e1bae7a5e5134a289ed96601fa8c0117753e0f52a3aaeba1d1c
MD5 08ae59cf0949a85b1e397e4a1a72be90
BLAKE2b-256 57e575015af39fee1a88c8bdfd2951295719732447b46e8f6e2b2e87a1b9664d

See more details on using hashes here.

File details

Details for the file flare_explorer_python-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for flare_explorer_python-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 26dae11a04cc07a5edd17fea93f47368a3fd7b8ab2ffac3e7bbcf8f8de36d530
MD5 8e5432bc683d44962660ee0544970394
BLAKE2b-256 a92d3360164329fe76260372e828447963cb0f99c48ee8523185b3b77fb303f3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page