Python implemented on the BEAM, packaged with Erlang/OTP
Project description
Pyrlang
Pyrlang is Python implemented on the BEAM, primarily in Erlang/OTP.
The project goal is not to build a CPython package, a python -m runner, or a
Python library that mimics Erlang. Pyrlang source is parsed, loaded, evaluated,
interpreted, or compiled by BEAM-resident runtime code.
Current repository contents:
SPEC.md: language and runtime semantics.WEB.md: Pyrunicorn WSGI target architecture.src/: BEAM-native Erlang runtime modules.test/: EUnit tests for the current runtime slice.bin/: BEAM-native escript entrypoints forpyrlangandpyrunicorn.include/: shared Erlang definitions.Makefile: plainerlc/erlbuild and test entrypoint.
Implemented foundation:
- Actor-local heaps and mutable container/object references.
- Message export/import with copied mutable values and cyclic object graphs.
Native stdlib objects that close over actor-local state or BEAM resources are
marked unsendable and surface as Pyrlang
TypeErrorthrough source-levelsend(). - BEAM actor primitives: spawn, send, receive, selective receive, call/reply,
source-level links, monitors, demonitoring, linked spawn, exit trapping,
registration, source-level receive timeouts, and explicit atom-safe Erlang
calls through
erlang.apply. - Parser/evaluator subset for expressions, assignments, functions, classes,
methods, attributes, subscripts, decorators,
if/elif/else,while,for,try/except/finally,with,yield, lambdas, boolean operators, membership, identity comparisons, simple slices, keyword/default arguments,*args/**kwargs, call expansion,range, and list/dict/set comprehensions. - Literal support for
None, booleans, integers, floats, strings, bytes, tuples, lists, dicts, and sets. - Object model foundation: classes, instances, descriptors, bound methods, and
C3 MRO, including
super(),property,staticmethod,classmethod, and callable instances plus arithmetic/comparison special-method dispatch. Class suites execute supported Pyrlang statements including nested classes, imports, conditionals, loops, exception handlers, and context managers. - Basic metaclass creation and inherited metaclass selection through
class C(metaclass=...)andtype(name, bases, attrs). - Dynamic object helpers:
getattr,setattr,hasattr,isinstance,issubclass, andtype(obj)for Pyrlang instances. - BEAM-backed
open()for basic file read/write/close and context-manager use, with live file handles marked as actor-local unsendable resources. - Actor-local module/package loading/imports from
.pyand__init__.pysource files, with.pyraccepted as a legacy project-local extension, plus BEAM-nativeerlang,os,re,hashlib,hmac,secrets,contextvars,weakref,threading,importlib,datetime,decimal,logging,pathlib,http.cookies,urllib.parse, andemail.utilsmodules, plus a minimal actor-backedsqlite3DB-API surface. - Pyrlang exception values with catch/raise flow,
StopIteration, catchable attribute/subscript/operator errors, and bareraisere-raising the active exception inside exception handlers. - Generator objects, the user-visible
__iter__/__next__protocol, and source-level mutable list/dict operations, includingiter,list,tuple,dict, andsetconstructors. - One-for-one supervisor foundation.
- Actor-backed SQLite access through an Erlang port to
sqlite3, with connection-scoped transactions, DB-API connection/cursor objects marked as actor-local resources, and connection actor crashes mapped to DB-API operational errors. - Pyrunicorn WSGI environ/worker/http/server foundation that loads Pyrlang
module:callableapps inside worker actors, provides basic WSGI stream objects with sized and line reads, supports iterable response bodies and thestart_responsewrite callable includingexc_inforeplacement before headers are sent, threads configured and socket-derived WSGI environ values such asSERVER_PORTandREMOTE_ADDRinto Pyrlang-source apps, isolates worker module globals, returns 400 responses for malformed requests and 500 responses for app and worker failures, readsContent-Lengthbodies across TCP packets, serves over a real TCP socket with a round-robin worker pool, restarts crashed workers, and boots a small Pyrlang-source Django-shaped WSGI shim with a minimal middleware chain. - BEAM-native
bin/pyrlangandbin/pyrunicornescript wrappers.pyrunicornaccepts--bind,--workers,--django-settings-module, and--path. pyrlang -m module ...executes a module or package__main__.pythrough the Pyrlang runtime and exposes arguments through the BEAM-nativesys.argv.
Run the current verification suite:
make test
Build and refresh executable entrypoint bits:
make entrypoints
This repository implements the current scoped contracts in SPEC.md and
WEB.md: Python-syntax Pyrlang source running on BEAM-resident runtime code,
actor-backed runtime behavior, and Pyrlang-source WSGI on BEAM-native
Pyrunicorn. Larger Python and Django compatibility areas remain outside the
current scope until the specifications are expanded.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrlang-0.1.2-py3-none-win_amd64.whl.
File metadata
- Download URL: pyrlang-0.1.2-py3-none-win_amd64.whl
- Upload date:
- Size: 47.0 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7adc20e69118976d5ca7762e15d64cd76aa8780902d3b4b188763f730750feb9
|
|
| MD5 |
fc7023c31c5c0e7bb9583b9d37d244c6
|
|
| BLAKE2b-256 |
99d1e803719e6e55495db25b48d9d30920702c2772f278998407b7acbd37bf6a
|
Provenance
The following attestation bundles were made for pyrlang-0.1.2-py3-none-win_amd64.whl:
Publisher:
release.yml on grantjenks/pyrlang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrlang-0.1.2-py3-none-win_amd64.whl -
Subject digest:
7adc20e69118976d5ca7762e15d64cd76aa8780902d3b4b188763f730750feb9 - Sigstore transparency entry: 1503297405
- Sigstore integration time:
-
Permalink:
grantjenks/pyrlang@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/grantjenks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrlang-0.1.2-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: pyrlang-0.1.2-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 34.7 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bc3aa11ce3fbe1f3be6922accac977b5b22ecb6b27b2a465b4e980be560dd04
|
|
| MD5 |
c03c064345f125e39b5adcc19533aa3a
|
|
| BLAKE2b-256 |
81f92f9cd29f3b40ebb58e0128aaa219bc0fb9842998d75523f8208fdee608c5
|
Provenance
The following attestation bundles were made for pyrlang-0.1.2-py3-none-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on grantjenks/pyrlang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrlang-0.1.2-py3-none-musllinux_1_2_x86_64.whl -
Subject digest:
9bc3aa11ce3fbe1f3be6922accac977b5b22ecb6b27b2a465b4e980be560dd04 - Sigstore transparency entry: 1503297925
- Sigstore integration time:
-
Permalink:
grantjenks/pyrlang@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/grantjenks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrlang-0.1.2-py3-none-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: pyrlang-0.1.2-py3-none-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 33.5 MB
- Tags: Python 3, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc282a0db0bc0c7b7c63cda00dcf1b97d520c716048023209ffae696b452dcd0
|
|
| MD5 |
19a350c25dc73caea2d10fd2d8a57921
|
|
| BLAKE2b-256 |
d7f3680349525a984aec7823cc577b080813fb3a2444bf0297d6991acfe658e9
|
Provenance
The following attestation bundles were made for pyrlang-0.1.2-py3-none-musllinux_1_2_aarch64.whl:
Publisher:
release.yml on grantjenks/pyrlang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrlang-0.1.2-py3-none-musllinux_1_2_aarch64.whl -
Subject digest:
dc282a0db0bc0c7b7c63cda00dcf1b97d520c716048023209ffae696b452dcd0 - Sigstore transparency entry: 1503297853
- Sigstore integration time:
-
Permalink:
grantjenks/pyrlang@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/grantjenks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrlang-0.1.2-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyrlang-0.1.2-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 33.5 MB
- Tags: Python 3, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
604d7cec4baf32d24e85ade030657ca6636de2eb4836a862974b205ff6c173ea
|
|
| MD5 |
ae2f13234951c6dbca36606369a888bc
|
|
| BLAKE2b-256 |
521a97093e3fc1dfc5ccb44fd27604f980a8486f9b69b298a305db67d812cf75
|
Provenance
The following attestation bundles were made for pyrlang-0.1.2-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
release.yml on grantjenks/pyrlang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrlang-0.1.2-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
604d7cec4baf32d24e85ade030657ca6636de2eb4836a862974b205ff6c173ea - Sigstore transparency entry: 1503297452
- Sigstore integration time:
-
Permalink:
grantjenks/pyrlang@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/grantjenks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrlang-0.1.2-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pyrlang-0.1.2-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 32.2 MB
- Tags: Python 3, manylinux: glibc 2.27+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51d16503678820be63c4b60276868deb053ebfb6ab25fb3b85b3501179291252
|
|
| MD5 |
18e738141f8bb0e94a53d08bea3da47b
|
|
| BLAKE2b-256 |
5f0e0c20200c1a470533ec4aae590082517acfd270ad1f36af69ee92a90dd140
|
Provenance
The following attestation bundles were made for pyrlang-0.1.2-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:
Publisher:
release.yml on grantjenks/pyrlang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrlang-0.1.2-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl -
Subject digest:
51d16503678820be63c4b60276868deb053ebfb6ab25fb3b85b3501179291252 - Sigstore transparency entry: 1503297552
- Sigstore integration time:
-
Permalink:
grantjenks/pyrlang@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/grantjenks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrlang-0.1.2-py3-none-macosx_14_0_x86_64.whl.
File metadata
- Download URL: pyrlang-0.1.2-py3-none-macosx_14_0_x86_64.whl
- Upload date:
- Size: 13.6 MB
- Tags: Python 3, macOS 14.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86cb95dc0f4b11a4e0dcada936ff9dd0b00f9159c50269f8bc64bc21a873fe7b
|
|
| MD5 |
d4fc5846c7190561c4a0091899fd39fd
|
|
| BLAKE2b-256 |
e09863ad26678f9db449abb9c75b31301fe1df90243c52742a4e64bea769fa5b
|
Provenance
The following attestation bundles were made for pyrlang-0.1.2-py3-none-macosx_14_0_x86_64.whl:
Publisher:
release.yml on grantjenks/pyrlang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrlang-0.1.2-py3-none-macosx_14_0_x86_64.whl -
Subject digest:
86cb95dc0f4b11a4e0dcada936ff9dd0b00f9159c50269f8bc64bc21a873fe7b - Sigstore transparency entry: 1503297768
- Sigstore integration time:
-
Permalink:
grantjenks/pyrlang@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/grantjenks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrlang-0.1.2-py3-none-macosx_14_0_arm64.whl.
File metadata
- Download URL: pyrlang-0.1.2-py3-none-macosx_14_0_arm64.whl
- Upload date:
- Size: 13.7 MB
- Tags: Python 3, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3341822c4fcf04b998212f80ecb3c5bcbbef50132dd82752f2c1a9d062f17932
|
|
| MD5 |
dc680731439b9ab50c79da21d5501525
|
|
| BLAKE2b-256 |
62b7d3912a6ae89c04511ce67de88fcf5f12abe2f102f76272748c66382914f5
|
Provenance
The following attestation bundles were made for pyrlang-0.1.2-py3-none-macosx_14_0_arm64.whl:
Publisher:
release.yml on grantjenks/pyrlang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrlang-0.1.2-py3-none-macosx_14_0_arm64.whl -
Subject digest:
3341822c4fcf04b998212f80ecb3c5bcbbef50132dd82752f2c1a9d062f17932 - Sigstore transparency entry: 1503297651
- Sigstore integration time:
-
Permalink:
grantjenks/pyrlang@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/grantjenks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6f19d47f1d0af7422dd4cf9dba467537105af360 -
Trigger Event:
push
-
Statement type: