Skip to main content

Utility libraries for working with PostgreSQL

Project description

When analyzing large datasets, it can often be useful to let the database do as much of the analysis as possible. While Pandas is great at manipulating datasets that are large enough to fit on one machine, but possibly not large enough to fit into memory, concerns over performance and data security can sometimes make analysis in the database more convenient.

This package is built for use with PostgreSQL. Support for other databases might follow (but don’t hold your breath).

Goals

The goals for this package are:

  • Providing a simple Connection object that builds easy connections to the database based off of environment variables (overridden with parameters, if specified).

  • Mocking Pandas Series and DataFrame objects with metadata constructs of Column and Table (respectively). Columns and Tables will implement some parts of the Pandas API that do calculations in the database.

  • Possibly other tools for automation of simple tasks and conveniently displaying metadata (if needed).

Non-Goals

This package will never be:

  • An object-relational mapper (ORM). The only SQL-ish operations will be those that are implemented and that mock SQL-ish bits of the Pandas API for Series and/or DataFrames.

Installation

It’s up on PyPI. So, just do

pip install pg-utils

for the base package, or

pip install pg-utils[graphics]

to install Seaborn for graphical visualizations.

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

pg-utils-0.3.1.tar.gz (11.5 kB view hashes)

Uploaded Source

Built Distribution

pg_utils-0.3.1-py2.py3-none-any.whl (16.0 kB view hashes)

Uploaded Python 2 Python 3

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