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.post25.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.post25-cp314-cp314t-win_arm64.whl (225.0 kB view details)

Uploaded CPython 3.14tWindows ARM64

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

Uploaded CPython 3.14tWindows x86-64

nanopy-28.0.1.post25-cp314-cp314t-win32.whl (207.7 kB view details)

Uploaded CPython 3.14tWindows x86

nanopy-28.0.1.post25-cp314-cp314t-musllinux_1_2_x86_64.whl (523.5 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

nanopy-28.0.1.post25-cp314-cp314t-musllinux_1_2_aarch64.whl (380.7 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

nanopy-28.0.1.post25-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (542.7 kB view details)

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

nanopy-28.0.1.post25-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (381.3 kB view details)

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

nanopy-28.0.1.post25-cp314-cp314t-macosx_11_0_arm64.whl (230.1 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

nanopy-28.0.1.post25-cp314-cp314t-macosx_10_15_x86_64.whl (219.3 kB view details)

Uploaded CPython 3.14tmacOS 10.15+ x86-64

nanopy-28.0.1.post25-cp310-abi3-win_arm64.whl (222.0 kB view details)

Uploaded CPython 3.10+Windows ARM64

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

Uploaded CPython 3.10+Windows x86-64

nanopy-28.0.1.post25-cp310-abi3-win32.whl (207.0 kB view details)

Uploaded CPython 3.10+Windows x86

nanopy-28.0.1.post25-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.post25-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.post25-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (539.9 kB view details)

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

nanopy-28.0.1.post25-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (378.6 kB view details)

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

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

Uploaded CPython 3.10+macOS 11.0+ ARM64

nanopy-28.0.1.post25-cp310-abi3-macosx_10_9_x86_64.whl (219.1 kB view details)

Uploaded CPython 3.10+macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: nanopy-28.0.1.post25.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.post25.tar.gz
Algorithm Hash digest
SHA256 8d1ce607588f309f155c3fdf22fa07e5e6ee80165ff035e18d65ddc5383528db
MD5 b78b4c24735c9080ee7d58ea5b5282ea
BLAKE2b-256 8d6c93fe1e46ebc0d9c1b77028956cfb6250b72eb2b2347f4c955a174f7777c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp314-cp314t-win_arm64.whl
Algorithm Hash digest
SHA256 d354ed0646514e1893f804aac7aaabd132a8bc4f0ba2402e03b2e0141a5c6446
MD5 ee624010ea13165673af16c427a8a7ec
BLAKE2b-256 5718f0c41192fe6be4db1e7342b14b2b7e64bd5e85afe0e66753b14f18a26f4d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 f5081c47d48b81d6cb73cceedd7c8691e92a256c1383e28e9efc6c1e60f6004c
MD5 29d7c024d8d69f55dc316797dbc72816
BLAKE2b-256 002d4bf9ab7c4423905fd877767f9ff074f02dc3c4a6d1fbb1bdc3f2799f9cc6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp314-cp314t-win32.whl
Algorithm Hash digest
SHA256 dfa2cb2ea19e3d870db0a8ef4af044135d8c5beebaa58e5c48560675b6325dd1
MD5 b5e6c8c8d5b4dfc3fe6efe56c4798988
BLAKE2b-256 3e8165672d6e04b7fc7862b54283efc7922a4b1628a776ec422aca59f5c6b34c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2dfc6964f025205e9c37114065d72f29f2f936c2ec9a002bddb4be4d685e7fd5
MD5 96a254e05bc3c310f18cf7a9d9a7d0f8
BLAKE2b-256 43f30091f378fdfa6b1353446a0af47e02f884718a5b6e2063ba5ab7fe2e688a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d37e9b9a4b339a2537f05d3ab414c4380b61a84266214cb0cf9674042a79e894
MD5 c4c56b6e2b4cdfcde7b31a8da1c6aea7
BLAKE2b-256 5b2e473752416a07a6be1b870cc3b087d1e95b569058b33f363067472e4c2b60

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post25-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.post25-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.post25-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3416bb179143220f7434b1d49c44db4702462b3d7369ba744e3b05d58629b7be
MD5 f1a25d79e95c22e7f318cb67cda35587
BLAKE2b-256 23efb8707a8fa46581de5f324f25dea9a2550dd34e36eed894acbd45e11fe85f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7597416906942c2de8608b9e07c65053e7f85fe6c1c10ed257b63e608475e0b6
MD5 7ce293e644cd8be0e2be3411c410ce8a
BLAKE2b-256 265cea9f03fc81046028f5fc07626fb5d974870fb917e1ae25177066587edf74

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c058e3a1b5321f9332569c16558106d161dd9ae118d6fedc385b5e03ffb2e94
MD5 eff0d80ae5801a73a5caa437d9c9fe4f
BLAKE2b-256 6b7f27a3abf93895128fc14a5ab1c533c30118b4b5a7b0d2be84b931d0d50274

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 0d247d05b55e19558044e2078fd99d2f8c65b7746b8d3080aef0ae0016029f83
MD5 ba34e61b0503da6ddacfbaed5b21d7a5
BLAKE2b-256 8b9348ee1649e9560a856e06549cce8ff55ca9bfaf7c52fd9690f85738e35b23

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 3db610394ff0dd37a42d7112b1934ba0930155415538e19949dbc0f5e491772f
MD5 693d0bee9c5d86e86ee40c5cdfbad890
BLAKE2b-256 53ec9f5e7039b378ee2e90e6d68ec93f39eb21d0d54b777b84653eb7b29e0c33

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b5940736cdc21ab8bd8901e1bb34f896e253b16ba6c66f5672c4cedcf8acfd77
MD5 b327e4b0f575e1fb8a46637f08462ba3
BLAKE2b-256 befd7c2f4b0c8156ea4f2e04abbc0670747628f38605e7cc9b748e92f197b1b5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: nanopy-28.0.1.post25-cp310-abi3-win32.whl
  • Upload date:
  • Size: 207.0 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.post25-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 f60fb2604bf4afef3c8d5298b82f01d8135dff8a46c3fac414af9df1931becce
MD5 ffbaae98d9ebcbe2bfa32f5b630516c3
BLAKE2b-256 b1386a7b56769eacb3f086c124b3e9f6a18e9310b79b73275d8ea78af24c4bb9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 21dbc6561eeb12a80aa0b5a0c75cc02c961e31d841ed69b978bce8c7927efa0c
MD5 b9045642d7cf0740a5ff79ad4f3ae447
BLAKE2b-256 574a8a8ee2dcbd242e53473d3b587babd395440b2ced446ee61c18f1e612a6f2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 745998d6bda505a2f7f2c7dd8d98bf8686e579c043129e720ded6d9287503310
MD5 952289bd4e20578370b27b152e19fb47
BLAKE2b-256 820a7cc6e91487842e72457b77da9cb61ce48a4d173871e9a017fdefdda14e51

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post25-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.post25-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.post25-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b44ae4c6ec832c32bdb9c34def4822ba80f5fefc2674e3f553df32d311c7fe5c
MD5 8b8adcbab11709e3d2c976754698e28d
BLAKE2b-256 e592b1e21c5358bb5cae2aac3cc8ac4ba09bd8cba5b778527ac4d40270533bd7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6f4766b371e325eb2d16e7efdd96f8e54215db791896c7c59ba323761f24f089
MD5 8d0cf3099df311c87123fee6fdd155f3
BLAKE2b-256 6e32b11006f4b7979b17097a9c10083a1cefae1cc771694456c8180d61a12aa0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f5274c4cb74497cd5909922344fb3b37474f79067d0a16cacc9269270806f41
MD5 8c018c4462990c4e78d93be709a59e43
BLAKE2b-256 8cdaafe5d43e64f574386d5348dd31e95383f880c363239168cf0a6a71c39b8b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post25-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 546019ccb041574e1f33180f2a2f323c7e25f7ac9a539daac3672078ee2468d4
MD5 e71ada9c0ea3bd5d58559c8b761575cf
BLAKE2b-256 40bb74e0f4a193a054a4543a398b8ad04e8de7cc358ff236f989c3044edd9ef4

See more details on using hashes here.

Provenance

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