Skip to main content

High-performance data connectors for SQL Server, Spark, Iceberg, and JDBC.

Project description

src-connectors Logo

src-connectors

The ultimate library for high-speed data connectivity, querying, and reading.

Version Python Versions License


📖 What is src-connectors?

src-connectors is a professional-grade Python library designed to simplify the complexity of connecting to, querying, and reading data from multiple sources. It provides a standardized, high-performance interface for data engineers and analysts to pull data into their applications without worrying about underlying driver intricacies or memory management.

Whether you are fetching a small sample for exploration or streaming billions of rows for a production pipeline, src-connectors ensures your data access is reliable, secure, and fast.

Current Support:

  • SQL Server: Robust connectivity via pyodbc with support for high-speed batched reads.
  • Apache Spark: Modular engine setup supporting Iceberg catalogs (Hadoop/REST/S3) and JDBC data sources.

🚀 Getting Started

Installation

Install src-connectors utilizing pip or Poetry. Choose your extras based on the platforms you need to query:

# Using pip for a specific extra
pip install "src-connectors[spark,sqlserver]"

# Using Poetry (Recommended)
poetry add "src-connectors[all]"

Quick Start

  1. Querying SQL Server: Fetch data directly into a DataFrame.
from src_connectors import SQLServerConnector

connector = SQLServerConnector()
# Reading data into a pandas DataFrame
df = connector.execute_query("SELECT TOP 10 * FROM orders", output_type="dataframe")
  1. Reading from Iceberg (Spark Engine): Standardized data access for big data.
from src_connectors import SparkConnector

# Initialize and configure the Iceberg catalog
connector = SparkConnector(spark_master="local[*]")
connector.configure_iceberg({"iceberg_warehouse": "prod_catalog"})
# --- Step 4: Execute Query using Spark SQL ---
# Execute a query and fetch results
df = connector.execute_query("SELECT * FROM prod_catalog.db.table", output_type="dataframe")

📚 Documentation

For in-depth architectural overviews, detailed configuration settings, and complex usage examples, please refer to the unified documentation in the docs/ folder:


🏗 Architecture & Design

The library is built on a Modular Connector Pattern. Every component focuses on a specific data source while sharing a common execution interface. This decoupling allows engineers to inject custom configurations without breaking the core read/query logic.

Execution Logic:
Connector InitializationComponent ConfigurationUnified ConnectionOptimized Query Execution


✨ Key Features

  • Querying Consistency: One standard execute_query() method across all connectors, supporting SQL and Spark SQL.
  • Optimized Data Reading: Native support for returning DataFrames (Pandas/Spark), Lists of Dictionaries, or NumPy Arrays.
  • Memory-Safe Batching: Integrated stream=True functionality for reading large datasets through Python Generators to prevent memory overflow.
  • Enterprise Configuration: Layered settings management allowing for Environment defaults with per-query overwrites.
  • Security-First: Automatic protection and masking of credentials in all logs and metadata exports.
  • Cloud-Ready Big Data: Specialized support for Iceberg REST Catalogs, OAuth2, and MinIO/S3 compatible storage.

🛠 Supported Data Sources

Connector Source Driver/Engine Role
SQLServerConnector SQL Server pyodbc Query & Read
SparkConnector Spark / Iceberg / JDBC pyspark Query & Big Data Read
OracleConnector Oracle DB oracledb Coming Soon
PostgresConnector PostgreSQL psycopg3 Planned
TrinoConnector Trino trino Planned

🔮 Roadmap

We are expanding src-connectors to become the default data access layer for all modern infrastructures:

  • Federated Query Engines: Adding Trino and Presto support for cross-catalog querying.
  • Streaming Sinks: Support for writing queried data into Kafka or RabbitMQ.
  • Advanced Authentication: Native integration with AWS Secrets Manager, Azure Key Vault, and HashiCorp Vault.
  • Observability: Built-in OpenTelemetry hooks to track query performance and latency.

🤝 Contributing & License

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

This project is licensed under the terms of the 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

src_connectors-0.1.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

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

src_connectors-0.1.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file src_connectors-0.1.0.tar.gz.

File metadata

  • Download URL: src_connectors-0.1.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.2 Darwin/23.4.0

File hashes

Hashes for src_connectors-0.1.0.tar.gz
Algorithm Hash digest
SHA256 497a5bd9c7b45a2d94a0c436aad10ef48968b9c5f1a822d5e62b3190dca8b817
MD5 9ad5958e59d4d8048446a2455613d1ad
BLAKE2b-256 36c022aa564bbfc467cd74e7ccf7368c4a8840d83bfe3558487e4d1117796347

See more details on using hashes here.

File details

Details for the file src_connectors-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: src_connectors-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.2 Darwin/23.4.0

File hashes

Hashes for src_connectors-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75df6d34b77371d9f4842aee5168d83ab22e2364007d36375b60f9a551ac9110
MD5 97d3f59374ac26027a05c5d5c4e38642
BLAKE2b-256 2ff6dd021d59f19b3d1f9b1a58339993ee555c66bec3ec349405bbbf537a92dd

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