rpgp-py 0.19.0__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 (37) hide show
  1. rpgp_py-0.19.0/.github/workflows/publish-pypi.yml +175 -0
  2. rpgp_py-0.19.0/.gitignore +211 -0
  3. rpgp_py-0.19.0/.python-version +1 -0
  4. rpgp_py-0.19.0/Cargo.lock +1771 -0
  5. rpgp_py-0.19.0/Cargo.toml +16 -0
  6. rpgp_py-0.19.0/LICENSE +21 -0
  7. rpgp_py-0.19.0/PKG-INFO +306 -0
  8. rpgp_py-0.19.0/README.md +297 -0
  9. rpgp_py-0.19.0/docs/benchmarks/median-runtime.svg +94 -0
  10. rpgp_py-0.19.0/docs/benchmarks/password-runtime.svg +67 -0
  11. rpgp_py-0.19.0/docs/benchmarks/results.json +313 -0
  12. rpgp_py-0.19.0/justfile +28 -0
  13. rpgp_py-0.19.0/prek.toml +55 -0
  14. rpgp_py-0.19.0/pyproject.toml +132 -0
  15. rpgp_py-0.19.0/scripts/benchmark.py +455 -0
  16. rpgp_py-0.19.0/src/lib.rs +3575 -0
  17. rpgp_py-0.19.0/src/openpgp/__init__.py +65 -0
  18. rpgp_py-0.19.0/src/openpgp/_openpgp.pyi +584 -0
  19. rpgp_py-0.19.0/src/openpgp/py.typed +0 -0
  20. rpgp_py-0.19.0/tests/fixtures/clearsig-2-keys-1.asc +20 -0
  21. rpgp_py-0.19.0/tests/fixtures/cleartext-key-01.asc +82 -0
  22. rpgp_py-0.19.0/tests/fixtures/ed25519-cv25519-sample-1.asc +21 -0
  23. rpgp_py-0.19.0/tests/fixtures/openpgp-interop/gnupg-v1-001-decrypt.asc +34 -0
  24. rpgp_py-0.19.0/tests/fixtures/openpgp-interop/gnupg-v1-001-verify.asc +19 -0
  25. rpgp_py-0.19.0/tests/fixtures/openpgp-interop/gnupg-v1-001.asc +13 -0
  26. rpgp_py-0.19.0/tests/fixtures/openpgp-interop/gnupg-v1-001.json +8 -0
  27. rpgp_py-0.19.0/tests/fixtures/openpgp-interop/gnupg-v2-1-5-001-decrypt.asc +18 -0
  28. rpgp_py-0.19.0/tests/fixtures/openpgp-interop/gnupg-v2-1-5-001-verify.asc +15 -0
  29. rpgp_py-0.19.0/tests/fixtures/openpgp-interop/gnupg-v2-1-5-001.asc +12 -0
  30. rpgp_py-0.19.0/tests/fixtures/openpgp-interop/gnupg-v2-1-5-001.json +8 -0
  31. rpgp_py-0.19.0/tests/fixtures/rfc9580-v6-25519-annex-a-4/csf.msg +11 -0
  32. rpgp_py-0.19.0/tests/fixtures/rfc9580-v6-25519-annex-a-4/tsk.asc +14 -0
  33. rpgp_py-0.19.0/tests/fixtures/rsa-rsa-sample-1.asc +38 -0
  34. rpgp_py-0.19.0/tests/fixtures/signed-2-keys-1.asc +17 -0
  35. rpgp_py-0.19.0/tests/test_key_generation.py +1329 -0
  36. rpgp_py-0.19.0/tests/test_openpgp.py +394 -0
  37. rpgp_py-0.19.0/uv.lock +389 -0
