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.12-cp311-cp311-win_amd64.whl (289.2 kB view details)

Uploaded CPython 3.11Windows x86-64

airbite-0.1.12-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.12-cp311-cp311-macosx_11_0_arm64.whl (283.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

airbite-0.1.12-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.12-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: airbite-0.1.12-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.12-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 86b1911d2d8f3a4e858bc0614492256fe2dd43f83e78a44d0b2ea44d00ba6442
MD5 46b79d110d99d987adac2d3605cc0ca2
BLAKE2b-256 ce677ba69de2bc2e94bc4078e03547f449a4825b82c5fb6cd0d2253406a16938

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for airbite-0.1.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c2c1d59c8672c039fcbafc0af1fdc7ac7c112c10e0393cf1c9dbedbafb14c6e2
MD5 5d1a016748e1559d97ee32d4cf5ef45b
BLAKE2b-256 fc78350c1262778c8b1382d209f36a137af511bc3f96f9f4ef4260366e036f85

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for airbite-0.1.12-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a33680e5b62c2ae12f0956cf220503b7135490d4978dc728f599744514669a94
MD5 1fec67abb881a14b4341f28c3bc744da
BLAKE2b-256 a0f40b4c496a6298936d76fdbe31e70d21bd791bb92344ad07dd8870c55032f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for airbite-0.1.12-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7024a473ddf93096497634c8f36a71a97d21268562a50a1b294e6a9b91b90783
MD5 4bc3590c0df75e3a26804573364f4242
BLAKE2b-256 3fa36ab2dcf30006705114f7f94c71ad72cc7515ccd718bc4191701feae38693

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