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 describe --tags --abbrev=0
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.17-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.17-cp311-cp311-macosx_11_0_arm64.whl (283.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

airbite-0.1.17-cp311-cp311-macosx_10_9_x86_64.whl (295.2 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

airbite-0.1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

airbite-0.1.17-cp310-cp310-macosx_11_0_arm64.whl (284.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

airbite-0.1.17-cp310-cp310-macosx_10_9_x86_64.whl (296.6 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for airbite-0.1.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fb80fa6ffb5e6d299987277ee97615c701bc04b48eb54dbcd14daba65a7dd3ef
MD5 8057638803c71f50ba8dc7e9e1253c42
BLAKE2b-256 8a351481d9565057972ae9117883be9360249b7faa137bb22e98dfa528d9e2be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for airbite-0.1.17-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 960ad50c452455fb9bad246b1b48ff1ef4191e6442cbf3bf60eb9b6c65e1b8e4
MD5 f9205379a73996644f3f80d9bc721da6
BLAKE2b-256 b03e7e9a0c8649ee91ed563226c5d5223b8a4dc398b5d662bf620fdedc58ee79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for airbite-0.1.17-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2d4cbf49ff8fe793fff2c6c47e6fb6c9f63c9ca02d11e3e06cd6a8705b1aa4b7
MD5 b73cb9867c60f7cdd60db0080a6e8286
BLAKE2b-256 9a33012cb8975886b96f07ecc758d595c065ff7bd8e1a4599840567f60dcc382

See more details on using hashes here.

File details

Details for the file airbite-0.1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for airbite-0.1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d19b2bfdfabefaefa2551c8af8490e8d499e6ba5fd0f96fcb6e3d891d1c674bc
MD5 523eb2398ca39a1ab243dd4b58f796b9
BLAKE2b-256 03f3d944c0b2466c3efd066d1aa0508fd4de894cb499249e27ae799be1c2d2c9

See more details on using hashes here.

File details

Details for the file airbite-0.1.17-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for airbite-0.1.17-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c3c7d8e636133ea0e846dcef75ec3da2ae09ca87d65a8bece740303708c47917
MD5 d98c1deecfe67bd19ecad7b46a65be43
BLAKE2b-256 bfe99093a55112705d2132918a9f44b1d38f96dae4b8e14f48719d6882d68cef

See more details on using hashes here.

File details

Details for the file airbite-0.1.17-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for airbite-0.1.17-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6fb2a61c2aa9b9dae3a3b6bbd1715252181d0147cf0fc35a1c5d328f746c4c3a
MD5 3d51c5d964541312f9edb82dc834f509
BLAKE2b-256 eb6aab32e26d3a7f5575a0469c8402b557176006879d73c53882fe11fad86662

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