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.1

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.1
File Actions
ds_lang-1.1.1-cp312-abi3-musllinux_1_2_x86_64.whl CPython 3.12 abi3 Linux musl 1.2+ x86-64 Details for ds_lang-1.1.1-cp312-abi3-musllinux_1_2_x86_64.whl
ds_lang-1.1.1-cp312-abi3-musllinux_1_2_aarch64.whl CPython 3.12 abi3 Linux musl 1.2+ ARM64 Details for ds_lang-1.1.1-cp312-abi3-musllinux_1_2_aarch64.whl
ds_lang-1.1.1-cp312-abi3-manylinux_2_39_x86_64.whl CPython 3.12 abi3 Linux glibc 2.39+ x86-64 Details for ds_lang-1.1.1-cp312-abi3-manylinux_2_39_x86_64.whl
ds_lang-1.1.1-cp312-abi3-manylinux_2_39_riscv64.whl CPython 3.12 abi3 Linux glibc 2.39+ RISC-V 64 Details for ds_lang-1.1.1-cp312-abi3-manylinux_2_39_riscv64.whl
ds_lang-1.1.1-cp312-abi3-manylinux_2_39_aarch64.whl CPython 3.12 abi3 Linux glibc 2.39+ ARM64 Details for ds_lang-1.1.1-cp312-abi3-manylinux_2_39_aarch64.whl

Total release size: 51.5 MB

Release files / ds_lang-1.1.1-cp312-abi3-musllinux_1_2_x86_64.whl

Download URL ds_lang-1.1.1-cp312-abi3-musllinux_1_2_x86_64.whl
Size 10.8 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
8b89c1c45c189720a1bf27695c4aa7f44b4ed7c2548e36fffa10a05297d2acdc
BLAKE2b-256 checksum
How to use checksums
e013aa5692d1730370f11fcad92e580a1ce855be3dbdfd40555d109a0e03523d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.14

Release files / ds_lang-1.1.1-cp312-abi3-musllinux_1_2_aarch64.whl

Download URL ds_lang-1.1.1-cp312-abi3-musllinux_1_2_aarch64.whl
Size 10.5 MB
Tags CPython 3.12 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
cab227aaf4e3b5de302c461f1fc9dfdda6531d0ef053afe485e21f079ca8420f
BLAKE2b-256 checksum
How to use checksums
75f12042616fd45d74e23eae952832d4749b5e2f666b1e4339031e2a0386135d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.14

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

Download URL ds_lang-1.1.1-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
119552b4eec96e569a77a830532c31d8255e5151cac348293a9f79733b1ed1ae
BLAKE2b-256 checksum
How to use checksums
668d1a9d48c08fa12cca156ffa5622df8ea71f97d7a1d7c8ab7cbb36dd0ba4cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.14

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

Download URL ds_lang-1.1.1-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
191b297934d0f3cddeccb5460a481bb213370c8286537394feddc0861ad52fa3
BLAKE2b-256 checksum
How to use checksums
5f3ec4329f2250919c3a0c179f5663812b3f3173df745670949b4b8fc3593a6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.14

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

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

Security for ds-lang 1.1.1

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