dbsync-py
Python helper package for interacting with Cardano DB Sync databases.
This package provides SQLModel-based ORM models and utilities for interacting with Cardano DB Sync PostgreSQL databases, enabling type-safe access to Cardano blockchain data.
Installation
pip install dbsync-py
Configuration
dbsync-py supports multiple ways to configure database connections:
Option 1: Environment File (.env)
Copy sample.env to .env and modify the values:
cp sample.env .env
# Edit .env with your database configuration
Option 2: Environment Variables
Set environment variables directly:
export DBSYNC_HOST=localhost
export DBSYNC_PORT=5432
export DBSYNC_DATABASE=cexplorer
export DBSYNC_USERNAME=your_username
export DBSYNC_PASSWORD=your_password
Option 3: Complete Database URL
export DBSYNC_DATABASE_URL=postgresql://username:password@localhost:5432/cexplorer
Quick Start
import dbsync_py
# Test database connection
from dbsync_py.utils import quick_connection_check
if quick_connection_check():
print("✅ Database connection successful!")
else:
print("❌ Database connection failed")
# Use database sessions
from dbsync_py.session import get_session_context
with get_session_context() as session:
result = session.execute("SELECT version()")
print(result.scalar())
Development Status
This project is currently in development. Core database connection utilities are implemented.
License
Apache-2.0
Metadata
Release files for dbsync-py 1.1.2
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 |
|---|---|---|---|---|
| dbsync_py-1.1.2.tar.gz | 288.4 kB | Without provenance | Details for dbsync_py-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dbsync_py-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for dbsync_py-1.1.2-py3-none-any.whl |
Total release size: 390.9 kB
Release files / dbsync_py-1.1.2.tar.gz
| Download URL | dbsync_py-1.1.2.tar.gz |
|---|---|
| Size | 288.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5fa86b078613b7ca55f6ecad4b1b5f83779f01f2aac2850a988f1737dd0a36e
|
|
BLAKE2b-256 checksum How to use checksums |
1c01f6fc888d6462311f6ae5c4f4df30d191e52ceb6940bf282aa11793fdf779
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / dbsync_py-1.1.2-py3-none-any.whl
| Download URL | dbsync_py-1.1.2-py3-none-any.whl |
|---|---|
| Size | 102.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b61e5da12122e87ce304a1de2c8647637d30de0e75c527e9f94512b9722aa561
|
|
BLAKE2b-256 checksum How to use checksums |
a8b5a9d9abd299610643758d34c8eaf1883f610c93ad48ed4032523ce6725e2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for dbsync-py 1.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.