A collection of database and message broker connectors for Python applications
Project description
DB Connectors
A Python library providing unified connectors for various databases and message brokers.
Features
- Kafka Integration: Both consumer and producer connectors using confluent-kafka and quixstreams
- MinIO/S3 Support: Object storage connector using boto3
- TimescaleDB/PostgreSQL: Database connector using SQLAlchemy
- Unified Interface: All connectors inherit from a common base class
Installation
pip install db-connectors
Quick Start
Kafka Producer
from db_connectors import KafkaProducerConnector
producer = KafkaProducerConnector(
address="localhost",
port=9092,
target="my-topic"
)
producer.connect()
producer.produce_message("Hello, Kafka!")
producer.disconnect()
MinIO Connector
from db_connectors import MinIOConnector
minio = MinIOConnector(
address="localhost",
port=9000,
target="my-bucket"
)
minio.connect()
minio.upload_object("file.txt", "Hello, MinIO!")
minio.disconnect()
TimescaleDB Connector
from db_connectors import TimescaleConnector
timescale = TimescaleConnector(
address="localhost",
port=5432,
target="mydb"
)
timescale.connect()
# Use timescale.engine for SQLAlchemy operations
timescale.disconnect()
Available Connectors
Connector- Base abstract classKafkaConnector- Kafka consumer using quixstreamsKafkaProducerConnector- Kafka producer using confluent-kafkaMinIOConnector- MinIO/S3 object storageTimescaleConnector- TimescaleDB/PostgreSQL database
Requirements
- Python >= 3.12
- confluent-kafka >= 2.3.0
- quixstreams >= 2.0.0
- boto3 >= 1.34.0
- sqlalchemy >= 2.0.0
- psycopg2-binary >= 2.9.0
License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
db_connectors-1.0.0.tar.gz
(65.7 kB
view details)
Built Distribution
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 db_connectors-1.0.0.tar.gz.
File metadata
- Download URL: db_connectors-1.0.0.tar.gz
- Upload date:
- Size: 65.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a972320c93310ced9bb8f926da99b8d58360116ee4ebe5f3036661c0192c3e9a
|
|
| MD5 |
482f0dba583640c5d1fe7b945f419af3
|
|
| BLAKE2b-256 |
16bdc518aaee298cc23853a18bedfbdf7600c041d14c0423c0e56a4a95a385cb
|
File details
Details for the file db_connectors-1.0.0-py3-none-any.whl.
File metadata
- Download URL: db_connectors-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
220d48b94de25147a1d1048cb0524370311e48a3e6425d9dfa4447c1db1c4995
|
|
| MD5 |
d1bc3674fcf29cc65b401b7731524236
|
|
| BLAKE2b-256 |
e2a394743ccdda96257078b657acceac083f4fb6186e5b22c244d2129e5189e8
|