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.1.tar.gz (147.7 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.1-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.1-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.1-cp314-cp314-macosx_11_0_arm64.whl (37.4 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

dbfy-0.4.1-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.1-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.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: dbfy-0.4.1.tar.gz
  • Upload date:
  • Size: 147.7 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.1.tar.gz
Algorithm Hash digest
SHA256 2c7de1102a13587bb7de488f1abf252ed0fe21e64c3b556ade581a4f42c863d1
MD5 2eea836574692bba39789424b99cecf8
BLAKE2b-256 502f93da224887027e5fd28f99cba285de503881f9ce846e065ace8a4389f61f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.1.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.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0023b90d2580f564bb2d1d58a347e79ff5b950f2cb4747c5d8db8e3ea9fe2b7f
MD5 3a7d53d05035ed01edc44be0542de351
BLAKE2b-256 40ce7d8990497030d7bb6e6b34032848d339369ce6c35754b6adff5da3ee476b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.1-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.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d8bde43f5bd2d4a83456ad96993a8cd458a8636ee854bb678b6629b47a0782e
MD5 d1f2454cdf0dd52ea49b66e42e4c6dc3
BLAKE2b-256 8f2b9935732a654c756bffb0abe48db5d956dc75fd36459ef22cf3bb566753eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.1-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.1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c8ecd69975f0ac89457da6682df09b2e5e2c26e55d1b23e7e496cb46b90a5d9b
MD5 e05ce74c853f5ce0610d64abeec1c5ea
BLAKE2b-256 889e5cdb6313f8f3d70ae0a98fd41b3aaed2b1ae2829fe072ae8aaffe6c2c749

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.1-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.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd3854dda43bb439cb3a3c42721e9a5525844ca568f43131cea6adaefb6a4b8b
MD5 5b8c7d7d99c926ca46fdeb02d79f82c3
BLAKE2b-256 7b75cdc0daef57978f2a4c9b7153331bf25fd369a99545633c5f37e35ef31514

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.1-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.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a496c3e64197bc9c57e0b9ab31687e24789b3c5e402a79ee5c79b9ef7054c834
MD5 9bfff90ede4900bdb8e8532083d7aefe
BLAKE2b-256 d853a36d1f09c34e8542041f7d4bf8ebb805fbcd90154349b3a721895f0289ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.1-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.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a626a8eb273e515b5d8879e4657cdf67da62d0673256813104a55ce1953079f4
MD5 747c9cd8899ccd6654764b6f32de4776
BLAKE2b-256 2ca8096d4f15b0c5dede8ae517ace493ab90c02590220b63057b36eb7d1f21c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.1-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.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 622599a29f8ce341d9e9182006b2d3269fd7b8d50e8e96c10e11dfe49615ceee
MD5 a6fd2ac56f71072df39b658920a17843
BLAKE2b-256 8d5d42796460016e6c6bf37625b622d295e146ff269f792ac8956d5c6f0375b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.1-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.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dbfy-0.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ed50f845863910b8310c0831faa0f88b5286f6375969907c16028bd5783b730c
MD5 4118636eae8acd2b62d3909d5f7fd058
BLAKE2b-256 756cba791aa089ff7c6fce343ab40ea7ef43db1090445e79d71961a8d2cd9e55

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbfy-0.4.1-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