blockscan-python


Nameblockscan-python JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/SpeakinTelnet/blockscan-python
SummaryA python api wrapper to access the available enpoints from the blockscan.com ecosystem
upload_time2022-07-27 02:14:28
maintainer
docs_urlNone
authorSpeakinTelnet
requires_python>=3.8
licenseMIT license
keywords blockscan-python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ================
blockscan-python
================

This package was created in the hope to provide a multi-chain API 
wrapper for the blockscan.com endpoints and reduce the overhead of
using multiple single chain wrapper.

Note
----

The following blockchains from `blockscout.com <https://blockscout.com>`_ are also
provided *BUT* it's because blockscout offers the API for `developers transitioning
their applications from Etherscan to BlockScout <https://blockscout.com/etc/mainnet/api-docs>`_. If they deprecate those API in the 
future so will this package.

- Gnosis (100)
- Ethereum Classic (61)
- Ethereum Classic Mordor (63)
- Ethereum Classic Kotti (6)
- POA Core (99)
- POA Sokol (77)
- Artis Sigma1 (246529)
- RSK (30)
- Hoo Smart Chain (70) (This one is technicaly part of blockscan.com but is built on top of blockscout)




Installation
------------

Blockscan-python can be installed using ``pip`` as follows:

.. code-block:: console

   $ pip install blockscan-python

Usage
-----

Refer to the `full documentation <https://blockscan-python.readthedocs.io>`_
for the list of endpoints and the specific blockscan provider for compatibility.
This package doesn't filter the endpoints on a per-chain basis.
This means that some calls will fails if the provider doesn't support it.


Prerequisite
************

- The chain ID you want to connect to.
        Refer to `chainlist <https://chainlist.org/>`_ if unknown
- Specific chain API Token provided by `blockscan <https://blockscan.com>`_
       (i.e: An `etherscan.io <https://etherscan.io>`_ token for Ethereum)

       Exception: Any Blockscout chain takes an empty string "", No token required

Create a connection client
**************************

The connection can be created as *Sync*:

.. code-block:: python

        >>> from blockscan import Blockscan
        
        # Sync connection to etherscan.io
        >>> client = blockscan(1, "MYAPITOKEN", is_async=False)
        >>> client.accounts.get_currency_balance(
                "0x0000000000000000000000000000000000000000"
                )
        '11400022397988649428803'

But will default to *Async* if no parameter is provided:

.. code-block:: python

        >>> from blockscan import BlockScan
        
        #Async connection to bscscan.com
        >>> client = Blockscan(56, "MYAPITOKEN")
        >>> bal = await client.accounts.get_currency_balance(
                        "0x0000000000000000000000000000000000000000"
                        )
        >>> print(bal)
        '1073557893975925234717'

The full list of parameters is available in the `documentation <https://blockscan-python.readthedocs.io/usage.html#create-a-connection>`_



Donate 
------

I made this has a fun side project and it's free for anyone to use.
If you like it and wish to donate here's a few of my crypto wallets. 

.. _tbl-grid:

+----------------------------------------+--------------------------------------+-----------------------------------------+
| Ethereum and L2s (0x29006...)          | Monero (85tBS7YSrM5...)              | Peercoin (PBzj1ZwMDW...)                |
|                                        |                                      |                                         |
+========================================+======================================+=========================================+
| |EthereumQR|                           | |MoneroQR|                           | |PeercoinQR|                            |
+----------------------------------------+--------------------------------------+-----------------------------------------+

.. |EthereumQR| image:: https://raw.githubusercontent.com/SpeakinTelnet/blockscan-python/master/docs/_qrcodes/ethereum.png
  :width: 300
  :alt: EthereumQR

.. |MoneroQR| image:: https://raw.githubusercontent.com/SpeakinTelnet/blockscan-python/master/docs/_qrcodes/monero.png
  :width: 300
  :alt: MoneroQR

.. |PeercoinQR| image:: https://raw.githubusercontent.com/SpeakinTelnet/blockscan-python/master/docs/_qrcodes/peercoin.png
  :width: 300
  :alt: PeerCoinQR

* Free software: MIT license
* Documentation: https://blockscan-python.readthedocs.io.

Credits
-------

Credits to `@pcko1 <https://github.com/pcko1>`_ for making the 
bscscan-python that was used as the base for this package

TO-DOs
------

- Add a reference table of the available Chain ID to the docs


=======
History
=======

0.0.1 (2022-07-02)
------------------

* First release on PyPI.

1.1.0 (2022-07-03)
------------------

* CI tests and deployment added
* Packaging build tested and beta ready

1.1.1 (2022-07-26)
------------------

