Skip to main content

A toolbox for Analytics and Research.

Project description

analytics_toolbox

A toolbox for Analytics and Research.

Install

pip install analytics_toolbox

Documentation

Help With Postges Connection Setup

Step 1. Formatting Your Database Config Files

For example, you have the following config.ini file.

[dev_db]
hostname = dev.yourhost.com
port = 5432
database = dbname 
user = htpeter

[prod_db]
hostname = prod.yourhost.com
port = 5432
database = dbname 
user = htpeter

Step 2. Ensuring you have .pgpass setup

You don't pass passwords to analytics_toolbox in its current form. Instead it leverages pgpass. Simply paste a record for each database in a text file ~/.pgpass with the following information.

hostname:port:database:username:password

When psycopg2 or even psql attempt to connect to a server, it will look in this file and if it finds matching server information, it will use that password.

Ensure you limit the permissions on this file using chmod 600 ~/.pgpass

Usage Examples

import analytics_toolbox as atb

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

analytics_toolbox-0.1.0.tar.gz (14.3 kB view hashes)

Uploaded Source

Built Distribution

analytics_toolbox-0.1.0-py3-none-any.whl (13.6 kB view hashes)

Uploaded 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