Skip to main content

Each source is a SQL table: REST APIs, log files, CSV, JSONL, syslog — one schema, cross-source JOINs.

Project description

dbfy (Python)

Python bindings for the embedded federated SQL engine dbfy. Queries return PyArrow RecordBatch objects.

Install

From a checkout, with maturin in a virtualenv:

python3 -m venv .venv
source .venv/bin/activate
pip install maturin pyarrow
maturin develop --release

Usage

import dbfy

engine = dbfy.Engine.from_yaml("""
version: 1
sources:
  crm:
    type: rest
    base_url: https://api.example.com
    tables:
      customers:
        endpoint:
          method: GET
          path: /customers
        root: "$.data[*]"
        columns:
          id:
            path: "$.id"
            type: int64
          name:
            path: "$.name"
            type: string
""")

print(engine.registered_tables())

batches = engine.query("SELECT id, name FROM crm.customers LIMIT 10")
import pyarrow as pa
table = pa.Table.from_batches(batches)
print(table.to_pandas())

print(engine.explain("SELECT id FROM crm.customers WHERE id = 1"))

API

  • Engine.from_yaml(yaml: str) -> Engine — parse and validate a YAML config.
  • Engine.from_path(path: str) -> Engine — load a YAML config from disk.
  • Engine.registered_tables() -> list[str] — qualified names of registered tables.
  • Engine.query(sql: str) -> list[pyarrow.RecordBatch] — execute SQL and return Arrow batches.
  • Engine.explain(sql: str) -> str — render the optimized plan with pushdown details.
  • DbfyError — base exception for engine errors (config validation, REST execution, etc.).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbfy-0.4.0.tar.gz (139.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dbfy-0.4.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.4 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

dbfy-0.4.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.4 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

dbfy-0.4.0-cp314-cp314-macosx_11_0_arm64.whl (37.5 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

dbfy-0.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

dbfy-0.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

dbfy-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

dbfy-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

dbfy-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file dbfy-0.4.0.tar.gz.

File metadata

  • Download URL: dbfy-0.4.0.tar.gz
  • Upload date:
  • Size: 139.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dbfy-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3463ca9a56d50c46dec52ea678c1c0e6bdcef3ebc5ae2980ecfc494da414f69e
MD5 3c74d818bc3ddd7cc528a9e9a685aadd
BLAKE2b-256 ba006d66122170581c4a9100f24177ff728a08ebb831018fa6557a66b1b2fe50

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.0.tar.gz:

Publisher: pypi.yml on frhack/dbfy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbfy-0.4.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0cfa1c36dfb78c83d83c17751b3f1f17f5f93d8b998b15d10c65088ce6ab5476
MD5 2d1cb314e7dad3a4b53863a152c6d1e3
BLAKE2b-256 a23569f9d868d6bde52070ddf4810957baedd88f7e5bfe006cfbc1a6cc903171

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yml on frhack/dbfy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbfy-0.4.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c7770126bb8bc36b07e64c9f5e31d9cdbbd43ee9501fe5a4648e6d032f08742
MD5 84923c7154de6c7c001a770ccd35a3d2
BLAKE2b-256 de7253458ebd77e2c0342b07a354b9a116f682bdad41713fd73c8fa12d1b7453

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yml on frhack/dbfy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbfy-0.4.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 97e44060e08b8583bf85e82c0c6cef74669dbc189aca26a956a9bb77d6c93c6c
MD5 66ce8353f7ed5ef0c2dc862f651e5ae0
BLAKE2b-256 c60e35887f7e078d0e2694db510c9ad4c6b6a73030350bc2c318c2d917fd809d

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: pypi.yml on frhack/dbfy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbfy-0.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2f3b8b0cf1f45491a311d193395e15403ee47c5157b170dbd639f8664336ff55
MD5 3abc0bfa6b84d50198ae53db3fe7ba34
BLAKE2b-256 c1e3d8b452e4b478e1f60dd992de05f599a5fe83f971c334d5a4e9fae7d84d33

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yml on frhack/dbfy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbfy-0.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bcc5e6f7b377824beaf5989d3b5297dcdb1e17abaea6b3846cfafcf15fa0b7a4
MD5 befe13468e211655e89ba74572d2ddfd
BLAKE2b-256 66f7a024f23f37ae2bb19a249c0c2af074eb3ae943aef8ce77b079ff272fd0e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yml on frhack/dbfy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbfy-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e3fb13064db1315a1920b2beecd2414c2c423ae970b97c74b49d09ef281fe74c
MD5 b0b87eeece5cf2a777ea04132f266cca
BLAKE2b-256 38001d0d9427a885ad8a99f512409863ad430d13e8fff6175ac5264f8e35befc

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yml on frhack/dbfy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbfy-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fba14087c4b1f0408785b68d0ea2947000df67eb79e33c9177442c61090d0218
MD5 d22a3fae41cbc67f748eb1aa854f8ff5
BLAKE2b-256 1f404bf03f81eabbae9c81a59e113ec1170e6964d637f0922d588f9a9fc7cb4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yml on frhack/dbfy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbfy-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 51c1456b967a84833276e5c882a4b861a2b8c0984dbc4f18701f7a81c4efc717
MD5 235728d68b6960efc55cebbbab6e16ee
BLAKE2b-256 34b9063b488f40dc127996ee0a8290e72f8788b8e01e999079e35ddcf2f233e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yml on frhack/dbfy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page