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.2.0.tar.gz (123.3 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.2.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.0 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

dbfy-0.2.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

dbfy-0.2.0-cp314-cp314-macosx_11_0_arm64.whl (37.1 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

dbfy-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

dbfy-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

dbfy-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

dbfy-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

dbfy-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

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

File hashes

Hashes for dbfy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f318efa9089cae98e279ff3edb559aad3d22b092c61d894dc7092e18fc27bd73
MD5 33f07fd7f597e4e314737a1a96b168b9
BLAKE2b-256 966f8757069a39a976cf66f1192113486f1e50aaf2f301101b9fb55da584443d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.2.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44bf45f065305c7e7d1678c87adea633c1713b7139f8c865a05039ab8c5877a3
MD5 0f0afbce804d711b93930435bbcdb546
BLAKE2b-256 bc0b2a1b4ebbb7bda4fc936a7844a5673253af75d09b610d50af8ea3b106e34a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.2.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1f357af0f2d8193572aefa37f5f66738aff88eac81c02f2126da27d920c39d5a
MD5 326d9c71501038471da5b186b45c59da
BLAKE2b-256 3892a0ad3a41339d6c259dc6cd2e36ca0f289d168b3b4136d24b12e933bf4453

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.2.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 64008e0b0c7cd83bb969f636d77b9d1704a34f45fb8c125902b6a07c5518e4ce
MD5 4ab8082766b958c92a91776dad214348
BLAKE2b-256 9a60f3bd5604a85087c86240f8d3e357bed2fae47f94f036ca54a5829818b85b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 477f23507223b13cbc962e9b092e73f8024ab05a674a51f9cf7754e1307218be
MD5 13033eebad8f2dbcb2175f026b395fc9
BLAKE2b-256 234229ae01eb1fbfa4c367a6ae736a204f1342e776f98ffe8a164992849438d7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 69396972a8e2995c55945ac09064a9ece31ff1c751617444aede45ca6319a23e
MD5 511a50f4f12e3b67cd041e6663f5b133
BLAKE2b-256 da553517a3388bd169c377d109cc57eb96ed7e38984d455843b75875da37b72a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 20fefb77d501ab0c91e73a557aa6e2b1acdce2d09101e039badc0dd30425a78c
MD5 b0fced50a698b663ea236586535eb381
BLAKE2b-256 ca0daa80c5f17eb32783a78dc3b52b6052e53b89b9578b85098b15534622697e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e3a72aa96860a041613f4dfa0acd63a2cb8701cf935fe9944e914d9d3fb16964
MD5 a39705c56a4a52a145c27fb3872a4c41
BLAKE2b-256 de8eb242e2f0f2edfedcc522bd8ee8577f2c5e948c608169450e08b860eb7153

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f7b66486fc2d3b5cf210562a17311af3d22762a171cfd11221b3e1a2795cd364
MD5 7838b10864bc569bda9bbef9e367ca9c
BLAKE2b-256 3114060529bc5b4f9d1bbae1a3a6fa68ec0015d351935dfe811009c4ce4f94be

See more details on using hashes here.

Provenance

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