This release is a pre-release and may not be stable for production use.
Lispyn
A new way to write and run machine-learning experiments.
Write an experiment once in Hy (Lisp for Python), train with native PyTorch, and get a real, shareable Jupyter notebook with code, metrics and plots. Lispyn adds expressive macros to your existing Python workflow; it does not replace PyTorch.
Install
pip install lispyn
Jupyter and Matplotlib are included. PyTorch is installed separately to match your CPU/GPU setup (official instructions). From a source checkout, pip install -r requirements.txt provides an optional full research environment.
See Lispyn in action
Hy syntax — an excerpt from the full runnable experiment (native PyTorch; tiny synthetic dataset):
(require lispyn.macros [train-until])
(setv model (torch.nn.Linear 2 2))
(setv run
(train-until model training 3
:validation validation :loss-fn (torch.nn.CrossEntropyLoss)
:epochs epochs :batch-size 4 :lr 0.05 :seed seed :device "cpu"))
(print "Completed epochs:" (len (get run.history "train_loss")))
(require lispyn.macros [curve])
(curve run :metric "loss" :theme "paper"
:title "Quickstart · real PyTorch training"
:subtitle "Train versus validation loss · synthetic dataset"
:figsize [8 4.5]
:save "../example_generated_notebooks/assets/quickstart_training_curves.png")
Real recorded output:
Samples: 8 train, 4 validation, 4 held-out test · Completed epochs: 10
Held-out test accuracy: 50.0%
View every executed Jupyter cell · Full Hy source
Toy data for workflow demonstration only; not a scientific benchmark.
Run it yourself:
lispyn execute examples/quickstart.hy
Lispyn builds and executes standard Python notebook cells. For compilation without training, use lispyn build examples/quickstart.hy.
More than training
Use 43 documented Hy macros for reusable experiment parameters, PyTorch training, evaluation splits, cross-validation, reports, evidence checks and visualizations. Explore every macro and its syntax.
Need an additional library inside the notebook? Lispyn can create a dedicated dependency cell:
(require lispyn.macros [pip-install])
(pip-install "scikit-learn>=1.5")
The package is checked/installed when the notebook is executed, never when compiling it.
Share and verify results
Package a completed experiment into a portable ZIP and verify its SHA-256 integrity without rerunning the notebook:
lispyn capsule examples/quickstart.hy example_generated_notebooks/quickstart_executed.ipynb -o study.zip
lispyn verify-capsule study.zip
You can include aggregate saved-run metrics with --run RUN_DIR. Capsules never automatically collect raw datasets or model weights; review notebook outputs before sharing. Checksums detect corruption, not authorship or scientific validity.
Full Hy examples · Notebook gallery · Macro reference · How to cite Lispyn
Created by Eduardo J. Barrios · Apache-2.0 · Experimental alpha software.
Metadata
Release files for lispyn 0.29.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lispyn-0.29.0a1.tar.gz | 128.3 kB | With provenance | Details for lispyn-0.29.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lispyn-0.29.0a1-py3-none-any.whl | Python 3 | none | any | Details for lispyn-0.29.0a1-py3-none-any.whl |
Total release size: 211.7 kB
Release files / lispyn-0.29.0a1.tar.gz
| Download URL | lispyn-0.29.0a1.tar.gz |
|---|---|
| Size | 128.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb1ce664154187590124aa4c58a602df29fa013f0f4fac2c04d05179359405c9
|
|
BLAKE2b-256 checksum How to use checksums |
eba85bb5420f7e3f9dff85a0dd81a5c3b9fc1fe23e2d97d83dfc7a350585af96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logRelease files / lispyn-0.29.0a1-py3-none-any.whl
| Download URL | lispyn-0.29.0a1-py3-none-any.whl |
|---|---|
| Size | 83.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
140a63c1d987e0583e231971af38119804a9614aee4d05447ac343872a8c7925
|
|
BLAKE2b-256 checksum How to use checksums |
ad24c6d3740e17c68a1387030f6c0dd1f266df03a62649792db14836efa1fff8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logSecurity for lispyn 0.29.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lispyn-0.29.0a1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.