High-performance data connectors for SQL Server, Spark, Iceberg, Trino, and JDBC.
Project description
src-connectors
The ultimate library for high-speed data connectivity, querying, and reading.
📖 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
pyodbcwith support for high-speed batched reads. - Apache Spark: Modular engine setup supporting Iceberg catalogs (Hadoop/REST/S3) and JDBC data sources.
- Trino: Fast interactive querying capabilities supporting extraction to DataFrames and lists.
🚀 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
- 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")
- 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 Initialization → Component Configuration → Unified Connection → Optimized 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=Truefunctionality 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 |
TrinoConnector |
Trino | trino |
Query & Read |
OracleConnector |
Oracle DB | oracledb |
Coming Soon |
PostgresConnector |
PostgreSQL | psycopg3 |
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 src_connectors-0.1.1.tar.gz.
File metadata
- Download URL: src_connectors-0.1.1.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.14.2 Darwin/23.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8aa915d05303784acaf757626f772711f9dad1be74c56eb118573acc8c8f4602
|
|
| MD5 |
9c343b874b1d9d85eb85613115597c05
|
|
| BLAKE2b-256 |
e84e9bb2f6c55f3ba012755c49abaf52bfaf6bf66dea7d7940689b33caa1985b
|
File details
Details for the file src_connectors-0.1.1-py3-none-any.whl.
File metadata
- Download URL: src_connectors-0.1.1-py3-none-any.whl
- Upload date:
- Size: 23.9 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4428961a00d5673087bbafb013298bd5c30a3c3eb3b983a4d97b8e6b0c1b8477
|
|
| MD5 |
8331d64cd9fe3699aba06935475dfb12
|
|
| BLAKE2b-256 |
ae66667ff9bcd0dc4138f74be470cf343167b0e239a2064cfb9aecdcca84a714
|