Skip to main content

No project description provided

Project description

# py-db-wrapper
Shallow wrapper for convenience tools for db management

## TODO:
* Utils - HiveUtils.get_table_columns(). This should probabkly be generic not in Hive utils.
* Statements - standardise the use of database (or schema) and table (or tablename)

## Examples

## Connections
The connection class is a simple wrapper to simplify connecting to know database types.Currently supports MSSQL, MYSQL and HIVE.
### Making a sql alchemy engine

azure_sre_connection = AzureConnection(

azure_sre_engine = azure_sre_connection.connect()

## Statements
Statement classes are designed to help make various sql statements for different dialect.

columns = HiveUtils.get_table_columns(hive_engine=engine, database='foo', tablename='bar')

stmt = CreateTableStatement(dialect=dialect.Mssql, columns=columns)
sql = stmt.get_sql(schema='doo',table='dar')

## Developer notes

Package deployment etc

python test

python sdist bdist_egg
twine upload --repository-url dist/*

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

py-db-wrapper-1.0.6.tar.gz (8.3 kB view hashes)

Uploaded source

Built Distribution

py_db_wrapper-1.0.6-py3.6.egg (20.9 kB view hashes)

Uploaded 3 6

Supported by

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