Skip to main content

major-requirement-parser

MQL 0.2 semantic IR

Release 0.2.0 exposes the solver-independent MQL 0.2 semantic IR alongside the legacy 0.1 surface parser. The grammar itself has not been migrated yet. Legacy parse results continue to identify their language semantics as 0.1.12; pylibmql.__version__ identifies the installed package as 0.2.0.

Rust callers can deserialize and validate a versioned IR document with:

use libmql::semantic_ir::SemanticProgram;

let program = SemanticProgram::from_json(json)?;
assert_eq!(program.schema_version, "0.2.0");

Python callers use pylibmql.validate_semantic_ir(json). The returned object provides version(), json(), and json_pretty().

The CLI validates and canonicalizes an IR document with:

mql --validate-ir program.json

The normative RFC, schemas, and fixtures are under docs/. This API validates the semantic model; it does not yet perform degree audits or multi-term planning.

Components

  • Command Line Interface
  • Rust Library
  • Python Library (FFI bindings)

Command Line Usage

Usage: mql [OPTIONS] <INPUT>

Arguments:
  <INPUT>
          Path to the input file

Options:
  -o, --output <OUTPUT>
          Path to the output file [Default: output to `stdout`]

      --validate-ir
          Validate and canonicalize an MQL 0.2 semantic IR JSON document

  -D, --var <NAME=EXPR>
          Inject a legacy parser external value

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Python Installation

# minimum version 3.8
pip install pylibmql

Ready to use right away.

import pylibmql

pylibmql.parse(...) retains the legacy 0.1 language. New consumers should exchange and validate the versioned semantic IR with pylibmql.validate_semantic_ir(...).

MQL Syntax

File              ::= SpecialStatement ";" { SpecialStatement ";" } ;

SpecialStatement  ::= Statement ":" String [ ":" QuantitySingle ] ;

Statement         ::= "SELECT" Quantity "FROM" Selector ;

Selector          ::= SelectorList | SelectorSingle ;
SelectorList      ::= "[" SelectorSingle { "," SelectorSingle } "]" ;
SelectorSingle    ::= Statement | XYZ ;

XYZ               ::= QueryName "(" QueryArgument { "," QueryArgument } ")" ;
QueryName         ::= "CLASS" | "class" | "PLACEMENT" | "placement"
                    | "TAG" | "tag" | "RANGE" | "range" ;
QueryArgument     ::= String | ClassArgument ;

ClassArgument     ::= DepartmentId ClassId ;
DepartmentId      ::= UppercaseLetter UppercaseLetter UppercaseLetter UppercaseLetter ;
ClassId           ::= Digit Digit Digit Digit ;

Quantity          ::= QuantityMany | QuantitySingle ;
QuantityMany      ::= QuantitySingle "-" QuantitySingle ;
QuantitySingle    ::= Digit { Digit } ;  (* one or more digits; non-empty *)

String            ::= "\"" { "\"\"" | (AnyCharExcept["\"", "\r", "\n"]) } "\"" ;

(* Lexical *)
UppercaseLetter   ::= "A" | ... | "Z" ;
Digit             ::= "0" | ... | "9" ;

Metadata

