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)
Built Distribution
Close
Hashes for analytics_toolbox-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5353ac71d4d19d17abe76150c57734807f2001952b181efee2b539af34fdfe53 |
|
MD5 | 99aa7af1dd8b3f590396f06b387c5431 |
|
BLAKE2b-256 | cc2777cc8685effd609ecaf34ed958b20bc3574f24e230c308e938baa34e790a |