Skip to main content

spork-runtime

spork-runtime is the runtime distribution for Spork programs. It contains:

  • the runtime types and helpers emitted Python code depends on;
  • persistent collection integration backed by spork-pds;
  • namespace and protocol support;
  • JSON support and declared-test descriptors; and
  • the Spork standard library implemented as ordinary Python modules.

It intentionally contains no reader, compiler, import hook, or .spork source files. A compiled Spork application can therefore depend on spork-runtime without installing spork-lang or compiling the standard library during installation.

Install

pip install spork-runtime

Python API

from spork.runtime import Keyword, assoc, get, hash_map, vec
from spork.std import map as maps
from spork.std import string

users = hash_map(Keyword("count"), 1)
users = maps.update(users, Keyword("count"), lambda value: value + 1)
assert get(users, Keyword("count")) == 2
assert string.join(", ", vec("Spork", "Python")) == "Spork, Python"

Python standard-library modules mirror the Spork namespaces:

Spork namespace Python module
std.string spork.std.string
std.map spork.std.map
std.json spork.std.json

spork.std.prelude.MACROS exposes the built-in macro implementations as Python callables for the compiler to install into its macro environment.

Development

python -m venv .venv
.venv/bin/python -m pip install -e '.[dev]'
.venv/bin/python -m pytest
.venv/bin/python -m build

The spork directory is an implicit namespace package. This allows spork-runtime, spork-pds, and spork-lang to provide separate portions of the same Python namespace.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spork_runtime-0.1.0.tar.gz (39.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spork_runtime-0.1.0-py3-none-any.whl (38.2 kB view details)

Uploaded Python 3

File details

Details for the file spork_runtime-0.1.0.tar.gz.

File metadata

  • Download URL: spork_runtime-0.1.0.tar.gz
  • Upload date:
  • Size: 39.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for spork_runtime-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a41f47c10444089065452ebcd10604edf20945d2a623bdd93f6d2c85c272fe11
MD5 57c2feef81fa001dddd1d5cc38d4a75e
BLAKE2b-256 d133e9213733dc55ad96ac3c14eb99b150c645c21e3d190dc7a117086363a1e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for spork_runtime-0.1.0.tar.gz:

Publisher: build.yml on spork-it/spork-runtime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spork_runtime-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: spork_runtime-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for spork_runtime-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 daae334fc9e733ca47e904bde8e5c1b11e793eef1f67084812925585b693bc6c
MD5 1fa076d89f32795c27f0f0df058c2293
BLAKE2b-256 6587f6a55b8f100e1f1c2dcd4fc741668cffd31115911894578a08786007868a

See more details on using hashes here.

Provenance

The following attestation bundles were made for spork_runtime-0.1.0-py3-none-any.whl:

Publisher: build.yml on spork-it/spork-runtime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

2 files

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