Release files for pylibmql 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylibmql 0.2.0
File Size Uploaded Provenance Actions
pylibmql-0.2.0.tar.gz 61.7 kB Without provenance Details for pylibmql-0.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pylibmql 0.2.0
File Actions
pylibmql-0.2.0-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details for pylibmql-0.2.0-cp38-abi3-win_amd64.whl
pylibmql-0.2.0-cp38-abi3-win32.whl CPython 3.8 abi3 Windows x86-32 Details for pylibmql-0.2.0-cp38-abi3-win32.whl
pylibmql-0.2.0-cp38-abi3-musllinux_1_2_x86_64.whl CPython 3.8 abi3 Linux musl 1.2+ x86-64 Details for pylibmql-0.2.0-cp38-abi3-musllinux_1_2_x86_64.whl
pylibmql-0.2.0-cp38-abi3-musllinux_1_2_i686.whl CPython 3.8 abi3 Linux musl 1.2+ x86-32 Details for pylibmql-0.2.0-cp38-abi3-musllinux_1_2_i686.whl
pylibmql-0.2.0-cp38-abi3-musllinux_1_2_armv7l.whl CPython 3.8 abi3 Linux musl 1.2+ ARMv7l Details for pylibmql-0.2.0-cp38-abi3-musllinux_1_2_armv7l.whl
pylibmql-0.2.0-cp38-abi3-musllinux_1_2_aarch64.whl CPython 3.8 abi3 Linux musl 1.2+ ARM64 Details for pylibmql-0.2.0-cp38-abi3-musllinux_1_2_aarch64.whl
pylibmql-0.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details for pylibmql-0.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pylibmql-0.2.0-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl CPython 3.8 abi3 Linux glibc 2.17+ IBM System/390x Details for pylibmql-0.2.0-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
pylibmql-0.2.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl CPython 3.8 abi3 Linux glibc 2.17+ PowerPC 64-le Details for pylibmql-0.2.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
pylibmql-0.2.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.8 abi3 Linux glibc 2.17+ ARMv7l Details for pylibmql-0.2.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
pylibmql-0.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details for pylibmql-0.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
pylibmql-0.2.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl CPython 3.8 abi3 Linux glibc 2.5+ x86-32 Details for pylibmql-0.2.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
pylibmql-0.2.0-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details for pylibmql-0.2.0-cp38-abi3-macosx_11_0_arm64.whl
pylibmql-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details for pylibmql-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl

Total release size: 10.9 MB

Release files / pylibmql-0.2.0.tar.gz

Download URL pylibmql-0.2.0.tar.gz
Size 61.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2c7b36acb8da2bc8339c4044daa3f9277ddbcf9861105d6282d4a03745afe025
BLAKE2b-256 checksum
How to use checksums
c9d63faec554aa70ddee3d58cf476fe1728df308d090acd9581ef9a3e2043230
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-win_amd64.whl

Download URL pylibmql-0.2.0-cp38-abi3-win_amd64.whl
Size 560.6 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
88c152046907153a48bc248e8f5349cc234aff45939f35fd4cee68a101f0cae8
BLAKE2b-256 checksum
How to use checksums
35e919ab2b4c627cb6005b5f96bc72d1b6d5566e3025d2b2541fa93bf6ada791
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-win32.whl

Download URL pylibmql-0.2.0-cp38-abi3-win32.whl
Size 508.8 kB
Tags CPython 3.8 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
ea1fc05b849c15f438aa3b80e0079fc6347d5c9b5ef79186bbf3aebf53396098
BLAKE2b-256 checksum
How to use checksums
5849616d8e78f717a2f7036daab81768be27a52a7f128f5c235633448481c5c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-musllinux_1_2_x86_64.whl

Download URL pylibmql-0.2.0-cp38-abi3-musllinux_1_2_x86_64.whl
Size 943.0 kB
Tags CPython 3.8 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
d98c2baee5ba0f153c678f380b4f1163b9a3bd8f5de3882ea985ce7e618f1b99
BLAKE2b-256 checksum
How to use checksums
d738602182d5ea7eda0d589552223f4478a5cb73855ff2cd15cf0d0ec7da2146
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-musllinux_1_2_i686.whl

Download URL pylibmql-0.2.0-cp38-abi3-musllinux_1_2_i686.whl
Size 980.0 kB
Tags CPython 3.8 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
ae16638f551cf921b818a5a55da2358f12114d2f68e4b4ebfcf5cdddfedc8def
BLAKE2b-256 checksum
How to use checksums
9a5e83a2a8625ead2fddd9c9ab8c9878770a7e963316772d1946699bd2554ad1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-musllinux_1_2_armv7l.whl

