Skip to main content

PostgreSQL service populator.

Project description

Tool: pg_populator


This program populates an already existing PostgreSQL service with: - N databases. The specific amount of databases is parametrized through the -n argument. - N tables inside each database. The specific amount of tables is parametrized through the -t argument. - Some data rows inside every table. The specific amount of rows is parametrized through the -r argument.

This program will make sure that local postgreSQL service contains, at least, the amount of databases and tables defined in the required command line arguments -n (–num_db) and -t (–num_tables) per database. It will also add the amount of rows specified in the -r parameter. This program will NOT delete any database, table or row.


A running postgreSQL database must be previously configured. To make this software works, the user that runs this script must have the ~/.pgpass properly configured. To get this done, I recommend you to use the scripts stored in the next repository:

How to’s:

Note: The next commands are meant to be run in the same that directory in which this Readme.1st file is stored.

  • Disable any previously activated virtualenv:

$ deactivate

  • Enable virtualenv:

$ source venvs/1_populate_db/bin/activate

  • Get the program help:

$ ./run -v

  • Run the tool (example):

Run the next command to create 10 databases with 20 tables and insert 100 rows each of them.

$ ./run -n 10 -t 20 -r 100

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pg_populator, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size pg_populator-0.0.4.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page