Skip to main content

serpentine-shim

The runtime companion of the Serpentine compiler. It provides the ownership vocabulary — Owned, Ref, Mut, Shared, Weak, move, @native — as runtime no-ops, so a Serpentine program is also a valid, runnable CPython program:

from serpentine import Owned, Ref, move

def total(prices: Ref[list[float]]) -> float:
    return sum(prices)

def main() -> None:
    prices: Owned[list[float]] = [9.99, 4.50]
    print(total(prices))
    archive = move(prices)   # lambda x: x at runtime; a semantic move to `serp check`

Under CPython this package does nothing except make the imports resolve: the wrappers are typing.Annotated aliases (so Owned[list[float]] is list[float] to any type checker) and move returns its argument. All semantics live in the static checker, serp check.

This package is intentionally frozen and tiny: its public API is part of the Serpentine language spec (SPEC.md).

Download files

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

Source Distribution

serpentine_shim-0.3.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

serpentine_shim-0.3.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file serpentine_shim-0.3.0.tar.gz.

File metadata

  • Download URL: serpentine_shim-0.3.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for serpentine_shim-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4d1645a57342e4b7245f81c5b52b6ee2ad63d63a5ee0fdc9be37c3a4c48dfab0
MD5 6670aeb61aaaf7e5ca0f96993092edc4
BLAKE2b-256 8fa892cb74c254f165b9845a169369a676fb7f60136397484cd27cb27524225f

See more details on using hashes here.

Provenance

The following attestation bundles were made for serpentine_shim-0.3.0.tar.gz:

Publisher: release.yml on avijitbhuin21/Serpentine

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

File details

Details for the file serpentine_shim-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for serpentine_shim-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 04ad1ed94f6852fd14594e45342938b4f4d43dc807adcc7121cc8b0520ee900e
MD5 5f7f64c67a05593643a813054eba15fe
BLAKE2b-256 1a32b91314ed402d29a892bdc2445675768b1659d7d22e1b395f654dc7360154

See more details on using hashes here.

Provenance

The following attestation bundles were made for serpentine_shim-0.3.0-py3-none-any.whl:

Publisher: release.yml on avijitbhuin21/Serpentine

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page