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.1.tar.gz (38.9 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.1-py3-none-any.whl (38.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spork_runtime-0.1.1.tar.gz
  • Upload date:
  • Size: 38.9 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.1.tar.gz
Algorithm Hash digest
SHA256 f91f81a0b67162bb03193db50967d73b0fdecc4296c96406e9393715705409a7
MD5 f07846509ddb805a797f91d00c1a5d25
BLAKE2b-256 b207908fecbbb6ea8d814030a059acd02a50712b5852809984d0d0c8fe6118d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for spork_runtime-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: spork_runtime-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 38.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d4c9ced8039e82510592f1bbe833c8b91543ffd882a86c1b818e2365ba15c6d4
MD5 8e054440c863bc29746dc74b85c752a9
BLAKE2b-256 843910936b043552269ab2b857bca7a3b280c0e5d5f0b6069f99aa0125bfcbb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for spork_runtime-0.1.1-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

This release

0.1.1 This release

2 files

0.1.0

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