Skip to main content

Moruna

Moruna is a fast, lightweight runtime that runs your Python functions over datasets larger than memory, inside a memory limit you set, and sizes the work itself so the job neither runs out of memory nor leaves the machine idle.

Use cases

Run a model over a large dataset. Apply a tokenizer, a scoring model or any Python function to every row of a Parquet dataset that does not fit in memory, and write the results as Parquet.

Stay inside a memory limit. Give a job a budget, or let Moruna read its container's limit. Moruna measures what your function uses and adjusts batch sizes and workers to stay under it.

Resume a job that was stopped. Restart a long job from its last checkpoint instead of from the beginning. The output is the same as a run that was never interrupted.

Run a job described in a file. Describe the input, functions, output and budget in a job document, then run it with the moruna command from a scheduler, a container or a virtual machine.

Quickstart

pip install moruna
import moruna
import pyarrow as pa

@moruna.kernel
def shout(batch):
    loud = pa.array([s.as_py().upper() for s in batch.column("text")])
    return batch.append_column("loud", loud)

report = moruna.run(
    moruna.ParquetSource("events/"),
    [shout],
    moruna.ParquetSink("events-loud/"),
    budget="8GiB",
)
print(report)

Moruna requires Python 3.14. On the standard build of Python, add allow_gil=True; on the free-threaded build, Python kernels run on every core. The quickstart builds a dataset and runs this end to end.

Documentation

Getting started
Learn the concepts, then run your first job.
Using Moruna
Write kernels, run jobs from Python or the command line, and choose where they run.
How it works
Understand how Moruna sizes work, keeps memory under the limit and resumes.
Reference
Look up functions, the job document, commands and the run report.

Read the documentation website.


Contributing · Changelog · Apache-2.0 license

Metadata

Release files for moruna 0.4.0

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

Built distributions (wheels)

Table of built distributions (wheels) for moruna 0.4.0
File Actions
moruna-0.4.0-cp314-cp314t-manylinux_2_39_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.39+ x86-64 Details for moruna-0.4.0-cp314-cp314t-manylinux_2_39_x86_64.whl
moruna-0.4.0-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details for moruna-0.4.0-cp314-cp314t-macosx_11_0_arm64.whl
moruna-0.4.0-cp314-cp314-manylinux_2_39_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.39+ x86-64 Details for moruna-0.4.0-cp314-cp314-manylinux_2_39_x86_64.whl
moruna-0.4.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for moruna-0.4.0-cp314-cp314-macosx_11_0_arm64.whl

Total release size: 286.2 MB

Release files / moruna-0.4.0-cp314-cp314t-manylinux_2_39_x86_64.whl

Download URL moruna-0.4.0-cp314-cp314t-manylinux_2_39_x86_64.whl
Size 75.7 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
85cf10146fd36f13f9d924ee6505a5c2a5cc6c6b8fee2f17c8916f7653312269
BLAKE2b-256 checksum
How to use checksums
be746e15de5a0a6608b60c52148c042b50f6ed395c6e2a6239153a34107f89bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 2, 2026.

Transparency log

Release files / moruna-0.4.0-cp314-cp314t-macosx_11_0_arm64.whl

Download URL moruna-0.4.0-cp314-cp314t-macosx_11_0_arm64.whl
Size 67.4 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ed778d7c083dc65c0cdf1e05b575905304c67776b62ff1677cc1a6a85928fc2f
BLAKE2b-256 checksum
How to use checksums
cc7aedb673a7ccbe6545f4c949c40957e2ea6eb0c0cde2a98fe60b423c73c760
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 2, 2026.

Transparency log

Release files / moruna-0.4.0-cp314-cp314-manylinux_2_39_x86_64.whl

Download URL moruna-0.4.0-cp314-cp314-manylinux_2_39_x86_64.whl
Size 75.7 MB
Tags CPython 3.14 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
8b8327c6f5c1c48b716f05137beb13aecb68b52183fa161c2ef819673516833d
BLAKE2b-256 checksum
How to use checksums
36c6770c1ace0a3f27a4ded4cee4e65bb8d16c6219e3b261e6f8dc4d0842170c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 2, 2026.

Transparency log

Release files / moruna-0.4.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL moruna-0.4.0-cp314-cp314-macosx_11_0_arm64.whl
Size 67.4 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
12e406687e158a146f3ebb77b3ae45175764aa422a38f0d6b12d65770593382e
BLAKE2b-256 checksum
How to use checksums
63e447a77c84c7037886eb89eee933e28ed166eb30d2ac99963086cb6aca7307
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 2, 2026.

Transparency log

Security for moruna 0.4.0

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

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for moruna-0.4.0-cp314-cp314t-manylinux_2_39_x86_64.whl

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 Oct 2, 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.

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