Skip to main content

Python implementation of NANO currency related functions

Project description

nanopy

pip install nanopy

When needed, install from source and use the environment variables CC, LDSHARED, CFLAGS, and LDFLAGS to tweak build options of the C extension for work generation and signing. See setuptools documentation for further info.

For e.g., GPU support can be enabled with USE_OCL=1 and appropriate OpenCL dependencies.

sudo apt install gcc python3-dev ocl-icd-opencl-dev intel/mesa/nvidia/pocl/rocm-opencl-icd
USE_OCL=1 pip install --no-binary=nanopy nanopy

Usage

from nanopy import Account, deterministic_key
from nanopy.rpc import HTTP

# create an account (defaults to NANO network) and set secret key
acc = Account(sk=deterministic_key(seed="0000000...."))

# if it is not a new account, set the current state of the account (frontier, raw bal, rep)
acc.state = ("1234....", 1200000000000000, Account(addr="nano_repaddress..."))

# create a receive block and optionally, change rep along with it
rb = acc.receive(hash_="5678....", raw_amt=acc.network.to_raw("10"), rep=Account(addr="nano_newrepaddress..."))

# create a send block
sb = acc.send(Account(addr="nano_sendaddress..."), acc.network.to_raw("1"))

# broadcast
r = HTTP(url="http://localhost:7076")
r.process(rb.dict_)
r.process(sb.dict_)

Wallet

A cli wallet is included with the library

  • Configuration is in ~/.config/nanopy.ini
[nano]
nano_1111111111111111111111111111111111111111111111111111hifc8npp
nano_16aj46aj46aj46aj46aj46aj46aj46aj46aj46aj46aj46aj46ajbtsyew7c
rpc = http://localhost:7076
  • -n, --network. Choose the network to interact with - nano, banano, or beta. The default network is nano.
  • Checks state of accounts in ~/.config/nanopy.ini by default.
  • Open a wallet, nanopy-wallet open FILE KEY. KEY is a seed in a KDBX FILE. See nanopy-wallet open -h for options.

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

