Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Lispyn — Realización de notebooks de IA

Create AI notebooks with Hy (Lisp for Python): run scripts, generate Jupyter notebooks or save executed results.

Lispyn provides macros for PyTorch, NumPy, pandas and Matplotlib while keeping your Python libraries and models.

PyPI version CI on main Apache-2.0

Why use Lispyn for AI notebooks?

Less boilerplate. For example, the real PyTorch quickstart uses a macro to create separate train, validation and held-out test subsets:

(setv [training validation held-out]
  (train-val-test dataset :validation-fraction 0.25
    :test-fraction 0.25 :seed seed))

Catch invalid data early. The runnable NumPy/pandas example checks shape and finite values without writing a manual validation loop:

(require lispyn.macros [assert-finite assert-shape])
(import numpy :as np)
(import pandas :as pd)

(setv features (np.array [[1.0 2.0] [3.0 4.0]]))
(assert-shape features [2 2] :name "features")
(assert-finite features :name "features")

Check class imbalance before training. The runnable label balance example summarizes a classification dataset and plots its class counts:

(require lispyn.macros [label-balance plot-label-balance])
(setv labels ["cat" "cat" "cat" "dog" "dog" "bird"])
(setv report (label-balance labels :title "Training label distribution"))

One source, three modes. The same hello.hy can run in a terminal, become an unexecuted notebook, or produce a notebook with saved outputs. See the three commands below.

Inspectable AI notebook outputs. The quickstart renders a report from actual PyTorch training results, which can be reviewed in the executed notebook:

(require lispyn.macros [report-run narrate metric-table])
(import lispyn.training [evaluate-metrics])
(report-run run :title "PyTorch baseline · recorded metrics")

These examples simplify AI notebook development; Lispyn does not guarantee model quality, reproducibility or valid evaluations.

Install

pip install lispyn

Hy, Jupyter execution and Matplotlib are included. NumPy is available through Matplotlib; for pandas install pip install "lispyn[data]". PyTorch is installed separately for your CPU/GPU setup.

How it works: three ways to run Hy

Get the hello.hy example (no dataset, no PyTorch):

git clone https://github.com/edujbarrios/lispyn.git
cd lispyn

1. Run the Hy file — terminal output, no notebook:

lispyn run examples/hello.hy

2. Generate a Jupyter notebook — hello.ipynb, Nothing is executed:

lispyn build examples/hello.hy -o hello.ipynb

3. Generate and execute the notebook — hello-executed.ipynb saves the executed cells and outputs:

lispyn execute examples/hello.hy -o hello-executed.ipynb

Check for 2 + 3 + 5 = 10 and Lispyn checks passed!. Building compiles Hy into ordinary Python/Markdown notebook cells without executing it. Only compile trusted Hy: macros are not sandboxed.

All macros and examples

Full reference: 53 macros, arguments, dependencies and Hy examples — grouped by PyTorch, Matplotlib, pandas, NumPy, notebook authoring, classification and AI experiment reporting.

More runnable sources: PyTorch quickstart (try lispyn execute examples/quickstart.hy), data profiles and input assertions and label balance. A cloned repository also offers pip install -r requirements.txt for an optional full AI development environment.

Created by Eduardo J. Barrios · Apache-2.0 · Citation · Experimental alpha software.

Metadata

Release files for lispyn 0.34.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.34.0a1
File Size Uploaded Provenance Actions
lispyn-0.34.0a1.tar.gz 144.8 kB With provenance Details for lispyn-0.34.0a1.tar.gz

Built distribution (wheel)

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

Total release size: 237.7 kB

Release files / lispyn-0.34.0a1.tar.gz

Download URL lispyn-0.34.0a1.tar.gz
Size 144.8 kB
Tags Source
SHA-256 checksum
How to use checksums
32dfef77db19c82b041e76f9a8120cd66368d4bb3f00542ab58073089bd0580e
BLAKE2b-256 checksum
How to use checksums
3ee53cf98983440e337e2dab275589461d2f5af6252f43dd43a4da5f696bbbac
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.34.0a1-py3-none-any.whl

Download URL lispyn-0.34.0a1-py3-none-any.whl
Size 92.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
570e0de5ef9da795a364f206cd348a9ee5d81b152744d9c8ebba30e3c0812bfa
BLAKE2b-256 checksum
How to use checksums
35237a5b12703d1082e0dfe62143041047f8e9d9aa54eb1b36ab007d1e272726
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.34.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.34.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