wdb_utils
Utilities for querying an Oracle, Snowflake, or Postgres database. Gradually expanding to more database types.
All the methods in this package require a yaml config file. For convenience, we assume this file is located in /Users/username/configs/config-default.yml.
Installation
pip install wdb_utils
Usage
import wdb_utils as db
# Assuming your config file is located at /Users/myname/configs/config-default.yml
# Pull all the data from an Oracle database table into a data frame
df = db.run_query_oracle('select * from my_table')
# Pull all the data from a Snowflake database table into a data frame
df = db.run_query_snowflake('select * from other_table')
# Pull all the data from a Postgres database table into a data frame
df = db.run_query_postgres('select * from third_table')
# Delete all the data in those same tables
db.run_command_oracle('delete from my_table')
db.run_command_snowflake('delete from other_table')
db.run_command_postgres('delete from third_table')
# Put all the data back into the table
# Be aware that record order is not guaranteed to be preserved here
# Trying to decide if that's enough of a problem to fix it
db.load_data_oracle(df, 'my_schema', 'my_table')
db.load_data_snowflake(df, 'another_schema', 'other_table')
db.load_data_postgres(df, 'third_schema', 'third_table')
Backward compatibility
Because this package was initially only for Oracle databases, I've also aliased the following methods to keep working:
- run_query is an alias for run_query_oracle
- run_command is an alias for run_command_oracle
- load_data is an alias for load_data_oracle
Metadata
Release files for wdb-utils 3.8.0
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 | |
|---|---|---|---|---|
| wdb_utils-3.8.0.tar.gz | 5.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wdb_utils-3.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.9 kB
Release files / wdb_utils-3.8.0.tar.gz
| Download URL | wdb_utils-3.8.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
387e4c6f3b7bbb83e67b8aa910ef1d648c2f14ce56a2c2da6c234289ea3a65a2
|
|
BLAKE2b-256 checksum How to use checksums |
a6eb1b156c9f9cdbd757f2a2a972b71aeb2f69a6a0c53ea2401ea4d4296adf3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / wdb_utils-3.8.0-py3-none-any.whl
| Download URL | wdb_utils-3.8.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
269239f688b4aa41aa689cee9f13d108f56388b43f98bdda60337bb3bec133bc
|
|
BLAKE2b-256 checksum How to use checksums |
3b15735391bb3447e367a2aad7efec139b204483450c2e35e1a781da581dbd74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for wdb-utils 3.8.0
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.