Registry / data / pytrilogy

pytrilogy

JSON →
library0.3.246pypypiunverified

A declarative, typed query language that compiles to SQL. Current version 0.3.246. Release cadence is frequent, pre-1.0 breaking changes may occur.

pip install pytrilogy
INSTALL
IMPORT
SIG · PYTRILOGY
P
pytrilogy
datapythonv0.3.246
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

compile
✓ from trilogy import compile
✗ from pytrilogy import compile
CONFIG
✓ from trilogy import CONFIG
Dialects
✓ from trilogy import Dialects

Compile a simple Trilogy query to SQL. The compile function returns an object with .sql and .params attributes.

from pytrilogy import compile query = ''' import std # Declare a variable let x = 5 # Return the variable as a column named "val" source = from x in std.from_list([x]) select { val: x } ''' result = compile(query, dialect='postgres') print(result.sql)
Debug
Known issues
breakingThe library is pre-1.0; breaking changes occur frequently. Pin your version or expect sudden API changes.
fix
Pin version in requirements, e.g., pytrilogy==0.3.246.
affects: <1.0
gotchaThe 'compile' function must be imported directly from the package. Importing pytrilogy and calling pytrilogy.compile may fail.
fix
Use 'from pytrilogy import compile'.
affects: all
gotchaThe library expects a specific dialect string (e.g., 'postgres', 'bigquery', 'sqlite'). Using an unsupported dialect may cause cryptic errors.
fix
Check the supported dialects in the documentation. Use a known dialect like 'postgres' or 'bigquery'.
affects: all
deprecatedOlder versions used 'from pytrilogy import pytrilogy_compile' or similar; always use the top-level 'compile'.
fix
Update to 'from pytrilogy import compile'.
affects: <0.3.0
Upgrade
Version history
0.3.246latest on PyPI · released May 1, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources