A comprehensive database helper library for Oracle, SQL Server, and PostgreSQL with support for data import/export operations
Project description
Bizflow DB Helper
A comprehensive database helper library for Oracle, SQL Server, and PostgreSQL with support for data import/export operations using pandas DataFrames.
Features
- Multi-database support: Oracle, SQL Server, and PostgreSQL
- Pandas integration: Easy data import/export with pandas DataFrames
- Secure connections: Proper URL encoding for passwords with special characters
- Type handling: Automatic data type conversion and validation
- Bulk operations: Efficient data loading with chunking support
- Schema support: Full schema-aware operations
Installation
pip install bizflow-db-helper
Quick Start
from bizflow_db_helper import DBHelper
# Initialize database connection
db = DBHelper(
user="your_username",
password="your_password@with_special_chars", # Now handles special characters!
host="localhost",
port=1521,
db_name="your_database",
schema="your_schema",
db_type="oracle" # or "sql_server" or "postgresql"
)
# Write DataFrame to database
import pandas as pd
df = pd.DataFrame({'col1': [1, 2, 3], 'col2': ['a', 'b', 'c']})
db.to_sql(df, 'your_table', if_exists='replace')
# Read data (using standard pandas/SQLAlchemy)
df_result = pd.read_sql("SELECT * FROM your_table", db.engine)
Supported Database Types
- Oracle: Uses
oracledbdriver with thick client support - SQL Server: Uses
pyodbcwith ODBC Driver 17 - PostgreSQL: Uses standard PostgreSQL driver
What's New in v2.0.0
- Fixed password encoding: Passwords containing '@' and other special characters now work correctly
- Improved URL handling: Uses SQLAlchemy's
URL.create()for robust connection string generation - Enhanced security: Better handling of credentials in connection URLs
Requirements
- Python >=3.8
- pandas >=1.3.0
- sqlalchemy >=1.4.0
- oracledb >=1.0.0
- numpy >=1.20.0
- bcpy >=0.1.0 (for SQL Server bulk operations)
License
MIT License
Contributing
Issues and pull requests are welcome on GitHub.
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
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 bizflow_db_helper-2.0.0.tar.gz.
File metadata
- Download URL: bizflow_db_helper-2.0.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9bb646e36c9790a3113f1a8950a4b2834629e0e03e199b136abe4eba9fdb080
|
|
| MD5 |
b3635a6a02e5382a62c371b0de706c65
|
|
| BLAKE2b-256 |
db8c5b827cea018d9ec73db4d0e5f03a49dfaf531ee2eba49b660d14f6290d96
|
File details
Details for the file bizflow_db_helper-2.0.0-py3-none-any.whl.
File metadata
- Download URL: bizflow_db_helper-2.0.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
982bfd5e4515188eaa303cb479c16a3c52fda3a717c58ebd7418a62bdbffb9eb
|
|
| MD5 |
71c2ea9e3d12f006163a9bcffd103ba6
|
|
| BLAKE2b-256 |
792863197a3c4d1621072e56b7c8303f7e09eeb23ab1d932dc62e0cdc8465e95
|