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), generic JDBC data sources, along with specialized adapters for Oracle and PostgreSQL optimizing partitioning and read performance.
- Trino: Fast interactive querying capabilities supporting extraction to DataFrames and lists.
- PostgreSQL: Highly efficient reads and writes using the modern
psycopgdriver.
🚀 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")
- Unified Spark Engine (Iceberg, Postgres, Oracle, JDBC): Standardized data access for big data and RDBMS.
from src_connectors import SparkConnector
# Initialize Spark session
connector = SparkConnector(spark_master="local[*]")
# Configure targeted adapters directly on the connector
connector.configure_iceberg({"iceberg_warehouse": "prod_catalog"})
connector.configure_postgres({
"jdbc_url": "jdbc:postgresql://localhost:5432/testdb",
"jdbc_username": "user",
"jdbc_password": "password"
})
# Register a JDBC view to query directly via Spark SQL
connector.register_jdbc_view("pg_users", connector.postgres_config, "public.users")
# Execute queries blending multiple data sources seamlessly
df = connector.execute_query("SELECT * FROM pg_users", 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 |
Query & Read |
PostgresConnector |
PostgreSQL | psycopg |
Query & Read |
🔮 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.
Metadata
Release files for src-connectors 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| src_connectors-0.1.3.tar.gz | 26.5 kB | Without provenance | Details for src_connectors-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| src_connectors-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for src_connectors-0.1.3-py3-none-any.whl |
Total release size: 65.0 kB
Release files / src_connectors-0.1.3.tar.gz
| Download URL | src_connectors-0.1.3.tar.gz |
|---|---|
| Size | 26.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4eaa91116311ccddcfdc4d6889e0e6fafc5ae0e97f65cb511650e19a8d19a1c5
|
|
BLAKE2b-256 checksum How to use checksums |
c97d38fb1f74e85943db61cf1919ef1244e811e9b0220838dbcc171c63ffc398
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.6 Darwin/23.4.0
|
Release files / src_connectors-0.1.3-py3-none-any.whl
| Download URL | src_connectors-0.1.3-py3-none-any.whl |
|---|---|
| Size | 38.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a83e05cad3c7fb9232eb8ec305e3d14bcc1edf850c983d2668b50b9234ddfc9
|
|
BLAKE2b-256 checksum How to use checksums |
0520f06c64c10181d8c728fc91f8f10121e1b06162fb4ea901e0d422dfce2b01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.6 Darwin/23.4.0
|
Security for src-connectors 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.