Skip to main content

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 class
  • KafkaConnector - Kafka consumer using quixstreams
  • KafkaProducerConnector - Kafka producer using confluent-kafka
  • MinIOConnector - MinIO/S3 object storage
  • TimescaleConnector - 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.2.2.tar.gz (65.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

db_connectors-1.2.2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file db_connectors-1.2.2.tar.gz.

File metadata

  • Download URL: db_connectors-1.2.2.tar.gz
  • Upload date:
  • Size: 65.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for db_connectors-1.2.2.tar.gz
Algorithm Hash digest
SHA256 6026ba4b1f5a2ca66772f15824c206b82d2532fc79247878f4748e7801c247e5
MD5 e769b1d008933fa09b917d51c6e92207
BLAKE2b-256 3cb8c607f6032ecacc5bc34ba21ad7642515128399b33e6f55fd8cb0eff13eb6

See more details on using hashes here.

File details

Details for the file db_connectors-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for db_connectors-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3b3099cf139a01da59c815d8b63c95a08e2a029c1f7cf5c41f41b6ac4f0dc330
MD5 a4a7cfbaef146b276d5a63354b6fb582
BLAKE2b-256 be53b76cf8ca91de3299dd95def9704d09025263e85c764c2489cc33a9a051e2

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