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.post23.tar.gz (124.3 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.post23-cp314-cp314t-win_arm64.whl (225.0 kB view details)

Uploaded CPython 3.14tWindows ARM64

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

Uploaded CPython 3.14tWindows x86-64

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

Uploaded CPython 3.14tWindows x86

nanopy-28.0.1.post23-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.post23-cp314-cp314t-musllinux_1_2_aarch64.whl (380.6 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

nanopy-28.0.1.post23-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.post23-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.post23-cp314-cp314t-macosx_11_0_arm64.whl (230.0 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

nanopy-28.0.1.post23-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.post23-cp310-abi3-win_arm64.whl (221.9 kB view details)

Uploaded CPython 3.10+Windows ARM64

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

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

nanopy-28.0.1.post23-cp310-abi3-musllinux_1_2_x86_64.whl (520.5 kB view details)

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

nanopy-28.0.1.post23-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.post23-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.post23-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.post23-cp310-abi3-macosx_11_0_arm64.whl (230.0 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

nanopy-28.0.1.post23-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.post23.tar.gz.

File metadata

  • Download URL: nanopy-28.0.1.post23.tar.gz
  • Upload date:
  • Size: 124.3 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.post23.tar.gz
Algorithm Hash digest
SHA256 a36dee79a2a8ee8c103db868c1ff426a3838203d21bd5476e2a88477cc7aac36
MD5 7a40e3b43e51d58e8c8070832da4e0e9
BLAKE2b-256 95787eeab7912299e9994523deb84a8e2e233ce712ded25cd7fc9e5ca0ebc94a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23.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.post23-cp314-cp314t-win_arm64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp314-cp314t-win_arm64.whl
Algorithm Hash digest
SHA256 3e8ba30a91c9809e08297b66d43ff27ab1e4b96fe98e37cb9faaa75a5e5c1724
MD5 2fca1bd64d2d22566262d9da6c1013e3
BLAKE2b-256 18a900ed47c764f45bd88283e43995a80075add01d657d469e93d4bc725b662c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp314-cp314t-win_amd64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 ab700eb0bcae42836deda95b161dcf57eaa902b1a7b7f7bcfefb6cf1d7e1aca8
MD5 1c2ab0429856d18d624dc286da9f8bb8
BLAKE2b-256 5783b464419a5490ee208331f9c688b70a6c807298f96b247943cbd6b8bd6a94

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp314-cp314t-win32.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp314-cp314t-win32.whl
Algorithm Hash digest
SHA256 719fb1e99b05aced88f9afc48a948f77adc692018fec37a871ed9497c018e435
MD5 35eeb5837abbddd092463361321aaa9a
BLAKE2b-256 da8713b4f0b3d43b1f6ef534e266c183fe4af0cbee356ab81385fe616738de2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a63c644a1b234a0d343ccfb0ea4f5cbfa75b136c9d67a97dc603de373c9efe18
MD5 0b0f84d57e9526fd74c728e499a4df1b
BLAKE2b-256 252a1dfc2ed620a2fc451cf25254eb7c59e6e3174dab9e70bc216de88a31324d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp314-cp314t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d3e94224492a35df3a4de87dde827a40fc8f414ece4bc3e822671919a870f0d4
MD5 e6bbbd60d8cdc1983eabd5f9e0010f53
BLAKE2b-256 532ec9a91f4e6ada02f6f717336dda91080cfef048e81342a931c309e3f8a527

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-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.post23-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6f5baf7b57090be6d1e6e25e050b7c8011e29e15e701e60b608cd511d3d2c7f8
MD5 7b8d958e515ecd3497c314c16fa6846a
BLAKE2b-256 35af546e97cf952e033f57a7b457a0eeebecd0d8714d2e8c214c31a792bad056

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 21e9a97078947ec30fbea7c26579669e175545cc41cf08d729f5bcce4e6fa615
MD5 3228a51ff7d2f5d01110fe3e0f37ca10
BLAKE2b-256 6c99a669e6cc618e673dfb9997daf565d75a43b4cf0940c7f649e250f18a9d57

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f7d93914ce5363994a535d4a6edbb4669c291f7bd9fd29ff6e5f6501aee24f97
MD5 d8822c186060a429d47b195d838335a3
BLAKE2b-256 f60c0cc91610ef498bd2650580651303fc2697692c01ab21f9b501b5167c5c96

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp314-cp314t-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 789e2b0f8c1bd8694d932f77011239a6d1e974ad078312525cdacd2f45ea266f
MD5 da8ce85aac4418ce8d68eefaff50cb03
BLAKE2b-256 ed65f5adec1af9cf3662cb6a525cfb90efe15b514d905d5d63f6b7fe3d391273

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 ccbbb477e7a7947ddd230b6be0b2d1e9042b9f79db8674212f72198f8a606326
MD5 be7dc258b794b543544ff9552535e9de
BLAKE2b-256 db792bfc21a393df784d1a1956b95d678af31fcfb8628665f896cebb916c80f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2a71269ccfbadcaa5fd94e6703b089bc1ae705bad45d4e56638ea440251aa2ae
MD5 86d49b75b6c021bd8e05e0a142b52a7a
BLAKE2b-256 08cf939a765dcb302744c37f9a179a12cc67e5841c58d0984f123a56368af838

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp310-abi3-win32.whl.

File metadata

  • Download URL: nanopy-28.0.1.post23-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.post23-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 17da5b9d92bac6ba807821976ad15889a015bdb91c78c80e91f67dd565049ee5
MD5 0a9db534f58b1c9eced8ad1bf4f5f228
BLAKE2b-256 7a611c7bfeebe86e2cbce7689a8ed562b4a8e7a037182c966666c165a49bf915

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b4cab356bfdde8cdc227cc98bdd27a54718f17f5626a0d094cff0abd13eda017
MD5 851a4c9828eb82a89b9e4525942659af
BLAKE2b-256 36d3e1bc52d36e2a75240cb1d4ffdf2bdfdb768632ece4485d412303b951a5ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e5f1b2f2379a9d747f32c027343afdbaba029faa68f2145f2f230be0ddb97055
MD5 73a7d5e3fa14178dff05027b0cb90e23
BLAKE2b-256 1b603f54995a1c262afd60e724d4189b4e7afcddde3e5e91d95df42cc131bbbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-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.post23-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 11722f94e4f9b40d45b1ef960d04fa1042040c2ba3db353f286ef55e7d9ce357
MD5 f6062b8c7ef7bb8e228f865a0dee1ba0
BLAKE2b-256 a359a41cb35d93777aff571aa1252155913e37df1add8bb249e9439bc079d60c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 013ef4f846ab7e7f9bfa430b3989be2fbb4f6b837d96fbea52720aeb30753822
MD5 4361951aaa5e2a492f35e6475ef93c3e
BLAKE2b-256 e8f1b0df46a206b809f60190341032656a7e56a4ed54b7bdd3315386ae280b7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 63bfe403e8dac07a5a6b924d8d734c512f2fbcb2cb25d572fc6fd1ee06fe4c48
MD5 0d2db90f36d8f21943d28b600f98c657
BLAKE2b-256 0dcb797bb50c3d9a97a147360ec9c57141b2aee811b5513da6101ba784c8167e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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.post23-cp310-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for nanopy-28.0.1.post23-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 72e45494ea38cdccc865a7988d13436bb177eea75aebbf7f17063926776ab8f2
MD5 703696bd16a07ee77e9ddb6f3e5765ba
BLAKE2b-256 c345d3c2f7f9b1dfb135d638be3b0a90f71b74cce3446574b04d08ab701758ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post23-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