Skip to main content

cardanoscan-python

Python SDK for the Cardanoscan API, supporting both async and sync usage for accessing Cardano blocks, addresses, transactions, governance, analytics and more.

Installation • Usage • API Documentation

Installation

PyPI - Version

Install SDK from PyPi

python3 -m pip install cardanoscan-python

Usage

Create a client

from cardanoscan import Cardanoscan

client = Cardanoscan(api_key="YOUR_API_KEY")

Sync Usage

from cardanoscan import Cardanoscan

client = Cardanoscan(api_key="YOUR_API_KEY")

params = {
    "address": "addr1qxmj3a04rlp95k7428zznkq5ha4ccxwtf5gxught8ykh68l5pfacpmrk44mrauz57eak8m0aes2ywykct2puns9dzj7swe9z76"
}

data = client.get_address_balance_sync(params=params)

print(data)

Async Usage

import asyncio
from cardanoscan import Cardanoscan

async def main():
    client = Cardanoscan(api_key="YOUR_API_KEY")

    params = {
        "address": "addr1qxmj3a04rlp95k7428zznkq5ha4ccxwtf5gxught8ykh68l5pfacpmrk44mrauz57eak8m0aes2ywykct2puns9dzj7swe9z76"
    }

    data = await client.get_address_balance(params=params)
    print(data)

    await client.aclose()

asyncio.run(main())

Using Query Parameters

All optional parameters are passed via params and sent as query parameters.

params = {
    "address": "addr1...",
    "limit": 50,
    "pageNo": 100
}

data = client.get_transaction_list_by_address_sync(params=params)

Development

Install Dependencies

python3 -m pip install -e .[tests]

Run Tests

python3 -m pytest

or with logs

python3 -m pytest -s

Metadata

Release files for cardanoscan-python 0.0.2

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

Source distribution (sdist)

Source distribution for cardanoscan-python 0.0.2
File Size Uploaded
cardanoscan_python-0.0.2.tar.gz 13.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cardanoscan-python 0.0.2
File Interpreter ABI Platform
cardanoscan_python-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 28.2 kB

Release files / cardanoscan_python-0.0.2.tar.gz

Download URL cardanoscan_python-0.0.2.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4d2f943901ed943a272fc2fb1811452bf002a67d661c5714eb7a75199498cc1c
BLAKE2b-256 checksum
How to use checksums
57e74c3a87c3a4f8e20eb59756c57f69601ebe608b64e3064b8e2eb148e15e47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release files / cardanoscan_python-0.0.2-py3-none-any.whl

Download URL cardanoscan_python-0.0.2-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4386a165e8e53a0d4619e8bfcb088bf075f7bf2ee58770c67b00df6f51aecea7
BLAKE2b-256 checksum
How to use checksums
349b0ebaafec76540e9132115edd51a3b6ccf906ea96e01ae9a5665545302681
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

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