DataLink SDK
A lightweight, unified database connector SDK for Python. Connect to MySQL, PostgreSQL, MongoDB, and Redis using a single consistent interface.
Installation
pip install datalink-sdk
Supported Databases
| Driver | Key |
|---|---|
| MySQL | mysql |
| PostgreSQL | postgres |
| MongoDB | mongodb |
| Redis | redis |
Quick Start
from datalink_sdk import DataLinkClient
# MySQL
conn = DataLinkClient.get_connection("mysql", {
"host": "localhost",
"user": "root",
"password": "secret",
"database": "mydb",
"port": 3306,
})
# PostgreSQL
conn = DataLinkClient.get_connection("postgres", {
"host": "localhost",
"user": "postgres",
"password": "secret",
"database": "mydb",
"port": 5432,
})
# MongoDB
conn = DataLinkClient.get_connection("mongodb", {
"uri": "mongodb://localhost:27017",
})
# Redis
conn = DataLinkClient.get_connection("redis", {
"host": "localhost",
"port": 6379,
"password": None,
})
Exception Handling
from datalink_sdk import DataLinkClient, DataLinkConnectionError, UnsupportedDriverError
try:
conn = DataLinkClient.get_connection("mysql", config)
except DataLinkConnectionError as e:
print(f"Connection failed: {e}")
except UnsupportedDriverError as e:
print(f"Unknown driver: {e}")
Exceptions Reference
| Exception | When raised |
|---|---|
DataLinkException |
Base exception for all DataLink SDK errors |
DataLinkConnectionError |
Connection to the database failed |
UnsupportedDriverError |
Driver type not recognised |
DataLinkConfigError |
Configuration is invalid or missing fields |
Project Structure
datalink_sdk/
├── core/
│ ├── base_driver.py # Abstract base class for all drivers
│ ├── client.py # DataLinkClient — main entry point
│ └── exceptions.py # All SDK exceptions
├── drivers/
│ ├── mysql.py
│ ├── postgres.py
│ ├── mongodb.py
│ └── redis.py
└── config/
└── settings.py
License
MIT
Release files for datalink-sdk 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| datalink_sdk-1.0.0.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datalink_sdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / datalink_sdk-1.0.0.tar.gz
| Download URL | datalink_sdk-1.0.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f1ddcbf3833b4b659fe928e3d1a94e7d476fc33fdfbbe68569fcdcd8a9faa7b
|
|
BLAKE2b-256 checksum How to use checksums |
2f04c676293291c371dde1873e9ab1506deb06244ad1ef78a2d8ea8d46f95a64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 23, 2026.
Transparency logRelease files / datalink_sdk-1.0.0-py3-none-any.whl
| Download URL | datalink_sdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63443758c818eeb69c31ae722c1f772814b0cb2e613cfeea43836e3e46cbea9f
|
|
BLAKE2b-256 checksum How to use checksums |
b67d973cd630583e84c08bf2fe5af334d72e3cf2862761604a1f30a3b352020f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 23, 2026.
Transparency log