Skip to main content

async extended nano.to library for ease of use

Project description

nanoto_py : Python gateway to rpc.nano.to

The goal is to create the easiest way to prototype nano apps.

Get your free API_KEY from https://rpc.nano.to and hack around!

How to install :

pip install nanotopy

or from source :

git clone https://github.com/gr0vity-dev/nanotopy.git
cd nanotopy
pip install .

Example code :

import asyncio
from nanotopy.client import NanoTo

async def run():

    # This can only be done once ! Write down the key!
    AUTH_KEY = await NanoTo.get_auth_key("your@email.address")
    print(AUTH_KEY)
    nano_to = NanoTo(AUTH_KEY["key"])

    # Create a new nano account
    # Seed generation is done locally! No secrets are ever shared
    seed = NanoTo.generate_seed()
    seed_index = 0
    # Same seed and seed_index will ALWAYS result in the same private_key
    private_key = NanoTo.get_private_key_from_seed(seed, seed_index)
    account = NanoTo.get_account_from_key(private_key)
    print(account)

    # Get account info
    account_info = await nano_to.account_info(account)
    print(account_info)

    # Receive all blocks
    received_hashes = await nano_to.receive_blocks_many(private_key)
    print(received_hashes)


if __name__ == "__main__":
    asyncio.run(run())

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

nanotopy-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

nanotopy-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file nanotopy-0.1.0.tar.gz.

File metadata

  • Download URL: nanotopy-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for nanotopy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b4881611c4827e94ad46e75d63178c5b9d7b1fa5ed1be489a1cd886b9976fffd
MD5 e00e97a168f2262f2b976412a92f879f
BLAKE2b-256 a6bace3dc11603a60cb6ae0ba5689a4fee871f8aa4adbd76155762e1481d1a7c

See more details on using hashes here.

File details

Details for the file nanotopy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nanotopy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for nanotopy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 642fd70e15ea689be7a1526c2eec97d0dc60be477ee4e4be5d71399e9d1badd7
MD5 f925bc078b088af4c27395d4a0b85d42
BLAKE2b-256 cbc661161de216ae0d0c47d3f89133f72b30b550278caa316d799929af5d408d

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