Python V1 · Deprecated

Manifests

Manifests in the Python V1 binding.

The Python V1 manifests reference continues the Python V1 overview.

Loading path

The C entry points in this section describe the existing shim's low-level integration, not the opaque facade used by Python Next.

There are two ways to get a policy loaded: the Manifest path (JSON manifest, SHA-256 verification, Public Query Whitelist) and the Inline path (raw .dl text, no manifest, no whitelist). Each path has two variants:

PathVariantC API
Manifestfilemaelys_datalog_manifest_load_ex — manifest JSON and policy read from disk.
Manifestbuffermaelys_datalog_manifest_load_from_text — manifest JSON and policy source passed in memory.
Inlinestaticmaelys_datalog_load_policy_inline_with_static_domain — domain and policy loaded in one call, from a compile-time predicate table.
Inlinedynamicmaelys_datalog_load_policy_inline — domain registered separately, beforehand. → supported by this binding.

This binding supports exactly one of these four: Inline, dynamic. Neither Manifest variant is supported — no SHA-256 verification, no Public Query Whitelist. See Registries — Loading paths for the full model behind all four.

Domain Registry
vocabulary authority
Manifest · file
  1. File
    manifest_load_ex
Manifest · buffer
  1. Buffer
    manifest_load_from_text
Inline · static
  1. Static
    inline_with_static_domain
Inline · dynamic
  1. Dynamic
    this binding

ruleset = engine.load_inline_ruleset(domain, ruleset_id, source) calls the shim's maelys_py_load_inline_ruleset, which wraps maelys_datalog_load_policy_inline directly. engine.register_domain(...) calls maelys_datalog_domain_registry_register — the registration step the dynamic variant expects to have happened beforehand. Together, the two Python calls are the dynamic variant, unchanged from its C shape: register, then load.

Why not the static variant too? load_policy_inline_with_static_domain collapses registration and loading into one call, specifically for a domain already written as a compile-time C array (see Registries — Method 1). That solves a C-specific problem: skipping a second call when the table is already sitting in C source. In Python, register_domain(name, predicates) from a plain list is already the one-call ergonomic — there is no compile-time C array to skip past, so adding the combined function would just reimplement what two Python calls already do.

Why not the Manifest path? SHA-256 verification and a Public Query Whitelist are real, missing capabilities — not something the current model already covers under a different name. Adding either variant is a bounded change (a new shim export mirroring load_inline_ruleset, calling maelys_datalog_manifest_load_from_text for the buffer form, with the manifest JSON and SHA-256 built in Python via hashlib) — deferred because no current caller of this binding loads policy source from an untrusted or external source that would need integrity verification before execution.