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

Uploaded CPython 3.14tWindows ARM64

nanopy-28.0.1.post26-cp314-cp314t-win_amd64.whl (210.2 kB view details)

Uploaded CPython 3.14tWindows x86-64

nanopy-28.0.1.post26-cp314-cp314t-win32.whl (207.8 kB view details)

Uploaded CPython 3.14tWindows x86

nanopy-28.0.1.post26-cp314-cp314t-musllinux_1_2_x86_64.whl (523.9 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

nanopy-28.0.1.post26-cp314-cp314t-musllinux_1_2_aarch64.whl (381.0 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

nanopy-28.0.1.post26-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (543.0 kB view details)

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

nanopy-28.0.1.post26-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (381.6 kB view details)

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

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

Uploaded CPython 3.14tmacOS 11.0+ ARM64

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

Uploaded CPython 3.10+Windows ARM64

nanopy-28.0.1.post26-cp310-abi3-win_amd64.whl (209.3 kB view details)

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

nanopy-28.0.1.post26-cp310-abi3-musllinux_1_2_x86_64.whl (520.9 kB view details)

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

nanopy-28.0.1.post26-cp310-abi3-musllinux_1_2_aarch64.whl (378.1 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

nanopy-28.0.1.post26-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (540.2 kB view details)

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

nanopy-28.0.1.post26-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (378.9 kB view details)

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

nanopy-28.0.1.post26-cp310-abi3-macosx_11_0_arm64.whl (230.1 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

nanopy-28.0.1.post26-cp310-abi3-macosx_10_9_x86_64.whl (219.2 kB view details)

Uploaded CPython 3.10+macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: nanopy-28.0.1.post26.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.post26.tar.gz
Algorithm Hash digest
SHA256 e445f9d03023790a4515f73b1567ce10575a4d8cf654edf7c316273be39df6c7
MD5 36eec096b94ca19bba34f81a102c4fbf
BLAKE2b-256 e6a62a9ddfe97f9485a68a0ea87ebf4cf9352ee3a3fa34630c45c2d7a88f211d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp314-cp314t-win_arm64.whl
Algorithm Hash digest
SHA256 07cdca7fc36ed10e440567e36f97c525bc5ad03d87eca20e38fa664cde5f4061
MD5 4a974adba4938d2188a702747cdc9f8e
BLAKE2b-256 89548c557fc8a27960c5d78b7771e4171401e3afa11b17d8d27e708a65e87b8b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 d2894a18a29694a55a16bb47dbd4fc38e3c7ff0f2d254e77d9f1a67ad3e3faa0
MD5 6f2a9e816534d4b498739085467ffce7
BLAKE2b-256 cb1ec93f45c9cefd2daa5b6fbfa6ae730f93d17d523a279d4ae87973edb2d28d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp314-cp314t-win32.whl
Algorithm Hash digest
SHA256 694c9b5d9e09d831de2b10f1b8f5fc0643c127600e2860f96e855966285f82ae
MD5 9a93d7c1d5e588e5b5d4deccada3fa5b
BLAKE2b-256 afbc9123efa4cd4ab10e4665dbf70e5f51bd544117e011b650743c8ac67b2c20

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 644ed2aa385f0a8e17d1a8e94ce925d9ed539e29a7fc8a915cabedea9cad6dd8
MD5 4c8f17afa95f7f87dc48eeb2e142de21
BLAKE2b-256 688e0c9d7d502853fe8df189180c9be47f24fd6976de680c0bd91e19f0c70fb6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 f1fa2e158be424d117e1a3bee8897c17eec6633fdee976e3d0440dcc36f1fe37
MD5 6ef9876481fd1bebff84a361c725d698
BLAKE2b-256 b0e60d4a4a9161b0f47e7f7cea287cb6f01b72aff1887db6904d33817ac5fb60

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post26-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.post26-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.post26-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1f6520e9514b502abfc02d54f83901440b49722159dc35237d473badeacbac32
MD5 bda2107b0a60c08f62abb54146e4218f
BLAKE2b-256 670a3f73edf5e06292daf4aa1617a086f330a09dcc2d1f08765d64a0d94c1ce9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 cc4a316d1c8fd51f31f53fbc106e33b5d433c5f15dd01aff7977a99d0de9eea6
MD5 6b25eabb01f83fe0969210d410b80ddb
BLAKE2b-256 66e6ab3c1b38dc55dd6cbbd48f11c00036e3b5dcf770985689ced6871ebdd22d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e25d80d30db746d845ec77945274332437f3424600d7273a1c69e92d64a27e2a
MD5 aad24c3c493d392836ec304c5de85a85
BLAKE2b-256 87f06f170c6cc38a12862771d53be2ba568cbb2519b61b4ab2e61716bd21f38e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 22f8ae8018e834a8a7158cf109676898de3a737e74ed046287d20866c73913c7
MD5 f99d6026f0c50c3aec780188868381a3
BLAKE2b-256 ad3385bdc881fc02cde36b4100a36677fc2139945c541a645a303d7d8b5a4b52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 8a5c061457aafe0c906357ac2cca9518e3a53d317cfd3f08452f996f28696be6
MD5 2acf997a27b323b66ae5f0be94a79843
BLAKE2b-256 20c098ba4b34fcbd6fd2affcb1603c8301e806fa206a86993938e6c45a91031d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 54e57a0b45054566df118cc110a2bb6149c1427125aea2b06d90b25a8f3b67f5
MD5 29124a6c729c9e3848dfb5bc39e8d95c
BLAKE2b-256 8bb0b183cd545272c50cbe745ef591ca5814635f53986f414af1ecf5c329ddef

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: nanopy-28.0.1.post26-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.post26-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 4af0069c577295ffc798f3ae7d6189b315dc33fd81e279cc25d2c1df4bb13521
MD5 94615844131e4b034c8c47ac87bb4b88
BLAKE2b-256 dd6e27d3a710cb0dd0d7dfc1583c3ee072d509385433f5caa838e76e290061a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2dea409d5d2fddf41e48028115aff6f8069d57f89fb5aaba8ffaeb39c3372d1b
MD5 ef1e4830a46054bab214bbaa4c2505ff
BLAKE2b-256 0673c4427f561d912a9b0d0111ce14b62ea24c5b82965012599e72930186de4b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 8b25da10338f13e1f837fc50ddd5ed958f22e0f4c86bdc0e2d1571f6cdb4176f
MD5 43ef1dbb293281a3f9ae3f3b212b9244
BLAKE2b-256 38a762a7a0292f0866a2cbf4d73c37a896807c7acd9dcb77c0d624fcf5645fcb

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post26-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.post26-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.post26-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1a1225f3f3145818e8c8fd015b81138e58642f944d1181e8b91b4990906ecb2a
MD5 eb49d770f692d4ce1527f2634ea6b72e
BLAKE2b-256 97b27dfd452b2f477dc3379ab2cb6d695b02985fcb1464ff24a0c478670366bb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 25087d5b3b9d457c2f37ab8b73ca6322118a5d7a43d52d4302f96847324af6ce
MD5 c5cfaf4848372205f763566f797a8568
BLAKE2b-256 a7538662c8d30e81350d1d29499f9c45ddcedb1c3d2bed7deed114ef9fcc7d6e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 60b0ba9c1ddf48f2ea28db2f6a8a1a1be1dbb90d07ec8d21599ea9982908d56b
MD5 49e8edee107c40dfb119c80cf9ed6f2e
BLAKE2b-256 001a5e564b660c876cf00834572b9815adf83bf94b9caa2f12b76e4f51d2ccf8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post26-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9bfb58fc04a286d3dc7dec39bd29b6713ae4fed4bf4a81e2e182dc063719e7fa
MD5 dd18be994993de57bac201abf81681b2
BLAKE2b-256 28055aa78d3d0582c510f608a50f18454a04dcf5c940a65e912f0d4ab23bf61c

See more details on using hashes here.

Provenance

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