Skip to main content

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.
  • 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

  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 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=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
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.

Metadata

Release files for src-connectors 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for src-connectors 0.1.2
File Size Uploaded Provenance Actions
src_connectors-0.1.2.tar.gz 24.0 kB Without provenance Details for src_connectors-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for src-connectors 0.1.2
File Interpreter ABI Platform Actions
src_connectors-0.1.2-py3-none-any.whl Python 3 none any Details for src_connectors-0.1.2-py3-none-any.whl

Total release size: 57.3 kB

Release files / src_connectors-0.1.2.tar.gz

Download URL src_connectors-0.1.2.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
26e78d38fb8d8b7efe7d1dc467b3be15796643617c626461142cfaae9e639a4b
BLAKE2b-256 checksum
How to use checksums
2be3a7a9a846202b02894a71e441d45d676b3aa3602f577bcddd43ac2d596f39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.14.2 Darwin/23.4.0

Release files / src_connectors-0.1.2-py3-none-any.whl

Download URL src_connectors-0.1.2-py3-none-any.whl
Size 33.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0e4f01ef1f7e52ea389c18711972defab01c48a2e4425cf6cbcae7d4ae80899
BLAKE2b-256 checksum
How to use checksums
038a80ddc96b67c54b3d4aaaa6ce3231cec073ad4ae42cb216d588a6ebec54d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.14.2 Darwin/23.4.0

Security for src-connectors 0.1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page