Skip to main content

Embedded federated SQL engine for REST/JSON datasources

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.1.0.tar.gz (112.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.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.9 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

dbfy-0.1.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.9 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

dbfy-0.1.0-cp314-cp314-macosx_11_0_arm64.whl (36.0 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

dbfy-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

dbfy-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

dbfy-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

dbfy-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

dbfy-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: dbfy-0.1.0.tar.gz
  • Upload date:
  • Size: 112.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.1.0.tar.gz
Algorithm Hash digest
SHA256 7b301139ff0ed5e3d0d0d77574a3c428a1b754e331fc934e2cb330e21bf2add3
MD5 a76076195308a0af3fe31dd0084e68bf
BLAKE2b-256 bedb83da18aeb0450b2a8908fa54bc7608dff7856ccd54fd1e40ed8aa8e104a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 16707d2422b0346ff733c051d786c8f2ffee6af765dd63e567f4acfc9ae6f35f
MD5 f077106ace8079a3a70a45dda6f12b09
BLAKE2b-256 be4a133b4c9eb3254081ad5e3a2759ee7121074c3dc4f419c2bf260325f419d0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.1.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e55b76fba72882cb7c86668671ac433ceb5a28b41e0cdeebf43451ff3cdab6d0
MD5 cb1aa18cc894164b05f22830260dc9d1
BLAKE2b-256 84a365cabeedb60667e262ee1c0ead12953389d50dbd2f967a172d2db4a093f8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5c265181ce73f0859b795f068504e4ae16c81fcf76fa7ae9f6924187080b6af2
MD5 3b59d1c23a20b5d271069f5f873d8372
BLAKE2b-256 5dc1fceb7df40b34232929c3513dca6534fb1e4e4dab88f0dcfceb5715d26bec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b411edaa6c08c70cf2a8f5e9bb30f11e9eef3bfef87a2bcfe503ffa4c63c3847
MD5 bf06e73ec96aff74c19ab0f85d6e3644
BLAKE2b-256 6eee4b290c7fced0b6fc6e4efc5bb49894958790d75f24ee64360cf1c0e0ebe3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8db350f099e696625bba620cacba18b77167626d87c8169fc302613d510a7d59
MD5 352f03af72cc5a1ee2737b1b9c4b3237
BLAKE2b-256 45799044bf3434d543019eabf1a8a84ed72243e076587fa44dfa65c0f144951d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7b10ad7cb5c4feed1ea0e3c477c377e3f32e4d0fcc392ba604b430059a08c3d0
MD5 3264c45e95a814245d56a1fd8a614b68
BLAKE2b-256 e23c85e9f9352d0105cf02d3283eb952a2e57987bd1caf7a377792cf3a1b266a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f89b6e78edacd38452c8ad673df9febc35cd3e49bca2a0ee62279ba6f194b9c3
MD5 54ee373ae89c8793a8d5d68278d414d7
BLAKE2b-256 7319996f4123381129f717acbaed58d0a4153ed88371a161dc520d5b0c4c58d4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dbfy-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd36e7819d5538a6094cb6487b6acc50e3b39fb34cd57b1a011591b24b25e3c3
MD5 dc9df5c47a6fe1f4fea1c14d253387c1
BLAKE2b-256 06a33ede2d609a468e1ea6587b536bab4cd1953893e312bc90cb0588f3da1e0c

See more details on using hashes here.

Provenance

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