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

Uploaded CPython 3.14tWindows ARM64

nanopy-28.0.1.post22-cp314-cp314t-win_amd64.whl (210.0 kB view details)

Uploaded CPython 3.14tWindows x86-64

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

Uploaded CPython 3.14tWindows x86

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

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

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

Uploaded CPython 3.14tmacOS 11.0+ ARM64

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

Uploaded CPython 3.10+Windows ARM64

nanopy-28.0.1.post22-cp310-abi3-win_amd64.whl (209.1 kB view details)

Uploaded CPython 3.10+Windows x86-64

nanopy-28.0.1.post22-cp310-abi3-win32.whl (206.8 kB view details)

Uploaded CPython 3.10+Windows x86

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

Uploaded CPython 3.10+macOS 11.0+ ARM64

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

File metadata

  • Download URL: nanopy-28.0.1.post22.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.post22.tar.gz
Algorithm Hash digest
SHA256 354df3a38247ee4dde4d774ecf4b6bc4339464b6c94106bcbae7463cdf08e508
MD5 20e2f9d98fc61a0ceaec9ec0fc10b016
BLAKE2b-256 d293bd593ed4166eb5cf3627e972036a01bd0ea064fd6daf63ffa801dadb80a4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp314-cp314t-win_arm64.whl
Algorithm Hash digest
SHA256 846f380ecdbd659c2375c325dd2abc449abaf879a50543606719591fe722a336
MD5 03059cd45618362ea4552c05d3e7fe09
BLAKE2b-256 b57b95aac4082dd83a2741f4aafa8f2f56ef07b52bda5ad4358567348fbc8826

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 6ee90e2a44801e29ae83dd12fc4bbed8673443abffb9470fb5771cfbe1e482c3
MD5 a2128fd4cedd78f013daf7d2de3cfb47
BLAKE2b-256 fcabe33c95d76cbacf87b43e84b8c1ae3f8278aeb55b7632ccc342023dd05b8d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp314-cp314t-win32.whl
Algorithm Hash digest
SHA256 a0ea6d706d61ac22332a6be00bb4e31eceb433019b91866a860b8045d4b36071
MD5 8b9a9b75f4c0943a6d4de9dc182ed435
BLAKE2b-256 3370765427dbcb4ce447ede94d957a521af54e86d35d99ed7c6654b93938b2e5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3c7b7f878c8a0fc2a683ea8dcdb09fe7de25d81fcc58456993dd33f4ec02c50d
MD5 dd07346b8368cb8e87465fed902065d6
BLAKE2b-256 0c4a902c3b507dd249aeff4fd4f96adc4126163e4c232a8abbbd728da8142e5f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 650f34f85e223a6d3c38c87cb474956c10dce8e1d1acf81e737634a0cb43ba03
MD5 76a0c38be680e9ba5420a13419dc9a07
BLAKE2b-256 8bbc0925b71d4173be03029eaf15e9f4998565a935102f924820770a50c80c8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post22-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.post22-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.post22-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d27f01f621ad6460298c1e4ec800158d789e64cc911b20a11bc133c0a5d672b3
MD5 b71d62a446b76f17501064545f316e7b
BLAKE2b-256 46c5a2911e9deadc1966330551e848783e671e64acbb9b48f631319dfad2234e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0ff44b8c1bc961ef5ab0628d2bd4f10fc4a979cd37da58df90920ec316f0cfb8
MD5 b8f7c8c35c4d18416f17ff3c8bb7c348
BLAKE2b-256 8f5285402f47e7e891bce686d8651a7e8241ba39d326e84fcd9932c27ab04f6d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 739d19fa93abb2862c1e14a8836570f1999724c401c88f0b8e940290189a047d
MD5 51da2e833779f50dd35f05fcdf57e3cb
BLAKE2b-256 5860dc875ade91f27efe71c68e5017a9ac8b67df8ccc8c8e3f5372bb68e0af8d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 9e6d7a9cb9568a5be573c01f7f05a78499710781005ed13894b0582da87a5b28
MD5 442fbe190ccb6a0d032dd7dfb7292ad6
BLAKE2b-256 f902c1108a57df4c2472977e19b0fb915b123d46d22f40839f4910ab0a392228

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 fa8968500e5d466c00420462a075d917b57eca111f8a742355d5f4b5fdd80448
MD5 1ea290dd40b7b7fc12d97e6f5966ef53
BLAKE2b-256 344d44c63eda09870a93f27538f6f976d2e51c671b205141fa9d65cd170249a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8d439194b9135a3eab988036fd49ea9983e00ce5e4814ca5b9517296150e74d7
MD5 53dc475b60c2d8892b1bad461935c5a0
BLAKE2b-256 d3151d55888880efb5220338b0f33a577e4872c259e6b19c6227a6921b0f9373

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: nanopy-28.0.1.post22-cp310-abi3-win32.whl
  • Upload date:
  • Size: 206.8 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.post22-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 59f67fda3aa9bfb91417e7544b5356cb2ff2900e4bbdb109226cce83e1fa28e6
MD5 27231236a22e80f0f96d18a8db5f9c96
BLAKE2b-256 c87c8388d3f7a99ea9d630c3912eb2f1b407758b11fb45e8c3ca7b8e967a9e00

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d7252452ba956999d96afc9e998ad72b10f0b524f8cb42ff4c602dce64dc03aa
MD5 4dc0e897a8ff9d91c77858d92c7f8e0b
BLAKE2b-256 5659df406046ad948cf038c508f497644308437d36302adc09bb580794d6a84d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 abec983d83364fbf71bb4dcd5accbf03cc728948d442ce739b7708b9232a5379
MD5 a078a2c8bc47852ccd28c85ce1f95bcc
BLAKE2b-256 224c0b394a9659023a986d3ef900161db6e993a7a0dbfb3a5d0d298251af1618

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopy-28.0.1.post22-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.post22-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.post22-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4bee683b009c6b0bc5ead75cbb74cf05720d09f476bc46ac5c344b9cc58dbf85
MD5 16e417706b9cecf3f50f73f2dc004e4a
BLAKE2b-256 4fb2f33422b17948eea88bea5c3e8c3a5752665d706252e586d390d868c8513c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5603fadf3171366f0bf6511cb1e70b0169f28843d5097c1730af10df974be65d
MD5 2c8a702dcea316230708ad2dcfe3d2b1
BLAKE2b-256 62a23917948f69d11109e49041af258597b51b98c83b2f0cf4385eb030189136

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 292dc8912c146c22c14227d115283f06ceb42edfffa4c373745605a64fd6b62f
MD5 741ae4c262b0dc5a1d201c71ae37a6fc
BLAKE2b-256 491bd4b3ca0d580138491526b04c8145dee633fc4dde320c5ddf7b315d149a71

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nanopy-28.0.1.post22-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1085c2d705e7d8ae88e31a6a848610f0ff9bc2336be2682c52647b3998d87988
MD5 997445546532d7183df7a54c2cbff869
BLAKE2b-256 e7fc7fee1a5f5ea04dfc211f31af30ada0cf7e865c919ea0a23ae08d35b19b7f

See more details on using hashes here.

Provenance

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