Skip to main content

Pylon

Async PostgreSQL mapper for the JALDIS platform. Provides a schema definition DSL, an PyQL query language, OpenSearch integration, and vector index support.

Requirements

  • Python 3.13+
  • PostgreSQL 18+

Installation

pip install pylon-db

For the native Rust client — PyQL queries from Rust, no Python interpreter involved — add the pylon-db-client crate instead:

[dependencies]
pylon-db-client = "0.2"

It is published as pylon-db-client and imported as pylon_client; see the Rust client reference.

Configuration

Pylon is configured programmatically via Config and its child dataclasses.

import os
from pylon import Client, Config, DatabaseConfig, SearchConfig, ModelConfig

client = Client(
    config=Config(
        database=DatabaseConfig(
            host="localhost",
            port=5432,
            name="mydb",
            user="myuser",
            password=os.environ["PYLON_DB_PASSWORD"],
        ),
        search=SearchConfig(
            host="localhost",
            port=9200,
            password=os.environ["PYLON_SEARCH_PASSWORD"],
        ),
        models=ModelConfig(
            api_style="openai",
            api_url="https://api.openai.com",
            model="text-embedding-3-small",
            secret=os.environ["OPENAI_API_KEY"],
        ),
    )
)

A pylon.toml file can be used instead via load_config():

from pylon import Client
from pylon.config import load_config

client = Client(config=load_config())

See the configuration reference for the full pylon.toml schema.

Development

Pylon is a Rust workspace plus a Python package; the two are joined by a PyO3 extension module (pylon._core) built with maturin.

Building

maturin develop      # builds pylon._core into the active virtualenv
pip install -e ./    # maturin develop alone can leave a stale .so behind

The test suite fails fast with a "rebuild it" message if pylon._core is older than the Python code being tested against it, rather than silently skipping the affected tests.

Testing

python -m pytest                        # Python suite (live-DB tests excluded)
cargo test --workspace --exclude pylon-py   # Rust suite

--exclude pylon-py is required, and is not the same caveat as excluding it from linting. PyO3 extension modules link against the interpreter through build configuration that only maturin supplies, so a plain cargo build or cargo test on that crate fails at the link step with undefined symbols (_PyList_New, _Py_NoneStruct, …). It still type-checks fine, which is why CI runs cargo clippy -p pylon-py --lib separately — that crate is the only consumer of several pylon-core/pylon-pgcon APIs, so skipping it entirely would let a signature change break the extension unnoticed.

Live-Postgres tests are opt-in and need a throwaway database:

export PYLON_PGCON_TEST_DSN=postgresql://postgres:postgres@localhost:5432/pylon_live_test
cargo test --workspace --exclude pylon-py -- --ignored --test-threads=1
python -m pytest -m live_db

These create and drop schemas freely — never point them at a real database.

Linting

cargo clippy --workspace --exclude pylon-py --all-targets -- -D warnings
cargo clippy -p pylon-py --lib -- -D warnings
cargo fmt --check
ruff check pylon tests
ruff format --check pylon tests

Metadata

Release files for pylon-db 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 pylon-db 0.2.0
File Size Uploaded
pylon_db-0.2.0.tar.gz 1.0 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for pylon-db 0.2.0
File
pylon_db-0.2.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
pylon_db-0.2.0-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
pylon_db-0.2.0-cp314-cp314-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64 Details
pylon_db-0.2.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
pylon_db-0.2.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pylon_db-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
pylon_db-0.2.0-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details
pylon_db-0.2.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details

Total release size: 50.0 MB

Release files / pylon_db-0.2.0.tar.gz

Download URL pylon_db-0.2.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
807de9f99875814a2aad6dbd3e4bc8a90f8d3223e0dcefc8548319c48737d8a5
BLAKE2b-256 checksum
How to use checksums
32af192806eb2d0563a9611f26921d75bf23f9d4895d79b2ecf787ae3150170c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / pylon_db-0.2.0-cp314-cp314-win_amd64.whl

Download URL pylon_db-0.2.0-cp314-cp314-win_amd64.whl
Size 5.8 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
2b3c356edc4047854d42bb3c20f6d974a067e70023b9b3e9d04dfbad80b7652e
BLAKE2b-256 checksum
How to use checksums
b64385b7836678e4e30482686ee15a700e6e311752519788f6566fbee67e828a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / pylon_db-0.2.0-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL pylon_db-0.2.0-cp314-cp314-manylinux_2_28_x86_64.whl
Size 6.4 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
04bcdd176f26b650a3b4711a85e48419b7ce604bf9d9760a1bffb4bde88fa4ef
BLAKE2b-256 checksum
How to use checksums
32c8a41e21c84519601f3e0486a8c4c15aa643347cc716d50fd82b41c965a12c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / pylon_db-0.2.0-cp314-cp314-manylinux_2_28_aarch64.whl

Download URL pylon_db-0.2.0-cp314-cp314-manylinux_2_28_aarch64.whl
Size 6.5 MB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
7047bb29bdd9061d715fd719416547cb1142d597d3a5e6f0c11edb02f3788ca6
BLAKE2b-256 checksum
How to use checksums
1218c421c480ab00208b4249ccbc065ad64fc8f8dc33cddee8b6bdbea9f8c096
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / pylon_db-0.2.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL pylon_db-0.2.0-cp314-cp314-macosx_11_0_arm64.whl
Size 5.9 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
92bcf81401b40c4085d38c92984d429cf2ea44e1eaefeed1d7a1ce974754d7cd
BLAKE2b-256 checksum
How to use checksums
4df1a693f774249a5343ed0736e9b10f529e53e53ebdad10954d0f0c66377ecd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / pylon_db-0.2.0-cp313-cp313-win_amd64.whl

Download URL pylon_db-0.2.0-cp313-cp313-win_amd64.whl
Size 5.8 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
b175e06dbb8fc8162221d0fce214236b138cfb8a5bb36aea35c3261f15a1585b
BLAKE2b-256 checksum
How to use checksums
aef0c85d0abe67ebcb0eddcafc424771ecae9c7e5905cfbbf67a2f9face34112
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / pylon_db-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL pylon_db-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 6.4 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d523bb1d7b1cb5e6c622bb872ecf3ed425da694a699a50cba762b80d5eeb3957
BLAKE2b-256 checksum
How to use checksums
ba37cd4bc947ebab65364956c191add64c0880d37f6e622a042e5dc80fcb32de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / pylon_db-0.2.0-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL pylon_db-0.2.0-cp313-cp313-manylinux_2_28_aarch64.whl
Size 6.5 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
ab32b8e4ee65a5ca009db815c0625da329764130dc06623b7ea8f1ffd4f34ac6
BLAKE2b-256 checksum
How to use checksums
b81cce66d743bd03942e01fd351ee3e64abca6b3c16f7cd36b0479bdf362bb31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / pylon_db-0.2.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL pylon_db-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Size 5.9 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e3a9d34a4de5c12ce3761635679439d23b09cae488872feb6d326037a4acfb3d
BLAKE2b-256 checksum
How to use checksums
e59c5018e1811fee2c929db7ee64ca8fceb6cf00b94456bcf44b7c8bea07718e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

0.7.0

13 release files

0.6.0

13 release files

0.5.0

9 release files

0.4.0

9 release files

0.3.0

9 release files

This release

0.2.0 This release

9 release files

0.1.0

9 release files

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