pollyweb-cli 0.1.dev3__tar.gz → 0.1.8__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.
Files changed (22) hide show
  1. pollyweb_cli-0.1.8/.github/workflows/publish.yml +81 -0
  2. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/PKG-INFO +5 -3
  3. pollyweb_cli-0.1.8/README.md +5 -0
  4. pollyweb_cli-0.1.8/dist/pollyweb_cli-0.1.dev3-py3-none-any.whl +0 -0
  5. pollyweb_cli-0.1.8/dist/pollyweb_cli-0.1.dev3.tar.gz +0 -0
  6. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/docs/install.md +2 -0
  7. pollyweb_cli-0.1.8/docs/usage.md +20 -0
  8. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/pyproject.toml +2 -2
  9. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/src/pollyweb_cli/cli.py +2 -18
  10. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/src/pollyweb_cli.egg-info/PKG-INFO +5 -3
  11. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/src/pollyweb_cli.egg-info/SOURCES.txt +3 -0
  12. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/src/pollyweb_cli.egg-info/requires.txt +1 -1
  13. pollyweb_cli-0.1.dev3/README.md +0 -3
  14. pollyweb_cli-0.1.dev3/docs/usage.md +0 -18
  15. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/.gitignore +0 -0
  16. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/MANIFEST.in +0 -0
  17. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/setup.cfg +0 -0
  18. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/src/pollyweb_cli/__init__.py +0 -0
  19. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/src/pollyweb_cli.egg-info/dependency_links.txt +0 -0
  20. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/src/pollyweb_cli.egg-info/entry_points.txt +0 -0
  21. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/src/pollyweb_cli.egg-info/top_level.txt +0 -0
  22. {pollyweb_cli-0.1.dev3 → pollyweb_cli-0.1.8}/tests/test_cli.py +0 -0
@@ -0,0 +1,81 @@
1
+ name: Test and publish
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - "**"
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ python-version: ["3.10", "3.11", "3.12"]
16
+
17
+ steps:
18
+ - name: Check out repository
19
+ uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+
28
+ - name: Install package and test dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ python -m pip install .[dev]
32
+
33
+ - name: Run test suite
34
+ run: python -m pytest
35
+
36
+ publish:
37
+ needs: test
38
+ runs-on: ubuntu-latest
39
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
40
+ environment:
41
+ name: pypi
42
+ permissions:
43
+ contents: read
44
+ id-token: write
45
+
46
+ steps:
47
+ - name: Check out repository
48
+ uses: actions/checkout@v4
49
+ with:
50
+ fetch-depth: 0
51
+
52
+ - name: Set up Python
53
+ uses: actions/setup-python@v5
54
+ with:
55
+ python-version: "3.12"
56
+
57
+ - name: Build distribution artifacts
58
+ run: |
59
+ python -m pip install --upgrade pip build
60
+ BASE_TAG="$(git describe --tags --abbrev=0 --match 'v*' 2>/dev/null || true)"
61
+ if [ -z "$BASE_TAG" ]; then
62
+ BASE_VERSION="0.1.0"
63
+ DISTANCE="$(git rev-list HEAD --count)"
64
+ else
65
+ BASE_VERSION="${BASE_TAG#v}"
66
+ DISTANCE="$(git rev-list "${BASE_TAG}..HEAD" --count)"
67
+ fi
68
+ IFS='.' read -r MAJOR MINOR PATCH <<EOF
69
+ $BASE_VERSION
70
+ EOF
71
+ if [ "$DISTANCE" -eq 0 ]; then
72
+ VERSION="$BASE_VERSION"
73
+ else
74
+ VERSION="${MAJOR}.${MINOR}.$((PATCH + DISTANCE))"
75
+ fi
76
+ echo "Publishing version ${VERSION}"
77
+ export SETUPTOOLS_SCM_PRETEND_VERSION="$VERSION"
78
+ python -m build
79
+
80
+ - name: Publish to PyPI
81
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pollyweb-cli
3
- Version: 0.1.dev3
3
+ Version: 0.1.8
4
4
  Summary: Command line wallet tooling built on the pollyweb library.
5
5
  Project-URL: Homepage, https://pypi.org/project/pollyweb-cli/
6
- Project-URL: Source, https://github.com/jorgemf/wallet-cli
6
+ Project-URL: Source, https://github.com/pollycore/wallet-cli
7
7
  Requires-Python: >=3.10
8
8
  Description-Content-Type: text/markdown
9
- Requires-Dist: pollyweb==1.0.4
9
+ Requires-Dist: pollyweb==1.0.5
10
10
  Provides-Extra: dev
11
11
  Requires-Dist: build>=1.2; extra == "dev"
12
12
  Requires-Dist: pytest>=8.0; extra == "dev"
@@ -14,3 +14,5 @@ Requires-Dist: pytest>=8.0; extra == "dev"
14
14
  # pollyweb-cli
15
15
 
16
16
  Command line wallet tooling built on top of the `pollyweb` Python package.
17
+
18
+ The `pw config` command generates a `pollyweb.KeyPair` and writes `private.pem` and `public.pem` using the library's PEM export helpers.
@@ -0,0 +1,5 @@
1
+ # pollyweb-cli
2
+
3
+ Command line wallet tooling built on top of the `pollyweb` Python package.
4
+
5
+ The `pw config` command generates a `pollyweb.KeyPair` and writes `private.pem` and `public.pem` using the library's PEM export helpers.
@@ -12,6 +12,8 @@ You can also install it globally with `pip`:
12
12
  python3 -m pip install pollyweb-cli
13
13
  ```
14
14
 
15
+ The CLI depends on the `pollyweb` package for key generation and PEM export. You do not need to install or use `cryptography` serialization APIs directly when using `pw config`.
16
+
15
17
  If you want to install from a local checkout of this repository instead, run the commands from the repository root. In that case, `.` means "this folder":
16
18
 
17
19
  ```bash
@@ -0,0 +1,20 @@
1
+ # Usage
2
+
3
+ Create your PollyWeb key pair:
4
+
5
+ ```bash
6
+ pw config
7
+ ```
8
+
9
+ This creates a new `pollyweb.KeyPair` and writes its PEM output to:
10
+
11
+ - `~/.pollyweb/private.pem`
12
+ - `~/.pollyweb/public.pem`
13
+
14
+ The CLI uses `KeyPair.private_pem_bytes()` and `KeyPair.public_pem_bytes()` internally, so consumers do not need to handle PEM serialization themselves.
15
+
16
+ Overwrite an existing key pair:
17
+
18
+ ```bash
19
+ pw config --force
20
+ ```
@@ -9,12 +9,12 @@ description = "Command line wallet tooling built on the pollyweb library."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  dependencies = [
12
- "pollyweb==1.0.4",
12
+ "pollyweb==1.0.5",
13
13
  ]
14
14
 
15
15
  [project.urls]
16
16
  "Homepage" = "https://pypi.org/project/pollyweb-cli/"
17
- "Source" = "https://github.com/jorgemf/wallet-cli"
17
+ "Source" = "https://github.com/pollycore/wallet-cli"
18
18
 
19
19
  [project.optional-dependencies]
20
20
  dev = [
@@ -5,12 +5,6 @@ import sys
5
5
  from pathlib import Path
6
6
 
7
7
  from pollyweb import KeyPair
8
- from cryptography.hazmat.primitives.serialization import (
9
- Encoding,
10
- NoEncryption,
11
- PrivateFormat,
12
- PublicFormat,
13
- )
14
8
 
15
9
 
16
10
  CONFIG_DIR = Path.home() / ".pollyweb"
@@ -49,18 +43,8 @@ def cmd_config(force: bool) -> int:
49
43
  CONFIG_DIR.mkdir(mode=0o700, parents=True, exist_ok=True)
50
44
 
51
45
  key_pair = KeyPair()
52
- private_pem = key_pair.PrivateKey.private_bytes(
53
- encoding=Encoding.PEM,
54
- format=PrivateFormat.PKCS8,
55
- encryption_algorithm=NoEncryption(),
56
- )
57
- public_pem = key_pair.PublicKey.public_bytes(
58
- encoding=Encoding.PEM,
59
- format=PublicFormat.SubjectPublicKeyInfo,
60
- )
61
-
62
- PRIVATE_KEY_PATH.write_bytes(private_pem)
63
- PUBLIC_KEY_PATH.write_bytes(public_pem)
46
+ PRIVATE_KEY_PATH.write_bytes(key_pair.private_pem_bytes())
47
+ PUBLIC_KEY_PATH.write_bytes(key_pair.public_pem_bytes())
64
48
  PRIVATE_KEY_PATH.chmod(0o600)
65
49
  PUBLIC_KEY_PATH.chmod(0o644)
66
50
 
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pollyweb-cli
3
- Version: 0.1.dev3
3
+ Version: 0.1.8
4
4
  Summary: Command line wallet tooling built on the pollyweb library.
5
5
  Project-URL: Homepage, https://pypi.org/project/pollyweb-cli/
6
- Project-URL: Source, https://github.com/jorgemf/wallet-cli
6
+ Project-URL: Source, https://github.com/pollycore/wallet-cli
7
7
  Requires-Python: >=3.10
8
8
  Description-Content-Type: text/markdown
9
- Requires-Dist: pollyweb==1.0.4
9
+ Requires-Dist: pollyweb==1.0.5
10
10
  Provides-Extra: dev
11
11
  Requires-Dist: build>=1.2; extra == "dev"
12
12
  Requires-Dist: pytest>=8.0; extra == "dev"
@@ -14,3 +14,5 @@ Requires-Dist: pytest>=8.0; extra == "dev"
14
14
  # pollyweb-cli
15
15
 
16
16
  Command line wallet tooling built on top of the `pollyweb` Python package.
17
+
18
+ The `pw config` command generates a `pollyweb.KeyPair` and writes `private.pem` and `public.pem` using the library's PEM export helpers.
@@ -2,6 +2,9 @@
2
2
  MANIFEST.in
3
3
  README.md
4
4
  pyproject.toml
5
+ .github/workflows/publish.yml
6
+ dist/pollyweb_cli-0.1.dev3-py3-none-any.whl
7
+ dist/pollyweb_cli-0.1.dev3.tar.gz
5
8
  docs/install.md
6
9
  docs/usage.md
7
10
  src/pollyweb_cli/__init__.py
@@ -1,4 +1,4 @@
1
- pollyweb==1.0.4
1
+ pollyweb==1.0.5
2
2
 
3
3
  [dev]
4
4
  build>=1.2
@@ -1,3 +0,0 @@
1
- # pollyweb-cli
2
-
3
- Command line wallet tooling built on top of the `pollyweb` Python package.
@@ -1,18 +0,0 @@
1
- # Usage
2
-
3
- Create your PollyWeb key pair:
4
-
5
- ```bash
6
- pw config
7
- ```
8
-
9
- This creates:
10
-
11
- - `~/.pollyweb/private.pem`
12
- - `~/.pollyweb/public.pem`
13
-
14
- Overwrite an existing key pair:
15
-
16
- ```bash
17
- pw config --force
18
- ```
File without changes
File without changes