kohakuvault 0.1.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.
- kohakuvault-0.1.0/.github/workflows/ci.yml +64 -0
- kohakuvault-0.1.0/.github/workflows/release.yml +129 -0
- kohakuvault-0.1.0/.gitignore +248 -0
- kohakuvault-0.1.0/Cargo.lock +395 -0
- kohakuvault-0.1.0/Cargo.toml +16 -0
- kohakuvault-0.1.0/LICENSE +201 -0
- kohakuvault-0.1.0/PKG-INFO +244 -0
- kohakuvault-0.1.0/README.md +215 -0
- kohakuvault-0.1.0/pyproject.toml +76 -0
- kohakuvault-0.1.0/rustfmt.toml +10 -0
- kohakuvault-0.1.0/src/kohakuvault/__init__.py +28 -0
- kohakuvault-0.1.0/src/kohakuvault/_kvault.pyi +231 -0
- kohakuvault-0.1.0/src/kohakuvault/errors.py +90 -0
- kohakuvault-0.1.0/src/kohakuvault/proxy.py +704 -0
- kohakuvault-0.1.0/src/kvault-rust/lib.rs +525 -0
- kohakuvault-0.1.0/tests/__init__.py +1 -0
- kohakuvault-0.1.0/tests/test_basic.py +141 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
13
|
+
runs-on: ${{ matrix.os }}
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
18
|
+
python-version: ['3.10', '3.11', '3.12', '3.13']
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: ${{ matrix.python-version }}
|
|
27
|
+
|
|
28
|
+
- name: Set up Rust
|
|
29
|
+
uses: dtolnay/rust-toolchain@stable
|
|
30
|
+
|
|
31
|
+
- name: Cache Rust
|
|
32
|
+
uses: Swatinem/rust-cache@v2
|
|
33
|
+
|
|
34
|
+
- name: Install maturin
|
|
35
|
+
run: python -m pip install --upgrade pip maturin
|
|
36
|
+
|
|
37
|
+
- name: Build wheel (Linux/Windows)
|
|
38
|
+
if: matrix.os != 'macos-latest'
|
|
39
|
+
run: maturin build --release
|
|
40
|
+
|
|
41
|
+
- name: Build wheel (macOS - Apple Silicon)
|
|
42
|
+
if: matrix.os == 'macos-latest'
|
|
43
|
+
run: |
|
|
44
|
+
rustup target add aarch64-apple-darwin
|
|
45
|
+
maturin build --release --target aarch64-apple-darwin
|
|
46
|
+
|
|
47
|
+
- name: Install built wheel with test dependencies
|
|
48
|
+
shell: bash
|
|
49
|
+
run: |
|
|
50
|
+
pip install target/wheels/*.whl
|
|
51
|
+
pip install pytest pytest-cov
|
|
52
|
+
|
|
53
|
+
- name: Run tests
|
|
54
|
+
run: pytest -v
|
|
55
|
+
|
|
56
|
+
- name: Format check (Python)
|
|
57
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
|
|
58
|
+
run: |
|
|
59
|
+
pip install black
|
|
60
|
+
black --check src/kohakuvault
|
|
61
|
+
|
|
62
|
+
- name: Format check (Rust)
|
|
63
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
|
|
64
|
+
run: cargo fmt --check
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
push:
|
|
7
|
+
tags:
|
|
8
|
+
- 'v*'
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
# Default permissions for all jobs (can be overridden per job)
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build-wheels:
|
|
17
|
+
name: Build wheels on ${{ matrix.os }}
|
|
18
|
+
runs-on: ${{ matrix.os }}
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: '3.10'
|
|
31
|
+
|
|
32
|
+
- name: Set up Rust
|
|
33
|
+
uses: dtolnay/rust-toolchain@stable
|
|
34
|
+
|
|
35
|
+
- name: Cache Rust
|
|
36
|
+
uses: Swatinem/rust-cache@v2
|
|
37
|
+
|
|
38
|
+
- name: Install maturin
|
|
39
|
+
run: pip install maturin
|
|
40
|
+
|
|
41
|
+
- name: Build wheels (Linux)
|
|
42
|
+
if: matrix.os == 'ubuntu-latest'
|
|
43
|
+
run: |
|
|
44
|
+
# Build for multiple Python versions
|
|
45
|
+
maturin build --release --interpreter python3.10 python3.11 python3.12 python3.13
|
|
46
|
+
env:
|
|
47
|
+
# Enable full CPU optimizations
|
|
48
|
+
RUSTFLAGS: "-C target-cpu=native"
|
|
49
|
+
|
|
50
|
+
- name: Build wheels (Windows)
|
|
51
|
+
if: matrix.os == 'windows-latest'
|
|
52
|
+
run: |
|
|
53
|
+
maturin build --release --interpreter python3.10 python3.11 python3.12 python3.13
|
|
54
|
+
|
|
55
|
+
- name: Build wheels (macOS)
|
|
56
|
+
if: matrix.os == 'macos-latest'
|
|
57
|
+
run: |
|
|
58
|
+
# Build for Apple Silicon only (M1/M2/M3)
|
|
59
|
+
rustup target add aarch64-apple-darwin
|
|
60
|
+
maturin build --release --interpreter python3.10 python3.11 python3.12 python3.13 --target aarch64-apple-darwin
|
|
61
|
+
|
|
62
|
+
- name: Upload wheels
|
|
63
|
+
uses: actions/upload-artifact@v4
|
|
64
|
+
with:
|
|
65
|
+
name: wheels-${{ matrix.os }}
|
|
66
|
+
path: target/wheels/
|
|
67
|
+
retention-days: 7
|
|
68
|
+
|
|
69
|
+
build-sdist:
|
|
70
|
+
name: Build source distribution
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
|
|
73
|
+
steps:
|
|
74
|
+
- uses: actions/checkout@v4
|
|
75
|
+
|
|
76
|
+
- name: Set up Python
|
|
77
|
+
uses: actions/setup-python@v5
|
|
78
|
+
with:
|
|
79
|
+
python-version: '3.10'
|
|
80
|
+
|
|
81
|
+
- name: Install maturin
|
|
82
|
+
run: pip install maturin
|
|
83
|
+
|
|
84
|
+
- name: Build sdist
|
|
85
|
+
run: maturin sdist
|
|
86
|
+
|
|
87
|
+
- name: Upload sdist
|
|
88
|
+
uses: actions/upload-artifact@v4
|
|
89
|
+
with:
|
|
90
|
+
name: sdist
|
|
91
|
+
path: target/wheels/*.tar.gz
|
|
92
|
+
retention-days: 7
|
|
93
|
+
|
|
94
|
+
publish-to-pypi:
|
|
95
|
+
name: Publish to PyPI
|
|
96
|
+
needs: [build-wheels, build-sdist]
|
|
97
|
+
runs-on: ubuntu-latest
|
|
98
|
+
# Only publish on tag pushes or releases
|
|
99
|
+
if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v')
|
|
100
|
+
environment:
|
|
101
|
+
name: pypi
|
|
102
|
+
url: https://pypi.org/p/kohakuvault
|
|
103
|
+
permissions:
|
|
104
|
+
contents: write # IMPORTANT: needed to upload to GitHub Releases
|
|
105
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
106
|
+
|
|
107
|
+
steps:
|
|
108
|
+
- name: Download all artifacts
|
|
109
|
+
uses: actions/download-artifact@v4
|
|
110
|
+
with:
|
|
111
|
+
path: dist
|
|
112
|
+
pattern: '*'
|
|
113
|
+
merge-multiple: true
|
|
114
|
+
|
|
115
|
+
- name: List artifacts
|
|
116
|
+
run: ls -lh dist/
|
|
117
|
+
|
|
118
|
+
- name: Upload wheels to GitHub Release
|
|
119
|
+
uses: softprops/action-gh-release@v2
|
|
120
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
121
|
+
with:
|
|
122
|
+
files: dist/*
|
|
123
|
+
fail_on_unmatched_files: false
|
|
124
|
+
|
|
125
|
+
- name: Publish to PyPI
|
|
126
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
127
|
+
with:
|
|
128
|
+
skip-existing: true
|
|
129
|
+
verbose: true
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
.claude/
|
|
2
|
+
target/
|
|
3
|
+
|
|
4
|
+
# Byte-compiled / optimized / DLL files
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[codz]
|
|
7
|
+
*$py.class
|
|
8
|
+
|
|
9
|
+
# C extensions
|
|
10
|
+
*.so
|
|
11
|
+
*.pyd
|
|
12
|
+
*.dylib
|
|
13
|
+
|
|
14
|
+
# Distribution / packaging
|
|
15
|
+
.Python
|
|
16
|
+
build/
|
|
17
|
+
develop-eggs/
|
|
18
|
+
dist/
|
|
19
|
+
downloads/
|
|
20
|
+
eggs/
|
|
21
|
+
.eggs/
|
|
22
|
+
lib/
|
|
23
|
+
lib64/
|
|
24
|
+
parts/
|
|
25
|
+
sdist/
|
|
26
|
+
var/
|
|
27
|
+
wheels/
|
|
28
|
+
share/python-wheels/
|
|
29
|
+
*.egg-info/
|
|
30
|
+
.installed.cfg
|
|
31
|
+
*.egg
|
|
32
|
+
MANIFEST
|
|
33
|
+
|
|
34
|
+
# PyInstaller
|
|
35
|
+
# Usually these files are written by a python script from a template
|
|
36
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
37
|
+
*.manifest
|
|
38
|
+
*.spec
|
|
39
|
+
|
|
40
|
+
# Installer logs
|
|
41
|
+
pip-log.txt
|
|
42
|
+
pip-delete-this-directory.txt
|
|
43
|
+
|
|
44
|
+
# Unit test / coverage reports
|
|
45
|
+
htmlcov/
|
|
46
|
+
.tox/
|
|
47
|
+
.nox/
|
|
48
|
+
.coverage
|
|
49
|
+
.coverage.*
|
|
50
|
+
.cache
|
|
51
|
+
nosetests.xml
|
|
52
|
+
coverage.xml
|
|
53
|
+
*.cover
|
|
54
|
+
*.py.cover
|
|
55
|
+
.hypothesis/
|
|
56
|
+
.pytest_cache/
|
|
57
|
+
cover/
|
|
58
|
+
|
|
59
|
+
# Translations
|
|
60
|
+
*.mo
|
|
61
|
+
*.pot
|
|
62
|
+
|
|
63
|
+
# Django stuff:
|
|
64
|
+
*.log
|
|
65
|
+
local_settings.py
|
|
66
|
+
db.sqlite3
|
|
67
|
+
db.sqlite3-journal
|
|
68
|
+
|
|
69
|
+
# Test databases
|
|
70
|
+
*.db
|
|
71
|
+
*.db-shm
|
|
72
|
+
*.db-wal
|
|
73
|
+
|
|
74
|
+
# Flask stuff:
|
|
75
|
+
instance/
|
|
76
|
+
.webassets-cache
|
|
77
|
+
|
|
78
|
+
# Scrapy stuff:
|
|
79
|
+
.scrapy
|
|
80
|
+
|
|
81
|
+
# Sphinx documentation
|
|
82
|
+
docs/_build/
|
|
83
|
+
|
|
84
|
+
# PyBuilder
|
|
85
|
+
.pybuilder/
|
|
86
|
+
target/
|
|
87
|
+
|
|
88
|
+
# Jupyter Notebook
|
|
89
|
+
.ipynb_checkpoints
|
|
90
|
+
|
|
91
|
+
# IPython
|
|
92
|
+
profile_default/
|
|
93
|
+
ipython_config.py
|
|
94
|
+
|
|
95
|
+
# pyenv
|
|
96
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
97
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
98
|
+
# .python-version
|
|
99
|
+
|
|
100
|
+
# pipenv
|
|
101
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
102
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
103
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
104
|
+
# install all needed dependencies.
|
|
105
|
+
# Pipfile.lock
|
|
106
|
+
|
|
107
|
+
# UV
|
|
108
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
109
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
110
|
+
# commonly ignored for libraries.
|
|
111
|
+
# uv.lock
|
|
112
|
+
|
|
113
|
+
# poetry
|
|
114
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
115
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
116
|
+
# commonly ignored for libraries.
|
|
117
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
118
|
+
# poetry.lock
|
|
119
|
+
# poetry.toml
|
|
120
|
+
|
|
121
|
+
# pdm
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
123
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
124
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
125
|
+
# pdm.lock
|
|
126
|
+
# pdm.toml
|
|
127
|
+
.pdm-python
|
|
128
|
+
.pdm-build/
|
|
129
|
+
|
|
130
|
+
# pixi
|
|
131
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
132
|
+
# pixi.lock
|
|
133
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
134
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
135
|
+
.pixi
|
|
136
|
+
|
|
137
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
138
|
+
__pypackages__/
|
|
139
|
+
|
|
140
|
+
# Celery stuff
|
|
141
|
+
celerybeat-schedule
|
|
142
|
+
celerybeat.pid
|
|
143
|
+
|
|
144
|
+
# Redis
|
|
145
|
+
*.rdb
|
|
146
|
+
*.aof
|
|
147
|
+
*.pid
|
|
148
|
+
|
|
149
|
+
# RabbitMQ
|
|
150
|
+
mnesia/
|
|
151
|
+
rabbitmq/
|
|
152
|
+
rabbitmq-data/
|
|
153
|
+
|
|
154
|
+
# ActiveMQ
|
|
155
|
+
activemq-data/
|
|
156
|
+
|
|
157
|
+
# SageMath parsed files
|
|
158
|
+
*.sage.py
|
|
159
|
+
|
|
160
|
+
# Environments
|
|
161
|
+
.env
|
|
162
|
+
.envrc
|
|
163
|
+
.venv
|
|
164
|
+
env/
|
|
165
|
+
venv/
|
|
166
|
+
ENV/
|
|
167
|
+
env.bak/
|
|
168
|
+
venv.bak/
|
|
169
|
+
|
|
170
|
+
# Spyder project settings
|
|
171
|
+
.spyderproject
|
|
172
|
+
.spyproject
|
|
173
|
+
|
|
174
|
+
# Rope project settings
|
|
175
|
+
.ropeproject
|
|
176
|
+
|
|
177
|
+
# mkdocs documentation
|
|
178
|
+
/site
|
|
179
|
+
|
|
180
|
+
# mypy
|
|
181
|
+
.mypy_cache/
|
|
182
|
+
.dmypy.json
|
|
183
|
+
dmypy.json
|
|
184
|
+
|
|
185
|
+
# Pyre type checker
|
|
186
|
+
.pyre/
|
|
187
|
+
|
|
188
|
+
# pytype static type analyzer
|
|
189
|
+
.pytype/
|
|
190
|
+
|
|
191
|
+
# Cython debug symbols
|
|
192
|
+
cython_debug/
|
|
193
|
+
|
|
194
|
+
# PyCharm
|
|
195
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
196
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
197
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
198
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
199
|
+
# .idea/
|
|
200
|
+
|
|
201
|
+
# Abstra
|
|
202
|
+
# Abstra is an AI-powered process automation framework.
|
|
203
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
204
|
+
# Learn more at https://abstra.io/docs
|
|
205
|
+
.abstra/
|
|
206
|
+
|
|
207
|
+
# Visual Studio Code
|
|
208
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
209
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
210
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
211
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
212
|
+
# .vscode/
|
|
213
|
+
|
|
214
|
+
# Ruff stuff:
|
|
215
|
+
.ruff_cache/
|
|
216
|
+
|
|
217
|
+
# PyPI configuration file
|
|
218
|
+
.pypirc
|
|
219
|
+
|
|
220
|
+
# Marimo
|
|
221
|
+
marimo/_static/
|
|
222
|
+
marimo/_lsp/
|
|
223
|
+
__marimo__/
|
|
224
|
+
|
|
225
|
+
# Streamlit
|
|
226
|
+
.streamlit/secrets.toml
|
|
227
|
+
|
|
228
|
+
# Generated by Cargo
|
|
229
|
+
# will have compiled files and executables
|
|
230
|
+
debug
|
|
231
|
+
target
|
|
232
|
+
|
|
233
|
+
# These are backup files generated by rustfmt
|
|
234
|
+
**/*.rs.bk
|
|
235
|
+
|
|
236
|
+
# MSVC Windows builds of rustc generate these, which store debugging information
|
|
237
|
+
*.pdb
|
|
238
|
+
|
|
239
|
+
# Generated by cargo mutants
|
|
240
|
+
# Contains mutation testing data
|
|
241
|
+
**/mutants.out*/
|
|
242
|
+
|
|
243
|
+
# RustRover
|
|
244
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
245
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
246
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
247
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
248
|
+
#.idea/
|