Skip to main content

pyds

The Python binding for libds, the DS rules engine.

import pyds

engine = pyds.from_source("""\
use default

schema Reading scope ttl 1_min:
    sensor: String
    celsius: Float
""")
fid = engine.assert_("Reading", sensor="t1", celsius=21.5)
engine.pump()
  • pyds.compile runs the DS compiler, dsc, and returns the artefact as bytes. A wheel carries its own dsc, and installs it as the dsc command.
  • pyds.Engine loads an artefact, takes facts and runs the rules.
  • A failed libds call raises a subclass of pyds.Error; its status is a pyds.Status.

Requires CPython 3.12 or later. Licensed under BSD-4-Clause OR AGPL-3.0-or-later, at your choice.

Building and testing from source

Build libds.a first, as PORTING.md at the repository root describes. Then, from this directory:

pip install . --group test
pytest tests

The tests compile DS source, so they need the compiler: set DS_MERCURY_DSC to a dsc from the release libds tarball of the same release as the tree, or put one on PATH.

Metadata

Release files for ds-lang 1.1.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 ds-lang 1.1.0
File Interpreter ABI Platform Actions
ds_lang-1.1.0-cp312-abi3-manylinux_2_39_x86_64.whl CPython 3.12 abi3 Linux glibc 2.39+ x86-64 Details for ds_lang-1.1.0-cp312-abi3-manylinux_2_39_x86_64.whl
ds_lang-1.1.0-cp312-abi3-manylinux_2_39_riscv64.whl CPython 3.12 abi3 Linux glibc 2.39+ RISC-V 64 Details for ds_lang-1.1.0-cp312-abi3-manylinux_2_39_riscv64.whl
ds_lang-1.1.0-cp312-abi3-manylinux_2_39_aarch64.whl CPython 3.12 abi3 Linux glibc 2.39+ ARM64 Details for ds_lang-1.1.0-cp312-abi3-manylinux_2_39_aarch64.whl

Total release size: 30.2 MB

Release files / ds_lang-1.1.0-cp312-abi3-manylinux_2_39_x86_64.whl

Download URL ds_lang-1.1.0-cp312-abi3-manylinux_2_39_x86_64.whl
Size 10.4 MB
Tags CPython 3.12 Linux glibc 2.39+ x86-64 abi3
SHA-256 checksum
How to use checksums
014cc9d0a8afcd125cd11315d12084dd1b0d3589c10509b7a1d1d252e75906ec
BLAKE2b-256 checksum
How to use checksums
b5cb4428bbc736a1d65dc80ba780ee82dd751432c581aeb73a925667e523ed0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.14

Release files / ds_lang-1.1.0-cp312-abi3-manylinux_2_39_riscv64.whl

Download URL ds_lang-1.1.0-cp312-abi3-manylinux_2_39_riscv64.whl
Size 9.7 MB
Tags CPython 3.12 Linux glibc 2.39+ RISC-V 64 abi3
SHA-256 checksum
How to use checksums
d01e47c518d982f8749eb91d5d7302faaf6c340738c0c98eb2287df845317eac
BLAKE2b-256 checksum
How to use checksums
02c71b42569fafa579fd7de9a20b2955c40b438d88eec6c802d0754b48dd3b21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.14

Release files / ds_lang-1.1.0-cp312-abi3-manylinux_2_39_aarch64.whl

Download URL ds_lang-1.1.0-cp312-abi3-manylinux_2_39_aarch64.whl
Size 10.1 MB
Tags CPython 3.12 Linux glibc 2.39+ ARM64 abi3
SHA-256 checksum
How to use checksums
e8eaaea789c1209ca33cbb1f9ef2a162cb1cd3c9987216b61e65448f3eca6970
BLAKE2b-256 checksum
How to use checksums
3027b2556a361fa23566845305c0b2a09579a565189f62cd13180f6c6f752146
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.14

Security for ds-lang 1.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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