Skip to main content
Pre-release

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.

PyPI Tests License

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%

Actual training and validation loss from the Hy quickstart

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 45 documented Hy macros for experiment parameters, PyTorch training, evaluation splits, cross-validation, comparisons, reports and figures. 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.30.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lispyn 0.30.0a1
File Size Uploaded Provenance Actions
lispyn-0.30.0a1.tar.gz 131.5 kB With provenance Details for lispyn-0.30.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lispyn 0.30.0a1
File Interpreter ABI Platform Actions
lispyn-0.30.0a1-py3-none-any.whl Python 3 none any Details for lispyn-0.30.0a1-py3-none-any.whl

Total release size: 216.8 kB

Release files / lispyn-0.30.0a1.tar.gz

Download URL lispyn-0.30.0a1.tar.gz
Size 131.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8f8a9484d81f95e692237562821d0978eba33d47c30b2cae708b8ec14a4317af
BLAKE2b-256 checksum
How to use checksums
cbbdf2e6d7f12e3eb8d51e0f3cbd1fbf7690bd24999aadae92384fd5c3d000d9
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 log

Release files / lispyn-0.30.0a1-py3-none-any.whl

Download URL lispyn-0.30.0a1-py3-none-any.whl
Size 85.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1915c593b6aca9528b933505540bb893bf2fc904c466464557a0f3de49f8694f
BLAKE2b-256 checksum
How to use checksums
e1dfedd23fc7af69a10a66274a2fdf6de320cdf14545bc207fe6f42b9dcd16b0
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 log

Security for lispyn 0.30.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.

Select from 2 files

Attestation for lispyn-0.30.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 log

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

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page