flare-explorer-python


Nameflare-explorer-python JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/james-ecd/flare-explorer-python
SummaryA lightweight library that works as a connector to the Flare explorer api
upload_time2023-05-31 17:40:29
maintainer
docs_urlNone
authorJames Davis
requires_python>=3.10,<4.0
licenseMIT
keywords flare-explorer flare network api crypto blockchain
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Flare explorer python
<a href="https://pypi.org/project/flare-explorer-python" target="_blank"><img src="https://img.shields.io/pypi/v/flare-explorer-python?color=%2334D058&label=pypi%20package" alt="Package version"></a>
[![Linting and tests](https://github.com/james-ecd/flare-explorer-python/actions/workflows/tests-and-linting.yml/badge.svg?branch=main)](https://github.com/james-ecd/flare-explorer-python/actions/workflows/tests-and-linting.yml)
[![codecov](https://codecov.io/gh/james-ecd/flare-explorer-python/branch/main/graph/badge.svg?token=XOBC0UK00V)](https://codecov.io/gh/james-ecd/flare-explorer-python)
<a href="https://pypi.org/project/flare-explorer-python" target="_blank">
    <img src="https://img.shields.io/pypi/pyversions/flare-explorer-python.svg?color=%2334D058" alt="Supported Python versions">
</a>
[![Code Style](https://img.shields.io/badge/code_style-black-black)](https://black.readthedocs.io/en/stable/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A lightweight library that works as a connector to the [Flare explorer api](https://flare-explorer.flare.network/graphiql)

If you came here looking for the flare network, then go [here](https://flare.network/). 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
``` 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"
)
```

### Addresses
``` python
from flare_explorer.address import get_address, get_addresses

address = get_address(
    "address_hash",
)

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

### Blocks
``` python
from flare_explorer.block import get_block

block = get_block(4463469)
```

### Token transfers
``` python
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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/james-ecd/flare-explorer-python",
    "name": "flare-explorer-python",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "flare-explorer,flare,network,api,crypto,blockchain",
    "author": "James Davis",
    "author_email": "jamesecd@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/60/e2/1cd2a700f07b1b0d88256baf116054754fd15874f5f95bb6fb68649972a9/flare_explorer_python-0.1.3.tar.gz",
    "platform": null,
    "description": "# Flare explorer python\n<a href=\"https://pypi.org/project/flare-explorer-python\" target=\"_blank\"><img src=\"https://img.shields.io/pypi/v/flare-explorer-python?color=%2334D058&label=pypi%20package\" alt=\"Package version\"></a>\n[![Linting and tests](https://github.com/james-ecd/flare-explorer-python/actions/workflows/tests-and-linting.yml/badge.svg?branch=main)](https://github.com/james-ecd/flare-explorer-python/actions/workflows/tests-and-linting.yml)\n[![codecov](https://codecov.io/gh/james-ecd/flare-explorer-python/branch/main/graph/badge.svg?token=XOBC0UK00V)](https://codecov.io/gh/james-ecd/flare-explorer-python)\n<a href=\"https://pypi.org/project/flare-explorer-python\" target=\"_blank\">\n    <img src=\"https://img.shields.io/pypi/pyversions/flare-explorer-python.svg?color=%2334D058\" alt=\"Supported Python versions\">\n</a>\n[![Code Style](https://img.shields.io/badge/code_style-black-black)](https://black.readthedocs.io/en/stable/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA lightweight library that works as a connector to the [Flare explorer api](https://flare-explorer.flare.network/graphiql)\n\nIf you came here looking for the flare network, then go [here](https://flare.network/). If you want to query flares blockchain using python then stick around.\n\n## Installation\nflare-explorer-python is available on PYPI. Install with pip or poetry:\n\n```\npip install flare-explorer-python\n```\n```\npoetry add flare-explorer-python\n```\n\n## Usage\n### Transactions\n``` python\nfrom flare_explorer.transaction import (\n    get_internal_transactions,\n    get_transaction,\n    get_transactions_from_address,\n)\n\ntransaction = get_transaction(\"transaction_hash\")\n\ninternal_transactions, page_info = get_internal_transactions(\n    \"transaction_hash\",\n    previous_cursor=\"previous_page_last_cursor\"\n)\n\ntransactions, page_info = get_transactions_from_address(\n    \"address_hash\",\n    previous_cursor=\"previous_page_last_cursor\"\n)\n```\n\n### Addresses\n``` python\nfrom flare_explorer.address import get_address, get_addresses\n\naddress = get_address(\n    \"address_hash\",\n)\n\naddresses = get_addresses(\n    [\n        \"address_hash_1\",\n        \"address_hash_2\",\n    ]\n)\n```\n\n### Blocks\n``` python\nfrom flare_explorer.block import get_block\n\nblock = get_block(4463469)\n```\n\n### Token transfers\n``` python\nfrom flare_explorer.token_transfers import get_token_transfers\n\ntoken_transfers, page_info = get_token_transfers(\n    \"token_contract_address_hash\",\n    previous_cursor=\"previous_page_last_cursor\"\n)\n```\n\n## Upcoming features\n- asyncio support\n- websocket support\n- fast mode (no pydantic serialization)\n\n## Testing / Contributing\nAny contributions or issue raising is welcomed. If you wish to contribute then:\n1. fork/clone this repo\n2. make changes on a branch taken from main\n3. submit a pull request against main\n\nPull requests will be blocked from merging automatically if:\n- less than 100% coverage\n- there are failing tests\n- linting rules have been violated.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A lightweight library that works as a connector to the Flare explorer api",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/james-ecd/flare-explorer-python",
        "Repository": "https://github.com/james-ecd/flare-explorer-python"
    },
    "split_keywords": [
        "flare-explorer",
        "flare",
        "network",
        "api",
        "crypto",
        "blockchain"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bd8f359687842b19e97a5f2976dcf061580e3acfa78eb127e306566f17ca73bb",
                "md5": "4129e5bbdb1a773d5e86874ecc4cf28c",
                "sha256": "64ec42752b95ed498047e627a2d2d12941d8c0ada11e14fd31ae57f4551ca529"
            },
            "downloads": -1,
            "filename": "flare_explorer_python-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4129e5bbdb1a773d5e86874ecc4cf28c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 8705,
            "upload_time": "2023-05-31T17:40:27",
            "upload_time_iso_8601": "2023-05-31T17:40:27.302059Z",
            "url": "https://files.pythonhosted.org/packages/bd/8f/359687842b19e97a5f2976dcf061580e3acfa78eb127e306566f17ca73bb/flare_explorer_python-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60e21cd2a700f07b1b0d88256baf116054754fd15874f5f95bb6fb68649972a9",
                "md5": "0ebb8837438c24c1490578a94bd7e37a",
                "sha256": "98d0fd1709ee28365eb2d49f78ba7a32a9264c61aaa626dc0722baa80bcccf87"
            },
            "downloads": -1,
            "filename": "flare_explorer_python-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "0ebb8837438c24c1490578a94bd7e37a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 6760,
            "upload_time": "2023-05-31T17:40:29",
            "upload_time_iso_8601": "2023-05-31T17:40:29.369523Z",
            "url": "https://files.pythonhosted.org/packages/60/e2/1cd2a700f07b1b0d88256baf116054754fd15874f5f95bb6fb68649972a9/flare_explorer_python-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-31 17:40:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "james-ecd",
    "github_project": "flare-explorer-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "flare-explorer-python"
}
        
Elapsed time: 0.07182s