Skip to content

Commit 8958b30

Browse files
python: publish as voltic on PyPI (name jackal was taken)
1 parent 4b4a1c3 commit 8958b30

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,21 @@ cargo test reference_table -- --nocapture
175175

176176
## Python
177177

178-
A PyO3 wrapper (`python/jackal_py.rs`, ~50 lines) builds with `maturin`:
178+
A PyO3 wrapper (`python/jackal_py.rs`, ~50 lines) is published on PyPI as `voltic` (the name `jackal` was taken):
179+
180+
```sh
181+
pip install voltic
182+
python -c "import voltic; print(voltic.implied_vol([100.0],[100.0],[1.0],[0.02],[12.82158],['c']))"
183+
```
184+
185+
To build it from source:
179186

180187
```sh
181188
rustup override set nightly # in this directory; the core uses std::simd
182189
maturin develop --release # uses the `python` feature
183-
python -c "import jackal; print(jackal.implied_vol([100.0],[100.0],[1.0],[0.02],[12.82158],['c']))"
184190
```
185191

186-
It exposes the one function. It exists as a signal that the kernel ships as a Python extension if you want it; not because the repo expects `pip install` traffic.
192+
It exposes the one function. The wrapper is list-based for portability; a real release would take `&[f64]` views via `numpy::PyReadonlyArray1`.
187193

188194
## License
189195

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["maturin>=1.5,<2"]
33
build-backend = "maturin"
44

55
[project]
6-
name = "jackal"
6+
name = "voltic"
77
description = "Vectorized Black-Scholes implied-volatility solver."
88
requires-python = ">=3.9"
99
license = { text = "MIT OR Apache-2.0" }

python/jackal_py.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn implied_vol_py(
5656
}
5757

5858
#[pymodule]
59-
fn jackal(m: &Bound<'_, PyModule>) -> PyResult<()> {
59+
fn voltic(m: &Bound<'_, PyModule>) -> PyResult<()> {
6060
m.add_function(wrap_pyfunction!(implied_vol_py, m)?)?;
6161
// touch PyList so the import is not flagged unused on older pyo3
6262
let _ = std::any::type_name::<PyList>();

0 commit comments

Comments
 (0)