@@ -0,0 +1,175 @@
1
+ name: Publish PyPI
2
+
3
+ on:
4
+ release:
5
+ types:
6
+ - published
7
+ workflow_dispatch:
8
+ inputs:
9
+ publish:
10
+ description: Publish the built distributions to PyPI
11
+ required: false
12
+ type: boolean
13
+ default: false
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ linux:
20
+ name: Linux wheels (${{ matrix.name }})
21
+ runs-on: ubuntu-22.04
22
+ strategy:
23
+ fail-fast: false
24
+ matrix:
25
+ include:
26
+ - name: manylinux-x86_64
27
+ target: x86_64-unknown-linux-gnu
28
+ manylinux: "2014"
29
+ artifact_name: dist-manylinux-x86_64
30
+ - name: manylinux-aarch64
31
+ target: aarch64-unknown-linux-gnu
32
+ manylinux: "2014"
33
+ artifact_name: dist-manylinux-aarch64
34
+ - name: musllinux-x86_64
35
+ target: x86_64-unknown-linux-musl
36
+ manylinux: musllinux_1_2
37
+ artifact_name: dist-musllinux-x86_64
38
+ - name: musllinux-aarch64
39
+ target: aarch64-unknown-linux-musl
40
+ manylinux: musllinux_1_2
41
+ artifact_name: dist-musllinux-aarch64
42
+ steps:
43
+ - uses: actions/checkout@v6
44
+ - uses: actions/setup-python@v6
45
+ with:
46
+ python-version: "3.10"
47
+ - name: Build wheel
48
+ uses: PyO3/maturin-action@v1
49
+ with:
50
+ maturin-version: v1.12.6
51
+ target: ${{ matrix.target }}
52
+ manylinux: ${{ matrix.manylinux }}
53
+ args: --release --locked --out dist --compatibility pypi
54
+ - name: Upload distribution
55
+ uses: actions/upload-artifact@v6
56
+ with:
57
+ name: ${{ matrix.artifact_name }}
58
+ path: dist/*
59
+ if-no-files-found: error
60
+
61
+ macos:
62
+ name: macOS wheels (${{ matrix.name }})
63
+ runs-on: ${{ matrix.runner }}
64
+ strategy:
65
+ fail-fast: false
66
+ matrix:
67
+ include:
68
+ - name: x86_64
69
+ runner: macos-15-intel
70
+ target: x86_64-apple-darwin
71
+ artifact_name: dist-macos-x86_64
72
+ - name: arm64
73
+ runner: macos-15
74
+ target: aarch64-apple-darwin
75
+ artifact_name: dist-macos-arm64
76
+ steps:
77
+ - uses: actions/checkout@v6
78
+ - uses: actions/setup-python@v6
79
+ with:
80
+ python-version: "3.10"
81
+ - name: Build wheel
82
+ uses: PyO3/maturin-action@v1
83
+ with:
84
+ maturin-version: v1.12.6
85
+ target: ${{ matrix.target }}
86
+ args: --release --locked --out dist --compatibility pypi
87
+ - name: Upload distribution
88
+ uses: actions/upload-artifact@v6
89
+ with:
90
+ name: ${{ matrix.artifact_name }}
91
+ path: dist/*
92
+ if-no-files-found: error
93
+
94
+ windows:
95
+ name: Windows wheels (${{ matrix.name }})
96
+ runs-on: ${{ matrix.runner }}
97
+ strategy:
98
+ fail-fast: false
99
+ matrix:
100
+ include:
101
+ - name: win_amd64
102
+ runner: windows-latest
103
+ target: x86_64-pc-windows-msvc
104
+ python_arch: x64
105
+ artifact_name: dist-win_amd64
106
+ - name: win32
107
+ runner: windows-latest
108
+ target: i686-pc-windows-msvc
109
+ python_arch: x86
110
+ artifact_name: dist-win32
111
+ steps:
112
+ - uses: actions/checkout@v6
113
+ - uses: actions/setup-python@v6
114
+ with:
115
+ python-version: "3.10"
116
+ architecture: ${{ matrix.python_arch }}
117
+ - name: Build wheel
118
+ uses: PyO3/maturin-action@v1
119
+ with:
120
+ maturin-version: v1.12.6
121
+ target: ${{ matrix.target }}
122
+ args: --release --locked --out dist --compatibility pypi
123
+ - name: Upload distribution
124
+ uses: actions/upload-artifact@v6
125
+ with:
126
+ name: ${{ matrix.artifact_name }}
127
+ path: dist/*
128
+ if-no-files-found: error
129
+
130
+ sdist:
131
+ name: Source distribution
132
+ runs-on: ubuntu-22.04
133
+ steps:
134
+ - uses: actions/checkout@v6
135
+ - name: Build sdist
136
+ uses: PyO3/maturin-action@v1
137
+ with:
138
+ maturin-version: v1.12.6
139
+ command: sdist
140
+ args: --out dist
141
+ - name: Upload distribution
142
+ uses: actions/upload-artifact@v6
143
+ with:
144
+ name: dist-sdist
145
+ path: dist/*
146
+ if-no-files-found: error
147
+
148
+ publish:
149
+ name: Publish to PyPI
150
+ environment: publish
151
+ runs-on: ubuntu-22.04
152
+ needs: [linux, macos, windows, sdist]
153
+ if: >-
154
+ ${{
155
+ startsWith(github.ref, 'refs/tags/')
156
+ || (github.event_name == 'workflow_dispatch' && inputs.publish)
157
+ }}
158
+ steps:
159
+ - uses: actions/download-artifact@v8
160
+ with:
161
+ pattern: dist-*
162
+ merge-multiple: true
163
+ path: dist
164
+ - uses: astral-sh/setup-uv@v5
165
+ - name: Publish distributions
166
+ shell: bash
167
+ run: |
168
+ token="${PYPI_TOKEN:-$PYPI_TOKEN_FROM_SECRET}"
169
+ if [ -z "$token" ]; then
170
+ echo "PYPI_TOKEN is not set"
171
+ exit 1
172
+ fi
173
+ uv publish --token "$token" dist/*
174
+ env:
175
+ PYPI_TOKEN_FROM_SECRET: ${{ secrets.PYPI_TOKEN }}
@@ -0,0 +1,211 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+
165
+ # pytype static type analyzer
166
+ .pytype/
167
+
168
+ # Cython debug symbols
169
+ cython_debug/
170
+
171
+ # PyCharm
172
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
175
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
176
+ .idea/
177
+
178
+ # Abstra
179
+ # Abstra is an AI-powered process automation framework.
180
+ # Ignore directories containing user credentials, local state, and settings.
181
+ # Learn more at https://abstra.io/docs
182
+ .abstra/
183
+
184
+ # Visual Studio Code
185
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
188
+ # you could uncomment the following to ignore the entire vscode folder
189
+ # .vscode/
190
+
191
+ # Ruff stuff:
192
+ .ruff_cache/
193
+
194
+ # PyPI configuration file
195
+ .pypirc
196
+
197
+ # Cursor
198
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
199
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
200
+ # refer to https://docs.cursor.com/context/ignore-files
201
+ .cursorignore
202
+ .cursorindexingignore
203
+
204
+ # Marimo
205
+ marimo/_static/
206
+ marimo/_lsp/
207
+ __marimo__/
208
+
209
+
210
+ # Other
211
+ *.dSYM
@@ -0,0 +1 @@
1
+ 3.13