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-0.1.0.tar.gz
(63.2 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-0.1.0.tar.gz.
File metadata
- Download URL: db_connectors-0.1.0.tar.gz
- Upload date:
- Size: 63.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58a447b61526d8c81a228ad7203e7b6102fb74fefc0efed5552110221ea71492
|
|
| MD5 |
d33df6c5414b85ec046c8eec588aff9b
|
|
| BLAKE2b-256 |
cb50d73c23a23e690ed74b5d3703fe3dff0aef77ca1db92913f9109373d24ccd
|
File details
Details for the file db_connectors-0.1.0-py3-none-any.whl.
File metadata
- Download URL: db_connectors-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c242ee0a8e385fc4c822a9153b86e0dd8deafcaab395fedda6ffcadcc137979f
|
|
| MD5 |
2a84f8a18f989346ef615db8cdc728bb
|
|
| BLAKE2b-256 |
cb1d2c55f1213607832c0ec00c7d7ba68fc6ec64a4fa166824c5e96c3e699cb9
|