Download URL pylibmql-0.2.0-cp38-abi3-musllinux_1_2_armv7l.whl
Size 1.0 MB
Tags CPython 3.8 Linux musl 1.2+ ARMv7l abi3
SHA-256 checksum
How to use checksums
ef3b0431c285059cea64f0c7d693b0690d66a7385bf3bb6643577cc90a78424e
BLAKE2b-256 checksum
How to use checksums
5c83e4c3f2770d83a7f83d59e903f15c477c36c39d2cb479a211a199a8ba967d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-musllinux_1_2_aarch64.whl

Download URL pylibmql-0.2.0-cp38-abi3-musllinux_1_2_aarch64.whl
Size 892.3 kB
Tags CPython 3.8 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
54e01b64becd9db6f3cd74ff7d277348781f36642ebfdc12f1edcfc380764bf9
BLAKE2b-256 checksum
How to use checksums
ba015f2c769e34575c86bae41b0c0818fb602315aa7db9d14af15918a66c918f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pylibmql-0.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 724.2 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
16fa74b0a7b3851cc82d515d0f2749efb145e4a26e28ae86012a8a868d7b4830
BLAKE2b-256 checksum
How to use checksums
b9a62ee7d436c0766b9fb8060f63041f9614867a630f5a355c781b9f6e2ee064
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl

Download URL pylibmql-0.2.0-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Size 791.4 kB
Tags CPython 3.8 Linux glibc 2.17+ IBM System/390x abi3
SHA-256 checksum
How to use checksums
682fa6a0fcacceddece0f0beec39491c774e17a9dbce2f63facddb5163d5b0fd
BLAKE2b-256 checksum
How to use checksums
edc8ed449e693542c0b82f80f176d88775407187c22b7fdf7fe60aef9dc27886
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

Download URL pylibmql-0.2.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Size 896.3 kB
Tags CPython 3.8 Linux glibc 2.17+ PowerPC 64-le abi3
SHA-256 checksum
How to use checksums
3c670434e2262a4bb4bb648a707ae1bde6ff82f6a673836a892f6235de5f0b1e
BLAKE2b-256 checksum
How to use checksums
79fbdf49d9ecfa17ac2c766f42005ae81a2297f11cb3aa2327046f17729d0e66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL pylibmql-0.2.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 727.5 kB
Tags CPython 3.8 Linux glibc 2.17+ ARMv7l abi3
SHA-256 checksum
How to use checksums
ac87eb700b4afbd5bec5acd8fce99b198253649a94556d2d801f683582390a5b
BLAKE2b-256 checksum
How to use checksums
f26fd1cdd0ca9425e6b9b01e58a373fe292ddc24cacb5bfddc5145fe49decb1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL pylibmql-0.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 714.9 kB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
ed36b47666fe3d7c6d1bc9c4169cead3ec2737d7f7ba7d644e35deabf4b0eed7
BLAKE2b-256 checksum
How to use checksums
8a4c4de1e61ef360b30eb5c5b7f16684973bd0ceb1aac3d53c8c484eac78c19c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl

Download URL pylibmql-0.2.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Size 785.2 kB
Tags CPython 3.8 Linux glibc 2.5+ x86-32 abi3
SHA-256 checksum
How to use checksums
65b1e1193c99e293c569659a274f7de7d0ba75e94718272676094e80ce7ba047
BLAKE2b-256 checksum
How to use checksums
2771759f6bab670de3966c64bc13742956363e826d2e025f154f28c69c9a8d01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-macosx_11_0_arm64.whl

Download URL pylibmql-0.2.0-cp38-abi3-macosx_11_0_arm64.whl
Size 648.1 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
60ecb99301a652678beadada39d763b74ba0168e825526c9672fd1a1027bd6b0
BLAKE2b-256 checksum
How to use checksums
0ea029d593770f7831fb0a78d0da0fd2af6de39a917f5dc4c4f4e169c86b3cec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / pylibmql-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl

Download URL pylibmql-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl
Size 667.8 kB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8e91fb256c21c8f01b9ea11bc68e884d6db80d7518e0aa3f079fb7fd4f42ceb5
BLAKE2b-256 checksum
How to use checksums
68c4d1d018ec102033d77b92c7c6e06653fa06847682347696c1c477dbff5cf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Security for pylibmql 0.2.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