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

# 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
gh release create v0.1.8 --target feat-workflow --generate-notes

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

Uploaded CPython 3.11Windows x86-64

airbite-0.1.10-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.10-cp311-cp311-macosx_11_0_arm64.whl (282.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

airbite-0.1.10-cp311-cp311-macosx_10_9_x86_64.whl (294.0 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: airbite-0.1.10-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 288.4 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.10-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 772512323cbef30b2025bec66cb65f24527b68925c4a0038cc4e5f36d3feb9de
MD5 c32568b98f68c6e6cdfc7bf7e6c279e3
BLAKE2b-256 d4d94d0d2f8c86afd490df3e7a7afb0e7a6f47bae07e781ba1a563495305db8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for airbite-0.1.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c30004564125cc4267b500ddbc869ee08ae62c22b789384382fbadc364e627db
MD5 b1f4f60dbaf27f1a9bebc19e0b552aed
BLAKE2b-256 b621bf27d0023c069c7da64b9cdc70a8012f9315fec76b0a6e802d686253cf63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for airbite-0.1.10-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 41d79c18f87eb8e147c87473872289963a784ecd822f3ef7a5e906190cceff24
MD5 64ce774421f000c1c046520e52471089
BLAKE2b-256 9d37047228d2ae1b4383a6791e66951cf9002e6c931754ca8128d315721a9a15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for airbite-0.1.10-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bd6e44b8fd1676fd0b43d0646bdefbe20d22b7a1c3d08069a91d21b7d3632fe1
MD5 1f5086f846a161e3d4fa26c4245988dc
BLAKE2b-256 8ff2d0807a49f40dd84b759fa215313f075d91a4e68786caade308a1b51ddb9c

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