nerva-py 1.0.0b1__tar.gz → 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nerva_py-1.0.1/.github/workflows/build.yml +27 -0
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/.github/workflows/ruff.yml +9 -3
- nerva_py-1.0.1/Makefile +18 -0
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/PKG-INFO +3 -2
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/README.md +1 -0
- nerva_py-1.0.1/nerva/__init__.py +45 -0
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/nerva/__main__.py +2 -6
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/nerva/daemon.py +3 -3
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/pyproject.toml +6 -6
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/uv.lock +22 -22
- nerva_py-1.0.0b1/nerva/__init__.py +0 -22
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/.github/FUNDING.yml +0 -0
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/.github/workflows/publish.yml +0 -0
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/.gitignore +0 -0
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/.pre-commit-config.yaml +0 -0
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/.python-version +0 -0
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/LICENSE +0 -0
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/nerva/utils.py +0 -0
- {nerva_py-1.0.0b1 → nerva_py-1.0.1}/nerva/wallet.py +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: ci/gh-actions/build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
paths-ignore:
|
|
6
|
+
- "README.md"
|
|
7
|
+
pull_request:
|
|
8
|
+
paths-ignore:
|
|
9
|
+
- "README.md"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- name: Install uv
|
|
18
|
+
uses: astral-sh/setup-uv@v3
|
|
19
|
+
with:
|
|
20
|
+
version: "0.4.22"
|
|
21
|
+
enable-cache: true
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version-file: ".python-version"
|
|
26
|
+
- name: Build
|
|
27
|
+
run: uv build
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
name: ci/gh-actions/ruff
|
|
2
2
|
|
|
3
|
-
on:
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
paths-ignore:
|
|
6
|
+
- "README.md"
|
|
7
|
+
pull_request:
|
|
8
|
+
paths-ignore:
|
|
9
|
+
- "README.md"
|
|
10
|
+
workflow_dispatch:
|
|
4
11
|
|
|
5
12
|
jobs:
|
|
6
13
|
ruff:
|
|
@@ -15,8 +22,7 @@ jobs:
|
|
|
15
22
|
run: |
|
|
16
23
|
python -m pip install --upgrade pip
|
|
17
24
|
pip install ruff
|
|
18
|
-
|
|
19
|
-
- name: Run Ruff
|
|
25
|
+
- name: Lint
|
|
20
26
|
run: ruff check --select I --no-fix .
|
|
21
27
|
- name: Format
|
|
22
28
|
run: ruff format --check .
|
nerva_py-1.0.1/Makefile
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
env:
|
|
2
|
+
uv sync --no-dev
|
|
3
|
+
|
|
4
|
+
dev:
|
|
5
|
+
uv sync --all-extras
|
|
6
|
+
|
|
7
|
+
format:
|
|
8
|
+
ruff check --select I --fix .
|
|
9
|
+
ruff format .
|
|
10
|
+
|
|
11
|
+
build:
|
|
12
|
+
uv build
|
|
13
|
+
|
|
14
|
+
publish:
|
|
15
|
+
uv publish --token $(token)
|
|
16
|
+
|
|
17
|
+
.PHONY: env dev format build publish
|
|
18
|
+
.DEFAULT_GOAL := build
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: nerva-py
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: Python bindings for the JSON RPC interface of the Nerva cryptocurrency.
|
|
5
5
|
Author-email: Sayan Bhattacharyya <sayan@sn1f3rt.dev>
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
License-File: LICENSE
|
|
8
8
|
Keywords: bindings,cryptocurrency,json-rpc,nerva,python
|
|
9
|
-
Classifier: Development Status ::
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
10
|
Classifier: Intended Audience :: Developers
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
@@ -25,6 +25,7 @@ Description-Content-Type: text/markdown
|
|
|
25
25
|
# Nerva Python Library
|
|
26
26
|
|
|
27
27
|
[](https://github.com/Sn1F3rt/nerva-py/actions/workflows/ruff.yml)
|
|
28
|
+
[](https://github.com/Sn1F3rt/nerva-py/actions/workflows/build.yml)
|
|
28
29
|
[](LICENSE)
|
|
29
30
|
|
|
30
31
|
## Table of Contents
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Nerva Python Library
|
|
2
2
|
|
|
3
3
|
[](https://github.com/Sn1F3rt/nerva-py/actions/workflows/ruff.yml)
|
|
4
|
+
[](https://github.com/Sn1F3rt/nerva-py/actions/workflows/build.yml)
|
|
4
5
|
[](LICENSE)
|
|
5
6
|
|
|
6
7
|
## Table of Contents
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from typing import Literal, NamedTuple
|
|
2
|
+
|
|
3
|
+
from . import (
|
|
4
|
+
utils as utils,
|
|
5
|
+
daemon as daemon,
|
|
6
|
+
wallet as wallet,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class VersionInfo(NamedTuple):
|
|
11
|
+
major: int
|
|
12
|
+
minor: int
|
|
13
|
+
micro: int
|
|
14
|
+
releaselevel: Literal[
|
|
15
|
+
"alpha", "beta", "release-candidate", "post", "dev", "final"
|
|
16
|
+
]
|
|
17
|
+
serial: int
|
|
18
|
+
|
|
19
|
+
def __str__(self) -> str:
|
|
20
|
+
v = f"{version_info.major}.{version_info.minor}.{version_info.micro}"
|
|
21
|
+
|
|
22
|
+
if version_info.releaselevel != "final":
|
|
23
|
+
if version_info.releaselevel == "alpha":
|
|
24
|
+
v += "a"
|
|
25
|
+
elif version_info.releaselevel == "beta":
|
|
26
|
+
v += "b"
|
|
27
|
+
elif version_info.releaselevel == "release-candidate":
|
|
28
|
+
v += "rc"
|
|
29
|
+
elif version_info.releaselevel == "post":
|
|
30
|
+
v += "post"
|
|
31
|
+
elif version_info.releaselevel == "dev":
|
|
32
|
+
v += "dev"
|
|
33
|
+
|
|
34
|
+
v += str(version_info.serial)
|
|
35
|
+
|
|
36
|
+
return v
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
version_info: VersionInfo = VersionInfo(
|
|
40
|
+
major=1, minor=0, micro=1, releaselevel="final", serial=0
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
__version__ = str(version_info)
|
|
44
|
+
|
|
45
|
+
del NamedTuple, Literal, VersionInfo
|
|
@@ -13,14 +13,10 @@ def show_version() -> None:
|
|
|
13
13
|
v = sys.version_info
|
|
14
14
|
entries.append(
|
|
15
15
|
f"- Python v{v.major}.{v.minor}.{v.micro}"
|
|
16
|
-
+ (f"-{v.releaselevel}" if v.releaselevel != "final" else "")
|
|
16
|
+
+ (f"-{v.releaselevel}{v.serial}" if v.releaselevel != "final" else "")
|
|
17
17
|
)
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
entries.append(
|
|
21
|
-
f"- pyxnv v{v.major}.{v.minor}.{v.micro}"
|
|
22
|
-
+ (f"{v.releaselevel[0]}{v.serial}" if v.releaselevel != "final" else "")
|
|
23
|
-
)
|
|
19
|
+
entries.append(f"- nerva-py v{nerva.__version__}")
|
|
24
20
|
|
|
25
21
|
entries.append(f"- aiohttp v{aiohttp.__version__}")
|
|
26
22
|
|
|
@@ -4,10 +4,10 @@ from typing import Any, Dict, List, Optional
|
|
|
4
4
|
|
|
5
5
|
import aiohttp
|
|
6
6
|
|
|
7
|
-
__all__ = ["
|
|
7
|
+
__all__ = ["DaemonRPC", "DaemonLegacy"]
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class
|
|
10
|
+
class DaemonRPC:
|
|
11
11
|
"""
|
|
12
12
|
A class to interact with the Nerva daemon's JSON-RPC interface.
|
|
13
13
|
|
|
@@ -634,7 +634,7 @@ class DaemonJSONRPC:
|
|
|
634
634
|
return await self._request("add_peer", {"host": host})
|
|
635
635
|
|
|
636
636
|
|
|
637
|
-
class
|
|
637
|
+
class DaemonLegacy:
|
|
638
638
|
"""
|
|
639
639
|
A class to interact with the Nerva daemon's independent endpoint methods.
|
|
640
640
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "nerva-py"
|
|
3
|
-
version = "1.0.
|
|
3
|
+
version = "1.0.1"
|
|
4
4
|
description = "Python bindings for the JSON RPC interface of the Nerva cryptocurrency."
|
|
5
5
|
license = "MIT"
|
|
6
6
|
authors = [
|
|
@@ -13,7 +13,7 @@ repository = "https://github.com/Sn1F3rt/nerva-py"
|
|
|
13
13
|
documentation = "https://github.com/Sn1F3rt/nerva-py?tab=readme-ov-file#documentation"
|
|
14
14
|
keywords = ["nerva", "cryptocurrency", "json-rpc", "bindings", "python"]
|
|
15
15
|
classifiers = [
|
|
16
|
-
"Development Status ::
|
|
16
|
+
"Development Status :: 5 - Production/Stable",
|
|
17
17
|
"Intended Audience :: Developers",
|
|
18
18
|
"License :: OSI Approved :: MIT License",
|
|
19
19
|
"Programming Language :: Python :: 3",
|
|
@@ -30,15 +30,15 @@ dependencies = [
|
|
|
30
30
|
"aiohttp>=3.10.10",
|
|
31
31
|
]
|
|
32
32
|
|
|
33
|
-
[tool.hatch.build.targets.wheel]
|
|
34
|
-
packages = ["nerva"]
|
|
35
|
-
|
|
36
33
|
[tool.uv]
|
|
37
34
|
dev-dependencies = [
|
|
38
35
|
"pre-commit>=3.5.0",
|
|
39
|
-
"ruff>=0.
|
|
36
|
+
"ruff>=0.7.0",
|
|
40
37
|
]
|
|
41
38
|
|
|
39
|
+
[tool.hatch.build.targets.wheel]
|
|
40
|
+
packages = ["nerva"]
|
|
41
|
+
|
|
42
42
|
[build-system]
|
|
43
43
|
requires = ["hatchling"]
|
|
44
44
|
build-backend = "hatchling.build"
|
|
@@ -380,7 +380,7 @@ wheels = [
|
|
|
380
380
|
|
|
381
381
|
[[package]]
|
|
382
382
|
name = "nerva-py"
|
|
383
|
-
version = "1.0.
|
|
383
|
+
version = "1.0.0b1"
|
|
384
384
|
source = { editable = "." }
|
|
385
385
|
dependencies = [
|
|
386
386
|
{ name = "aiohttp" },
|
|
@@ -397,8 +397,8 @@ requires-dist = [{ name = "aiohttp", specifier = ">=3.10.10" }]
|
|
|
397
397
|
|
|
398
398
|
[package.metadata.requires-dev]
|
|
399
399
|
dev = [
|
|
400
|
-
{ name = "pre-commit" },
|
|
401
|
-
{ name = "ruff", specifier = ">=0.
|
|
400
|
+
{ name = "pre-commit", specifier = ">=3.5.0" },
|
|
401
|
+
{ name = "ruff", specifier = ">=0.7.0" },
|
|
402
402
|
]
|
|
403
403
|
|
|
404
404
|
[[package]]
|
|
@@ -602,27 +602,27 @@ wheels = [
|
|
|
602
602
|
|
|
603
603
|
[[package]]
|
|
604
604
|
name = "ruff"
|
|
605
|
-
version = "0.
|
|
605
|
+
version = "0.7.0"
|
|
606
606
|
source = { registry = "https://pypi.org/simple" }
|
|
607
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
607
|
+
sdist = { url = "https://files.pythonhosted.org/packages/2c/c7/f3367d1da5d568192968c5c9e7f3d51fb317b9ac04828493b23d8fce8ce6/ruff-0.7.0.tar.gz", hash = "sha256:47a86360cf62d9cd53ebfb0b5eb0e882193fc191c6d717e8bef4462bc3b9ea2b", size = 3146645 }
|
|
608
608
|
wheels = [
|
|
609
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
610
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
611
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
612
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
613
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
614
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
615
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
616
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
617
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
618
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
619
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
620
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
621
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
622
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
623
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
624
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
625
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
609
|
+
{ url = "https://files.pythonhosted.org/packages/48/59/a0275a0913f3539498d116046dd679cd657fe3b7caf5afe1733319414932/ruff-0.7.0-py3-none-linux_armv6l.whl", hash = "sha256:0cdf20c2b6ff98e37df47b2b0bd3a34aaa155f59a11182c1303cce79be715628", size = 10434007 },
|
|
610
|
+
{ url = "https://files.pythonhosted.org/packages/cd/94/da0ba5f956d04c90dd899209904210600009dcda039ce840d83eb4298c7d/ruff-0.7.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:496494d350c7fdeb36ca4ef1c9f21d80d182423718782222c29b3e72b3512737", size = 10048066 },
|
|
611
|
+
{ url = "https://files.pythonhosted.org/packages/57/1d/e5cc149ecc46e4f203403a79ccd170fad52d316f98b87d0f63b1945567db/ruff-0.7.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:214b88498684e20b6b2b8852c01d50f0651f3cc6118dfa113b4def9f14faaf06", size = 9711389 },
|
|
612
|
+
{ url = "https://files.pythonhosted.org/packages/05/67/fb7ea2c869c539725a16c5bc294e9aa34f8b1b6fe702f1d173a5da517c2b/ruff-0.7.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:630fce3fefe9844e91ea5bbf7ceadab4f9981f42b704fae011bb8efcaf5d84be", size = 10755174 },
|
|
613
|
+
{ url = "https://files.pythonhosted.org/packages/5f/f0/13703bc50536a0613ea3dce991116e5f0917a1f05528c6ab738b33c08d3f/ruff-0.7.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:211d877674e9373d4bb0f1c80f97a0201c61bcd1e9d045b6e9726adc42c156aa", size = 10196040 },
|
|
614
|
+
{ url = "https://files.pythonhosted.org/packages/99/c1/77b04ab20324ab03d333522ee55fb0f1c38e3ca0d326b4905f82ce6b6c70/ruff-0.7.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:194d6c46c98c73949a106425ed40a576f52291c12bc21399eb8f13a0f7073495", size = 11033684 },
|
|
615
|
+
{ url = "https://files.pythonhosted.org/packages/f2/97/f463334dc4efeea3551cd109163df15561c18a1c3ec13d51643740fd36ba/ruff-0.7.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:82c2579b82b9973a110fab281860403b397c08c403de92de19568f32f7178598", size = 11803700 },
|
|
616
|
+
{ url = "https://files.pythonhosted.org/packages/b4/f8/a31d40c4bb92933d376a53e7c5d0245d9b27841357e4820e96d38f54b480/ruff-0.7.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9af971fe85dcd5eaed8f585ddbc6bdbe8c217fb8fcf510ea6bca5bdfff56040e", size = 11347848 },
|
|
617
|
+
{ url = "https://files.pythonhosted.org/packages/83/62/0c133b35ddaf91c65c30a56718b80bdef36bfffc35684d29e3a4878e0ea3/ruff-0.7.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b641c7f16939b7d24b7bfc0be4102c56562a18281f84f635604e8a6989948914", size = 12480632 },
|
|
618
|
+
{ url = "https://files.pythonhosted.org/packages/46/96/464058dd1d980014fb5aa0a1254e78799efb3096fc7a4823cd66a1621276/ruff-0.7.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d71672336e46b34e0c90a790afeac8a31954fd42872c1f6adaea1dff76fd44f9", size = 10941919 },
|
|
619
|
+
{ url = "https://files.pythonhosted.org/packages/a0/f7/bda37ec77986a435dde44e1f59374aebf4282a5fa9cf17735315b847141f/ruff-0.7.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:ab7d98c7eed355166f367597e513a6c82408df4181a937628dbec79abb2a1fe4", size = 10745519 },
|
|
620
|
+
{ url = "https://files.pythonhosted.org/packages/c2/33/5f77fc317027c057b61a848020a47442a1cbf12e592df0e41e21f4d0f3bd/ruff-0.7.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:1eb54986f770f49edb14f71d33312d79e00e629a57387382200b1ef12d6a4ef9", size = 10284872 },
|
|
621
|
+
{ url = "https://files.pythonhosted.org/packages/ff/50/98aec292bc9537f640b8d031c55f3414bf15b6ed13b3e943fed75ac927b9/ruff-0.7.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:dc452ba6f2bb9cf8726a84aa877061a2462afe9ae0ea1d411c53d226661c601d", size = 10600334 },
|
|
622
|
+
{ url = "https://files.pythonhosted.org/packages/f2/85/12607ae3201423a179b8cfadc7cb1e57d02cd0135e45bd0445acb4cef327/ruff-0.7.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:4b406c2dce5be9bad59f2de26139a86017a517e6bcd2688da515481c05a2cb11", size = 11017333 },
|
|
623
|
+
{ url = "https://files.pythonhosted.org/packages/d4/7f/3b85a56879e705d5f46ec14daf8a439fca05c3081720fe3dc3209100922d/ruff-0.7.0-py3-none-win32.whl", hash = "sha256:f6c968509f767776f524a8430426539587d5ec5c662f6addb6aa25bc2e8195ec", size = 8570962 },
|
|
624
|
+
{ url = "https://files.pythonhosted.org/packages/39/9f/c5ee2b40d377354dabcc23cff47eb299de4b4d06d345068f8f8cc1eadac8/ruff-0.7.0-py3-none-win_amd64.whl", hash = "sha256:ff4aabfbaaba880e85d394603b9e75d32b0693152e16fa659a3064a85df7fce2", size = 9365544 },
|
|
625
|
+
{ url = "https://files.pythonhosted.org/packages/89/8b/ee1509f60148cecba644aa718f6633216784302458340311898aaf0b1bed/ruff-0.7.0-py3-none-win_arm64.whl", hash = "sha256:10842f69c245e78d6adec7e1db0a7d9ddc2fff0621d730e61657b64fa36f207e", size = 8695763 },
|
|
626
626
|
]
|
|
627
627
|
|
|
628
628
|
[[package]]
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
from typing import Literal, NamedTuple
|
|
2
|
-
|
|
3
|
-
from . import (
|
|
4
|
-
utils as utils,
|
|
5
|
-
daemon as daemon,
|
|
6
|
-
wallet as wallet,
|
|
7
|
-
)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class VersionInfo(NamedTuple):
|
|
11
|
-
major: int
|
|
12
|
-
minor: int
|
|
13
|
-
micro: int
|
|
14
|
-
releaselevel: Literal["alpha", "beta", "final"]
|
|
15
|
-
serial: int
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
version_info: VersionInfo = VersionInfo(
|
|
19
|
-
major=1, minor=0, micro=0, releaselevel="beta", serial=1
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
del NamedTuple, Literal, VersionInfo
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|