* Preloaded modules for easier IDE usage

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/SpeakinTelnet/blockscan-python",
    "name": "blockscan-python",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "blockscan-python",
    "author": "SpeakinTelnet",
    "author_email": "gui.lac@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d2/bf/51ef94e301a3044c05e92765f59c92302743268a94ad4764f2b7dc2ece6b/blockscan-python-1.1.1.tar.gz",
    "platform": null,
    "description": "================\nblockscan-python\n================\n\nThis package was created in the hope to provide a multi-chain API \nwrapper for the blockscan.com endpoints and reduce the overhead of\nusing multiple single chain wrapper.\n\nNote\n----\n\nThe following blockchains from `blockscout.com <https://blockscout.com>`_ are also\nprovided *BUT* it's because blockscout offers the API for `developers transitioning\ntheir applications from Etherscan to BlockScout <https://blockscout.com/etc/mainnet/api-docs>`_. If they deprecate those API in the \nfuture so will this package.\n\n- Gnosis (100)\n- Ethereum Classic (61)\n- Ethereum Classic Mordor (63)\n- Ethereum Classic Kotti (6)\n- POA Core (99)\n- POA Sokol (77)\n- Artis Sigma1 (246529)\n- RSK (30)\n- Hoo Smart Chain (70) (This one is technicaly part of blockscan.com but is built on top of blockscout)\n\n\n\n\nInstallation\n------------\n\nBlockscan-python can be installed using ``pip`` as follows:\n\n.. code-block:: console\n\n   $ pip install blockscan-python\n\nUsage\n-----\n\nRefer to the `full documentation <https://blockscan-python.readthedocs.io>`_\nfor the list of endpoints and the specific blockscan provider for compatibility.\nThis package doesn't filter the endpoints on a per-chain basis.\nThis means that some calls will fails if the provider doesn't support it.\n\n\nPrerequisite\n************\n\n- The chain ID you want to connect to.\n        Refer to `chainlist <https://chainlist.org/>`_ if unknown\n- Specific chain API Token provided by `blockscan <https://blockscan.com>`_\n       (i.e: An `etherscan.io <https://etherscan.io>`_ token for Ethereum)\n\n       Exception: Any Blockscout chain takes an empty string \"\", No token required\n\nCreate a connection client\n**************************\n\nThe connection can be created as *Sync*:\n\n.. code-block:: python\n\n        >>> from blockscan import Blockscan\n        \n        # Sync connection to etherscan.io\n        >>> client = blockscan(1, \"MYAPITOKEN\", is_async=False)\n        >>> client.accounts.get_currency_balance(\n                \"0x0000000000000000000000000000000000000000\"\n                )\n        '11400022397988649428803'\n\nBut will default to *Async* if no parameter is provided:\n\n.. code-block:: python\n\n        >>> from blockscan import BlockScan\n        \n        #Async connection to bscscan.com\n        >>> client = Blockscan(56, \"MYAPITOKEN\")\n        >>> bal = await client.accounts.get_currency_balance(\n                        \"0x0000000000000000000000000000000000000000\"\n                        )\n        >>> print(bal)\n        '1073557893975925234717'\n\nThe full list of parameters is available in the `documentation <https://blockscan-python.readthedocs.io/usage.html#create-a-connection>`_\n\n\n\nDonate \n------\n\nI made this has a fun side project and it's free for anyone to use.\nIf you like it and wish to donate here's a few of my crypto wallets. \n\n.. _tbl-grid:\n\n+----------------------------------------+--------------------------------------+-----------------------------------------+\n| Ethereum and L2s (0x29006...)          | Monero (85tBS7YSrM5...)              | Peercoin (PBzj1ZwMDW...)                |\n|                                        |                                      |                                         |\n+========================================+======================================+=========================================+\n| |EthereumQR|                           | |MoneroQR|                           | |PeercoinQR|                            |\n+----------------------------------------+--------------------------------------+-----------------------------------------+\n\n.. |EthereumQR| image:: https://raw.githubusercontent.com/SpeakinTelnet/blockscan-python/master/docs/_qrcodes/ethereum.png\n  :width: 300\n  :alt: EthereumQR\n\n.. |MoneroQR| image:: https://raw.githubusercontent.com/SpeakinTelnet/blockscan-python/master/docs/_qrcodes/monero.png\n  :width: 300\n  :alt: MoneroQR\n\n.. |PeercoinQR| image:: https://raw.githubusercontent.com/SpeakinTelnet/blockscan-python/master/docs/_qrcodes/peercoin.png\n  :width: 300\n  :alt: PeerCoinQR\n\n* Free software: MIT license\n* Documentation: https://blockscan-python.readthedocs.io.\n\nCredits\n-------\n\nCredits to `@pcko1 <https://github.com/pcko1>`_ for making the \nbscscan-python that was used as the base for this package\n\nTO-DOs\n------\n\n- Add a reference table of the available Chain ID to the docs\n\n\n=======\nHistory\n=======\n\n0.0.1 (2022-07-02)\n------------------\n\n* First release on PyPI.\n\n1.1.0 (2022-07-03)\n------------------\n\n* CI tests and deployment added\n* Packaging build tested and beta ready\n\n1.1.1 (2022-07-26)\n------------------\n\n* Preloaded modules for easier IDE usage\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "A python api wrapper to access the available enpoints from the blockscan.com ecosystem",
    "version": "1.1.1",
    "split_keywords": [
        "blockscan-python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "744b752b981b60567746d08ffa513edf",
                "sha256": "fa724cf9112630f462ad880330c03efd38ebd7efea94864abad5b1e6490297ca"
            },
            "downloads": -1,
            "filename": "blockscan_python-1.1.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "744b752b981b60567746d08ffa513edf",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 26483,
            "upload_time": "2022-07-27T02:14:26",
            "upload_time_iso_8601": "2022-07-27T02:14:26.410625Z",
            "url": "https://files.pythonhosted.org/packages/7a/15/f8ec91b3c80298731607f6cc3f34ea4594d57796cfc010d873edc3c7a68e/blockscan_python-1.1.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "f8ce6abda4407e417adfd3e21c2be09f",
                "sha256": "2669852f5366f85e85e6cd72e8181f16f7f60690e8af34e1a94111aba98ba286"
            },
            "downloads": -1,
            "filename": "blockscan-python-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f8ce6abda4407e417adfd3e21c2be09f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 117200,
            "upload_time": "2022-07-27T02:14:28",
            "upload_time_iso_8601": "2022-07-27T02:14:28.969928Z",
            "url": "https://files.pythonhosted.org/packages/d2/bf/51ef94e301a3044c05e92765f59c92302743268a94ad4764f2b7dc2ece6b/blockscan-python-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-07-27 02:14:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "SpeakinTelnet",
    "github_project": "blockscan-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "blockscan-python"
}
        
Elapsed time: 0.48040s