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.0.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.0.0
File Interpreter ABI Platform Actions
ds_lang-1.0.0-cp312-abi3-manylinux_2_39_x86_64.whl CPython 3.12 abi3 Linux glibc 2.39+ x86-64 Details for ds_lang-1.0.0-cp312-abi3-manylinux_2_39_x86_64.whl
ds_lang-1.0.0-cp312-abi3-manylinux_2_39_riscv64.whl CPython 3.12 abi3 Linux glibc 2.39+ RISC-V 64 Details for ds_lang-1.0.0-cp312-abi3-manylinux_2_39_riscv64.whl
ds_lang-1.0.0-cp312-abi3-manylinux_2_39_aarch64.whl CPython 3.12 abi3 Linux glibc 2.39+ ARM64 Details for ds_lang-1.0.0-cp312-abi3-manylinux_2_39_aarch64.whl

Total release size: 30.1 MB

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

Download URL ds_lang-1.0.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
eee80e5eeb6fe62d70b45a5bbfb7fb800fa03a0c0d3cbf82365a1911cc7007fe
BLAKE2b-256 checksum
How to use checksums
0cbc08653a89f3de163e474ef0ddd680a5e3ab90d6c611535898e74614353d01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.14

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

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

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

Download URL ds_lang-1.0.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
cc452623dd470dc8f1c0f9f8cb5cbc11cf6845c67a4de4e52ccd4f97cc831d8d
BLAKE2b-256 checksum
How to use checksums
ed78075786fd1f8e3d0840bb2bbda61b3e9472f3953b7dd8fd48eff25d666e99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.14

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