`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 refreshorincremental refreshmode (the source must support incremental refresh) - Write to destinations with multiple write strategies:
append,merge, orreplace
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):
- Create source config
- Create source
- Create destination config (optional)
- Create destination (optional)
- Write data into destination:
destination.write(source, ...)
- (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:
list_connectors(kind: Literal["any", "source", "destination"] = 'any', filter_text: str = None)get_env_variable(secret_name: str): use this to inject variables from your.envfiles
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file airbite-0.1.13-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: airbite-0.1.13-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9d2bad84f0daa7e2f5fbb2bfc0802efc383146fe3a53cf8194a317eb89d735e
|
|
| MD5 |
dc5ad1c7e679922cb6e7ef44089cd30b
|
|
| BLAKE2b-256 |
1b582ce46ecd9dc4df6b2b2ba58287ed391b6daa6627eb28dc3c84ae4a5a2a21
|
File details
Details for the file airbite-0.1.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: airbite-0.1.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfcd7127594da4ac167c6da1645c083e918ead75305b6b4f4992826397102034
|
|
| MD5 |
a3b8148ad8742fa031d92d20db6d0513
|
|
| BLAKE2b-256 |
166f0daa309da6395199af53ed689ad4065d4b9df9c01cd6e0075cb8629b7667
|
File details
Details for the file airbite-0.1.13-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: airbite-0.1.13-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 283.2 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cafe52c7fbf625d7538efcef8938ec25a956e512c28e5897c86ded64b733084
|
|
| MD5 |
4278890eb665975111a61e7c1fc89b83
|
|
| BLAKE2b-256 |
6282ba8493b52f72ae9e8c66a82dac241146dd8c20ac18770b4c7082e01e6670
|
File details
Details for the file airbite-0.1.13-cp311-cp311-macosx_10_9_x86_64.whl.
File metadata
- Download URL: airbite-0.1.13-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 295.1 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9644d3b522a1b650e44cd7d63d4c615d430cbb6e9530bd528c9d4c8cef532b6e
|
|
| MD5 |
336114818aad022ead89db4cd20c6827
|
|
| BLAKE2b-256 |
0cd849fd205f402aa800729fd0b25ab6e177e2ae2b944bf7ba7b2a4798c71472
|