Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydbfusion-0.1.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydbfusion-0.1.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

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

Hashes for pydbfusion-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c31e087b2efb6c7ecb79eba689bab74193bc738d9da92e4725755c4ea81ce6cd
MD5 d146808d16ed3a0257ee99579d0d80de
BLAKE2b-256 15f3a1b76fe5b2e6578cbaa85f4618f096ab01765f5c1c7b7bf3d05afdb97d06

See more details on using hashes here.

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

Hashes for pydbfusion-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9c69fe6f71ba8fb76b1775582189be425d1d74ee9e71ddfbcc7521a076a45b6d
MD5 20e83ac833f3d6a840711d67a382f6d0
BLAKE2b-256 84f5cc71e8c34eeea60e4b898683f2df90a7951e5246ea2766746159679a06ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page