nanopy-28.0.1.post24.tar.gz (124.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nanopy-28.0.1.post24-cp314-cp314t-win_arm64.whl (225.0 kB view details)

Uploaded CPython 3.14tWindows ARM64

nanopy-28.0.1.post24-cp314-cp314t-win_amd64.whl (210.1 kB view details)

Uploaded CPython 3.14tWindows x86-64

nanopy-28.0.1.post24-cp314-cp314t-win32.whl (207.6 kB view details)

Uploaded CPython 3.14tWindows x86

nanopy-28.0.1.post24-cp314-cp314t-musllinux_1_2_x86_64.whl (523.4 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

nanopy-28.0.1.post24-cp314-cp314t-musllinux_1_2_aarch64.whl (380.6 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

nanopy-28.0.1.post24-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (542.6 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

nanopy-28.0.1.post24-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (381.2 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

nanopy-28.0.1.post24-cp314-cp314t-macosx_11_0_arm64.whl (230.0 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

nanopy-28.0.1.post24-cp314-cp314t-macosx_10_15_x86_64.whl (219.2 kB view details)

Uploaded CPython 3.14tmacOS 10.15+ x86-64

nanopy-28.0.1.post24-cp310-abi3-win_arm64.whl (221.9 kB view details)

Uploaded CPython 3.10+Windows ARM64

nanopy-28.0.1.post24-cp310-abi3-win_amd64.whl (209.2 kB view details)

Uploaded CPython 3.10+Windows x86-64

nanopy-28.0.1.post24-cp310-abi3-win32.whl (206.9 kB view details)

Uploaded CPython 3.10+Windows x86

nanopy-28.0.1.post24-cp310-abi3-musllinux_1_2_x86_64.whl (520.6 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

nanopy-28.0.1.post24-cp310-abi3-musllinux_1_2_aarch64.whl (377.8 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

nanopy-28.0.1.post24-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (539.8 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

nanopy-28.0.1.post24-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (378.5 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

nanopy-28.0.1.post24-cp310-abi3-macosx_11_0_arm64.whl (230.0 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

nanopy-28.0.1.post24-cp310-abi3-macosx_10_9_x86_64.whl (219.0 kB view details)

Uploaded CPython 3.10+macOS 10.9+ x86-64

File details

Details for the file nanopy-28.0.1.post24.tar.gz.

File metadata

  • Download URL: nanopy-28.0.1.post24.tar.gz
  • Upload date:
  • Size: 124.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nanopy-28.0.1.post24.tar.gz
Algorithm Hash digest
SHA256 61a13a65ccb14b8cc742617f5d346162a52efcd953508b0611a12c7e53b44179
MD5 8dede5d70cc6495f6f1333cc96dd92c8
BLAKE2b-256 bcdaf3a9d63261b43c3bd300ee91b2ea1c3298a7f58606cc8a35a51fb7af14c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24.tar.gz:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp314-cp314t-win_arm64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp314-cp314t-win_arm64.whl
Algorithm Hash digest
SHA256 726b1bdafab43ba0bc7c9862d8909851a68135ddb3e6e21cdeb6595283c61f51
MD5 557549389cbae3def5513ff34e22c353
BLAKE2b-256 2eb3e43ef3dda9e3958144e792ce7ee9edefd71edb0882db3ced9014fd2dccaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp314-cp314t-win_arm64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp314-cp314t-win_amd64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 7933a2586a0afd5b145bca622eb82459951749234e2928742fc7276b5d48f1c2
MD5 cc9bf6817affd6ee8f2669f060a213ca
BLAKE2b-256 03b33eb43a2a510e68373740fa516f702fb65386d77bfed3756ca56dfe4e1985

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp314-cp314t-win_amd64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp314-cp314t-win32.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp314-cp314t-win32.whl
Algorithm Hash digest
SHA256 99b1e106dc5857454528e0a62baed48d7d03486d0856a8d1a1b351ac6b55d93c
MD5 712286e989c34ad78aeb506142dfb788
BLAKE2b-256 ef4cb842ea43a0bc0ef8fef88b8a72540abf40a90299e2fb34ca7f38e205824c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp314-cp314t-win32.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9dd9382203c4f4509cb9ea179abbb2358b4a2b63b4b4efad215d2bdd560c49ec
MD5 257056c5507248361840826ed7f581e5
BLAKE2b-256 fdf66c35a1c7f4b4556529941f94970777f330807f54b6612a3625ac1547d25c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp314-cp314t-musllinux_1_2_x86_64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp314-cp314t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 cc3ab3a6e264be13ab8a3d198cbd3bfbc3afe3f319b7b8b010cac277cfb13cab
MD5 9d448893887c0bd90cf13891ded531cc
BLAKE2b-256 7a83ea45a31cb2cbbaea09568bcd2585f2de53fd2043e43e546147446b045a1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp314-cp314t-musllinux_1_2_aarch64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6205c477fcdd880df1e6cd2983d630969cf0b76793803f480cb3689419ad1df2
MD5 d5a70beb3fc05ea665b2ae8c7a29e157
BLAKE2b-256 566a78d017291d35fc1cdfbfd505c895240379fa8231456ae1f88d02eed5a2e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ca22690e1feee591f22928346f2efe23ee9961a38a64a1a766af04dbade6d5b4
MD5 b2942a48e7678d7b3da757fd50d42332
BLAKE2b-256 de968fee33531e0c425cc38d1e33eeac4514c29225118648255a81d019143f4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a47a5bf2076a12fa5eb42ac6fe7c905ab4d8dc0a078f63ea59825808a0cd7e41
MD5 a0678ffc72fb65dd4353921cea2452d9
BLAKE2b-256 20cd77faa09edb0d43a03a66be50436fd570e3a32b9d1b6d22a6cdefb0bf6503

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp314-cp314t-macosx_11_0_arm64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp314-cp314t-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 13dc1ec4a559471fd81185a97854feb37fa4f5248b0664fc34d97f679889cf22
MD5 1aa08e8d839c2f155c7bf217bf6f2622
BLAKE2b-256 39bef550f5185895e74f56af0530de9b69da83e02c2c9f8b448d6e670f78a3d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp314-cp314t-macosx_10_15_x86_64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 283b41e9442b95e8099d11e86b794562da9ae2d5e58aa476f8230fc53cdfbc87
MD5 b03154e8aa5e4ac128f95847bb8aa6de
BLAKE2b-256 6d59868d02b5aa55f763ee0b058ca1f981a2b5d40571ed90ced114545440e58c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp310-abi3-win_arm64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8333f335ae7588b8fb2ae7d0e87d09363b49a50bfbf5d517b863548d14c3d187
MD5 edcce1ec187bac03fd862a0d766025ea
BLAKE2b-256 3c49b88ea385586ffb242fca1fd7b47083fdb0c38dfa3afc174529f55124d3d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp310-abi3-win_amd64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp310-abi3-win32.whl.

File metadata

  • Download URL: nanopy-28.0.1.post24-cp310-abi3-win32.whl
  • Upload date:
  • Size: 206.9 kB
  • Tags: CPython 3.10+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nanopy-28.0.1.post24-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 8025470b2da5e85a0dec2921eb93b73262496b4019ec583ffc0add34f80043be
MD5 ede8e8ef5a61412950568913abdeb20a
BLAKE2b-256 55593767ae2228de944eea5803534e749b6f811bade9557dcbb52fe282df77fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp310-abi3-win32.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c1b9b6d7b360312dba6e836499a876258ac0a385f7f719673af78e64b822c1ab
MD5 7c5477ef846092c22f3f9a213aeb43c2
BLAKE2b-256 a25463b9e426a4d5a47e08b975ded65f823fcfe3d9bcb1678a6a33c09b9b2534

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 bb474ebbb5b693262977441f62d8902f3d109fd9ffbfa0bc54f86954d107a563
MD5 e3c2d71d637aae8a80f964b7788aaced
BLAKE2b-256 556cec1c6818ab33a9aa090dc9c8921217cd2b482784c0c954d64a89f8a8ce35

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2618fe071509e7da38a4786699aae9dade479c43277c8a2d61687f0d93f8c7a2
MD5 4dbea059dcc84f916a193d5e4cd430b1
BLAKE2b-256 92a05f2823ea1f0f5617a9099925b642ad49e97e0e336c4c57520367d542666c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2ba0c41f22d1cbfdda31bfc9e79c4676502677dd952df8516bf474c9ff00a38c
MD5 b3dc5e5410a92cee6f86c88b61cd0e4c
BLAKE2b-256 3ec5be1dbe86b4d775f815b9c82a2165c6eef6257bd35154e2bc85c16f67f8e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4be86f05def418d6370e91142a716b81c8f918bb34137c046bb570f2a80d7f01
MD5 a031611e7639ea62a4cce5d14870ac5d
BLAKE2b-256 13f2b4f1dea07a92e7f77c7f543f41a781daca6a33f9407bc10c1c935ccc68c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopy-28.0.1.post24-cp310-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post24-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a93165a608275e0c7a157566d86097b4a402d81a28510a07bcb4d589286b8a38
MD5 7d73cf3a719a6a603b704d38c0041ef8
BLAKE2b-256 fe32c107976c7c99877e01b643efbf686cce19fca55d42b35c097fda4aa4e585

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post24-cp310-abi3-macosx_10_9_x86_64.whl:

Publisher: nanopy.yml on nkr0/nanopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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