toolapi 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.

Potentially problematic release.


This version of toolapi might be problematic. Click here for more details.

@@ -0,0 +1,212 @@
1
+ # This file is autogenerated by maturin v1.11.5
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github -o .github/workflows/pypi_publish.yml
5
+ #
6
+ name: CI
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ - master
13
+ tags:
14
+ - '*'
15
+ pull_request:
16
+ workflow_dispatch:
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ jobs:
22
+ linux:
23
+ runs-on: ${{ matrix.platform.runner }}
24
+ strategy:
25
+ matrix:
26
+ platform:
27
+ - runner: ubuntu-22.04
28
+ target: x86_64
29
+ # - runner: ubuntu-22.04
30
+ # target: x86
31
+ # - runner: ubuntu-22.04
32
+ # target: aarch64
33
+ - runner: ubuntu-22.04
34
+ target: armv7
35
+ # - runner: ubuntu-22.04
36
+ # target: s390x
37
+ # - runner: ubuntu-22.04
38
+ # target: ppc64le
39
+ steps:
40
+ - uses: actions/checkout@v6
41
+ - uses: actions/setup-python@v6
42
+ with:
43
+ python-version: 3.x
44
+ - name: Build wheels
45
+ uses: PyO3/maturin-action@v1
46
+ with:
47
+ target: ${{ matrix.platform.target }}
48
+ args: --release --out dist
49
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
50
+ manylinux: auto
51
+ # - name: Build free-threaded wheels
52
+ # uses: PyO3/maturin-action@v1
53
+ # with:
54
+ # target: ${{ matrix.platform.target }}
55
+ # args: --release --out dist -i python3.14t
56
+ # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
57
+ # manylinux: auto
58
+ - name: Upload wheels
59
+ uses: actions/upload-artifact@v5
60
+ with:
61
+ name: wheels-linux-${{ matrix.platform.target }}
62
+ path: dist
63
+
64
+ musllinux:
65
+ runs-on: ${{ matrix.platform.runner }}
66
+ strategy:
67
+ matrix:
68
+ platform:
69
+ - runner: ubuntu-22.04
70
+ target: x86_64
71
+ # - runner: ubuntu-22.04
72
+ # target: x86
73
+ - runner: ubuntu-22.04
74
+ target: aarch64
75
+ - runner: ubuntu-22.04
76
+ target: armv7
77
+ steps:
78
+ - uses: actions/checkout@v6
79
+ - uses: actions/setup-python@v6
80
+ with:
81
+ python-version: 3.x
82
+ - name: Build wheels
83
+ uses: PyO3/maturin-action@v1
84
+ with:
85
+ target: ${{ matrix.platform.target }}
86
+ args: --release --out dist
87
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
88
+ manylinux: musllinux_1_2
89
+ # - name: Build free-threaded wheels
90
+ # uses: PyO3/maturin-action@v1
91
+ # with:
92
+ # target: ${{ matrix.platform.target }}
93
+ # args: --release --out dist -i python3.14t
94
+ # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
95
+ # manylinux: musllinux_1_2
96
+ - name: Upload wheels
97
+ uses: actions/upload-artifact@v5
98
+ with:
99
+ name: wheels-musllinux-${{ matrix.platform.target }}
100
+ path: dist
101
+
102
+ windows:
103
+ runs-on: ${{ matrix.platform.runner }}
104
+ strategy:
105
+ matrix:
106
+ platform:
107
+ - runner: windows-latest
108
+ target: x64
109
+ python_arch: x64
110
+ # - runner: windows-latest
111
+ # target: x86
112
+ # python_arch: x86
113
+ - runner: windows-11-arm
114
+ target: aarch64
115
+ python_arch: arm64
116
+ steps:
117
+ - uses: actions/checkout@v6
118
+ - uses: actions/setup-python@v6
119
+ with:
120
+ python-version: 3.13
121
+ architecture: ${{ matrix.platform.python_arch }}
122
+ - name: Build wheels
123
+ uses: PyO3/maturin-action@v1
124
+ with:
125
+ target: ${{ matrix.platform.target }}
126
+ args: --release --out dist
127
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
128
+ # - uses: actions/setup-python@v6
129
+ # with:
130
+ # python-version: 3.14t
131
+ # architecture: ${{ matrix.platform.python_arch }}
132
+ # - name: Build free-threaded wheels
133
+ # uses: PyO3/maturin-action@v1
134
+ # with:
135
+ # target: ${{ matrix.platform.target }}
136
+ # args: --release --out dist -i python3.14t
137
+ # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
138
+ - name: Upload wheels
139
+ uses: actions/upload-artifact@v5
140
+ with:
141
+ name: wheels-windows-${{ matrix.platform.target }}
142
+ path: dist
143
+
144
+ macos:
145
+ runs-on: ${{ matrix.platform.runner }}
146
+ strategy:
147
+ matrix:
148
+ platform:
149
+ - runner: macos-15-intel
150
+ target: x86_64
151
+ - runner: macos-latest
152
+ target: aarch64
153
+ steps:
154
+ - uses: actions/checkout@v6
155
+ - uses: actions/setup-python@v6
156
+ with:
157
+ python-version: 3.x
158
+ - name: Build wheels
159
+ uses: PyO3/maturin-action@v1
160
+ with:
161
+ target: ${{ matrix.platform.target }}
162
+ args: --release --out dist
163
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
164
+ # - name: Build free-threaded wheels
165
+ # uses: PyO3/maturin-action@v1
166
+ # with:
167
+ # target: ${{ matrix.platform.target }}
168
+ # args: --release --out dist -i python3.14t
169
+ # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
170
+ - name: Upload wheels
171
+ uses: actions/upload-artifact@v5
172
+ with:
173
+ name: wheels-macos-${{ matrix.platform.target }}
174
+ path: dist
175
+
176
+ sdist:
177
+ runs-on: ubuntu-latest
178
+ steps:
179
+ - uses: actions/checkout@v6
180
+ - name: Build sdist
181
+ uses: PyO3/maturin-action@v1
182
+ with:
183
+ command: sdist
184
+ args: --out dist
185
+ - name: Upload sdist
186
+ uses: actions/upload-artifact@v5
187
+ with:
188
+ name: wheels-sdist
189
+ path: dist
190
+
191
+ release:
192
+ name: Release
193
+ runs-on: ubuntu-latest
194
+ # if: ${{ github.event_name == 'workflow_dispatch' }}
195
+ needs: [linux, musllinux, windows, macos, sdist]
196
+ permissions:
197
+ # Use to sign the release artifacts
198
+ id-token: write
199
+ # Used to upload release artifacts
200
+ contents: write
201
+ # Used to generate artifact attestation
202
+ attestations: write
203
+ steps:
204
+ - uses: actions/download-artifact@v6
205
+ - name: Generate artifact attestation
206
+ uses: actions/attest-build-provenance@v3
207
+ with:
208
+ subject-path: 'wheels-*/*'
209
+ - name: Install uv
210
+ uses: astral-sh/setup-uv@v7
211
+ - name: Publish to PyPI
212
+ run: uv publish 'wheels-*/*'
@@ -0,0 +1,75 @@
1
+ /target
2
+ /test/assets
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ .pytest_cache/
7
+ *.py[cod]
8
+ *.py[oc]
9
+
10
+ # C extensions
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ .venv/
16
+ env/
17
+ bin/
18
+ build/
19
+ develop-eggs/
20
+ dist/
21
+ wheels/
22
+ eggs/
23
+ lib/
24
+ lib64/
25
+ parts/
26
+ sdist/
27
+ var/
28
+ include/
29
+ man/
30
+ venv/
31
+ *.egg-info/
32
+ .installed.cfg
33
+ *.egg
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+ pip-selfcheck.json
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .coverage
44
+ .cache
45
+ nosetests.xml
46
+ coverage.xml
47
+
48
+ # Translations
49
+ *.mo
50
+
51
+ # Mr Developer
52
+ .mr.developer.cfg
53
+ .project
54
+ .pydevproject
55
+
56
+ # Rope
57
+ .ropeproject
58
+
59
+ # Django stuff:
60
+ *.log
61
+ *.pot
62
+
63
+ .DS_Store
64
+
65
+ # Sphinx documentation
66
+ docs/_build/
67
+
68
+ # PyCharm
69
+ .idea/
70
+
71
+ # VSCode
72
+ .vscode/
73
+
74
+ # Pyenv
75
+ .python-version
@@ -0,0 +1,42 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ `toolapi` is a Python package with a Rust extension module built using PyO3 and Maturin. It wraps the `toolapi` Rust crate (from `github.com/mrx-org/toolapi`) into a Python-importable module.
8
+
9
+ ## Build Commands
10
+
11
+ ```bash
12
+ # Development build (requires maturin and Rust toolchain)
13
+ maturin develop
14
+
15
+ # Release build producing wheel artifacts
16
+ maturin build --release --out dist --find-interpreter
17
+
18
+ # Source distribution
19
+ maturin sdist --out dist
20
+ ```
21
+
22
+ ## Testing
23
+
24
+ ```bash
25
+ uv run test/test_toolapi.py
26
+ ```
27
+
28
+ This rebuilds toolapi-py automatically if needed.
29
+
30
+ ## Important: Rust `toolapi` dependency
31
+
32
+ The Rust `toolapi` crate is available locally (see `Cargo.toml` path dependency). Do **not** clone it from GitHub or search in the Cargo git cache. If you need to read or modify the Rust `toolapi` crate, ask the user to add its directory to your working directories.
33
+
34
+ ## Architecture
35
+
36
+ - **`src/lib.rs`** — Rust library compiled as `_core` cdylib via PyO3. This is the extension module entry point. Functions defined here are exposed to Python.
37
+ - **`src/toolapi/__init__.py`** — Python package that re-exports from the compiled `_core` extension.
38
+ - **`src/toolapi/_core.pyi`** — Type stubs for the Rust extension, providing IDE autocomplete and type checker support.
39
+
40
+ The Rust side depends on an external `toolapi` crate (git dependency) and `pyo3` with ABI3 stable API targeting Python 3.9+. The Python side requires `>=3.8`.
41
+
42
+ Build system: Maturin (`pyproject.toml` build-backend) with uv for Python environment management. CI uses `maturin generate-ci github` workflow building wheels for Linux/Windows/macOS across multiple architectures.