Minimal universal database connection library for SQLite, PostgreSQL, MySQL and Azure SQL database.
Project description
#pydbfusion
A minimal universal database connection library for SQLite, PostgreSQL, MySQL and Azure SQL database.
One simple function to connect to multiple databases without worrying about different drivers.
First, install the library.
pip install pydbfusion
How to use this library and connect to different databases with examples: 1.Import the connect function.
from pydbfusion import connect
2.To Connect to SQLite: conn = connect( "sqlite", database="my_database.db" # optional, defaults to ":memory:" )
3.Connect to PostgreSQL
Option A: Using individual parameters
conn = connect( "postgres", host="localhost", user="postgres", password="mypassword", database="testdb", port=5432 # optional, default is 5432 )
Option B: Using a URL
conn = connect( "postgres", url="postgresql://username:password@host:port/database" )
4.Connect to MySQL conn = connect( "mysql", host="localhost", user="root", password="mypassword", database="testdb", port=3306 # optional, default is 3306 )
5.Connect to Azure SQL database conn = connect( "azure_sql", server=server, database=database, user=user, password=password )
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 pydbfusion-0.1.1.tar.gz.
File metadata
- Download URL: pydbfusion-0.1.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c31e087b2efb6c7ecb79eba689bab74193bc738d9da92e4725755c4ea81ce6cd
|
|
| MD5 |
d146808d16ed3a0257ee99579d0d80de
|
|
| BLAKE2b-256 |
15f3a1b76fe5b2e6578cbaa85f4618f096ab01765f5c1c7b7bf3d05afdb97d06
|
File details
Details for the file pydbfusion-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pydbfusion-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c69fe6f71ba8fb76b1775582189be425d1d74ee9e71ddfbcc7521a076a45b6d
|
|
| MD5 |
20e83ac833f3d6a840711d67a382f6d0
|
|
| BLAKE2b-256 |
84f5cc71e8c34eeea60e4b898683f2df90a7951e5246ea2766746159679a06ec
|