Skip to main content

Database Connection Library

This library provides two classes, ACCESSdbc and SSMSdbc, for connecting to Microsoft Access and SQL Server databases respectively.

Installation

pip install db_handler

Usage

Connecting to a Microsoft Access Database

from db_handler import ACCESSdbc

# Create an instance of ACCESSdbc
db = ACCESSdbc('path_to_your_database_file')

# Connect to the database
if db.connect():
    # Execute a query and get the results
    results = db.execute_query_return_results('SELECT * FROM your_table')

    # Don't forget to disconnect when you're done
    db.disconnect()

Connecting to a Microsoft SQL Server Database

from db_handler import SSMSdbc

# Create an instance of SSMSdbc
db = SSMSdbc('your_server', 'your_database', 'your_username', 'your_password')

# Connect to the database
if db.connect():
    # Execute a query and get the results
    results = db.execute_query_return_results('SELECT * FROM your_table')

    # Don't forget to disconnect when you're done
    db.disconnect()

Metadata

Release files for db-handler 0.2.1

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

Source distribution (sdist)

Source distribution for db-handler 0.2.1
File Size Uploaded
db_handler-0.2.1.tar.gz 1.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for db-handler 0.2.1
File Interpreter ABI Platform
db_handler-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.3 kB

Release files / db_handler-0.2.1.tar.gz

Download URL db_handler-0.2.1.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4c22ee51c5c47fcd7bdf3a6937db004b7f7520b7cab915397f9718c598d0ed97
BLAKE2b-256 checksum
How to use checksums
3411706c99c12f3a1f04d549adfeb925ec28a3b94e17dfdb9f7bd874573efaf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.11 Windows/10

Release files / db_handler-0.2.1-py3-none-any.whl

Download URL db_handler-0.2.1-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dac4a46df30257d3a7590e8016d43bc61fbb381031a0466f5c2ce5c744ba73aa
BLAKE2b-256 checksum
How to use checksums
5ada36aff9c169c7c2e3aa6f7388eee6d37a5fd0460aef49c3781df2df60f2f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.11 Windows/10

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

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