Skip to main content

`airbite` brings the power of Airbyte to Python with an intuitive, user-friendly API. It builds upon the PyAirbyte project and adds additional features.

Project description

airbite

airbite brings the power of Airbyte to Python with an intuitive, user-friendly API. It builds upon the PyAirbyte project and adds additional features.

With only a few lines of code, airbite can:

  • Read data from sources in either full refresh or incremental refresh mode (the source must support incremental refresh)
  • Write to destinations with multiple write strategies: append, merge, or replace

Supported Connectors

  • Number of sources: 455
  • Number of destinations: 23 More are being added regularly

The "friendly API" is heavily typed, so you don't need to refer to any connector documentation separately while coding. This also helps AI tools (like GitHub Copilot) to write correct code, saving you hours of reading.

Installation

To install airbite, use pip: pip install airbite

Usage

There are a total of 5 steps you need to perform for moving data between sources and destiantions (after import airbite):

  1. Create source config
  2. Create source
  3. Create destination config (optional)
  4. Create destination (optional)
  5. Write data into destination:
    • destination.write(source, ...)
  6. (Optional) You can also just read the data from the source for exploration:
    • source.read_to_pandas(...)
    • source.read_to_iterator(...)

In addition there are a few utility functions provided:

  1. list_connectors(kind: Literal["any", "source", "destination"] = 'any', filter_text: str = None)
  2. get_env_variable(secret_name: str): use this to inject variables from your .env files

Below is a basic example of moving data from source to destination. For more examples head to the examples dir.

import airbite

# step #1
s_config = airbite.SourceFileConfig(    
    dataset_name="data_a",
    format="csv",
    provider=SourceFile.LocalFilesystemLimited(storage="local"), 
    url="./data/a.csv",
)
# step #2
source = airbite.create_source(s_config)
# step #3
d_config = airbite.DestinationDuckDBConfig(db_path=".cache/my_cache")
# step #4
destination = airbite.create_destination(d_config)
# step #5
airbite.destination.write(source=source, streams= '*')

Build and Publish

# this step MUST be executed once in local dev environment:
# install the pre-commit and post-commit scripts that will help generate the jsonschema, models and create "connector_configs/__init__.py"
./install-pre-n-post-commit-hook.sh


# to generate model locally:
python airbite/model_generator.py

# build locally:
# rm -rf airbite/airbite.egg-info airbite.egg-info dist build && python -m build -w
rm -rf airbite/airbite.egg-info airbite.egg-info dist build && uv build --wheel

# publish to test pypi
uv publish --publish-ur 'https://test.pypi.org/legacy/' dist/*.whl

# publish to pypi
uv publish --publish-ur 'https://upload.pypi.org/legacy/' dist/*.whl

# run tests
python -m unittest tests/*.py


# tagging and release (not used)
git tag -a vx.x.x -m ''
git push origin tag v0.1.0


# create a release
git fetch --tags origin
git tag
gh release create v0.1.8 --target feat-workflow --generate-notes
git fetch --tags origin

License

This project is licensed under the MIT License. See the LICENSE file for details

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

airbite-0.1.11-cp311-cp311-win_amd64.whl (289.2 kB view details)

Uploaded CPython 3.11Windows x86-64

airbite-0.1.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

airbite-0.1.11-cp311-cp311-macosx_11_0_arm64.whl (283.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

airbite-0.1.11-cp311-cp311-macosx_10_9_x86_64.whl (295.1 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

File details

Details for the file airbite-0.1.11-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: airbite-0.1.11-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 289.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for airbite-0.1.11-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a68506773eefd111c5fc7001e3767814070eeb1de83fd93774e91400159f1688
MD5 3aef58217cb81d92b512f801e99ff4af
BLAKE2b-256 8c3861155cdfd059bb4f96a0b914164dac4bd3ad198a644a300748122eedef4e

See more details on using hashes here.

File details

Details for the file airbite-0.1.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for airbite-0.1.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 43f15b376ea719f5b28661743f3239b4a98607eaeea31eeff7e78a177610dccb
MD5 152af4bbc2752facabf5e418e2e6f704
BLAKE2b-256 b6a06b6679025af0751b04974c211b96e33c0c3b1e52fd20801b1ffad1e8a0f3

See more details on using hashes here.

File details

Details for the file airbite-0.1.11-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for airbite-0.1.11-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1b70e5421c3b1bc789788b6ab55b2a43583ad9f93040d67903c8676703469918
MD5 db3d478d56a547fff2c66d58dc662566
BLAKE2b-256 d461215980f178de9b6602fa446a1241f9b1c3e7469d3925d41d25277dcf6baa

See more details on using hashes here.

File details

Details for the file airbite-0.1.11-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for airbite-0.1.11-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cb338b5b5535e9d4d0b417a84c195de92bf017818775a7d5c71181e19de22535
MD5 63a783f0fb62ad8a2996a03440762512
BLAKE2b-256 97bc6dd99e280805e9ed3224cab2775bccc1c601b3b3179a937a3c09ea5424bc

See more details on using hashes here.

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