Skip to content

CruzanCaramele/MVC-Development-with-Python-and-SQLalchemy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

puppypopulator

Glances of the Server

Operations

  1. Query for all puppies and return the results in ascending alphabetical order.
  2. Query for all puppies that are less than 6 months old organized by the youngest first.
  3. Query all puppies by ascending weight.
  4. Query all puppies grouped by the shelter in which they are staying.

FILES

  • puppshelters.py - Defines the database structure. Do not run this file manually.
  • puppypopulator.py - Populates the database with puppies and attributes.
  • puppyqueries.py - A menu-based command line tool for read-only queries to the database.

The first two were provided by the instructor. I wrote the latter.

PREREQUISITES

All code was developed on Ubuntu 14.04.2 LTS, Python 2.7 and PostgreSQL 9.3.6. In addition to installing PostgreSQL, you will also need to install the following Python modules:

Don't forget to start the postgres daemon.

BUILD

To create the database and its tables, run this command:

python puppypopulator.py

RUN

To run the puppyqueries.py script, run this command:

python queries.py

This will display a menu in a terminal based interface where you select menu item numbers to call the various functions, including exiting the script if you choose. All data is dumped to STDOUT and is not paginated.

About

modelling a database for dog adoption website with python and sqlalchemy

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages