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

Uploaded CPython 3.14macOS 11.0+ ARM64

dbfy-0.3.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.3.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.3.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.3.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.3.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.3.0.tar.gz.

File metadata

  • Download URL: dbfy-0.3.0.tar.gz
  • Upload date:
  • Size: 138.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.3.0.tar.gz
Algorithm Hash digest
SHA256 25789d80d49500bfacd3b6ac4f95305a231b3b1638787e4578f0952850e7a454
MD5 0663139e8e5fe4bc29d59ee59fb05c38
BLAKE2b-256 77f4fc8196a582c0880d4e4004351d2198fd2b0ae7d547763532ed9ab76a5288

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.3.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cf0a7eeac2c461b86d03a35a41d355df74fef28c4f2c929efe3b4227cf59a6c1
MD5 34de4c147d39823def3e4807e67d8961
BLAKE2b-256 fb591a84556ca86c0055e472402c1c133917ca574f36447424db03d5574bde44

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.3.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d6d41b17ddbe0b68ab71b8034ec8e21fed99c870e29bd9a600c9760ea09cdc28
MD5 282e48a5385207a7d817eb1b8b1059c3
BLAKE2b-256 a34d8913bacc0840fcc3def2f64f31bc1c43a4ae3bc7791005373767ba29b168

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.3.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d75de428a379c44dd6fe4688dba34668d03b45808c62ac510747db1f3c5c1b47
MD5 bc2266f7b37c22ae9a982a21b65be698
BLAKE2b-256 b64f2e8d2e71ae13a3528a9d2f6c67fe71dd8eb62987db409de50b4828a36ccf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b416263549ba1155e00ffc322c69fe947ce7289a637280e4303063d101aed0cb
MD5 743d0ee1aac4fb8779fc1f9ca20ab49f
BLAKE2b-256 f33a7071569f3cd1286038b996480da53b32f9dfef903b5c7c3932f44f64d925

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4cec09871ee2fde3811895ab1c4b982073fda427bf42dbc4aab47d80cffdd19f
MD5 21f22ce7c753ba98d1e302924659df59
BLAKE2b-256 90e7e95de5a4ce514a2ca8ba7a76fd65e6ad9c4289b61f21a334f233f954770f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3545a49f6ea7ae246f6901bbf099611ea9d608b63fe5648217f011bec1cfef03
MD5 59ae8b4a9e321cb5b358a945a6bc323b
BLAKE2b-256 c047549410951b5cb6952e163495aba5eb7449de479199a0dbebc1d10b0da1d0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 87a92978de507284888e20a7995a5274da22feb0754a86fd7c71933a62ba64db
MD5 33eda31242f83ec2f5721d51f1ff4f5c
BLAKE2b-256 6c8af8a64d5b726727989bd199f7177e8fe488a9ca8a98bc2f307f011550e8b8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bbf66ef8322e5493c67fb3c6011fa50b99447d26a178b5bc929d35c50f5e917c
MD5 bdea5d36dfac798a1ab85a0cc159149e
BLAKE2b-256 b35e057357661f9922e9da46191389ef4d43f406797895e65e936ae6b039c136

See more details on using hashes here.

Provenance

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