This is an optional project completed as part of Part 3 The Backend: Databases & Applications of Udacity Full Stack Nanodegree course.
NOTE:
This project was built on Windows 10 OS. All the interaction with the Virtual Machine was done through Command Prompt on Windows.
(Do not use Git Bash for this project. It simply won't work.)
- Python
The source code for this project is written in Python v3.6.1 programming language. For direct download of version 3.6.1 click here.
- Code Validators
The source code was checked against bugs and quality using Pylint tool, PEP8 tool and PEP8 online check.
To install Pylint:
pip3 install pylint
To check Python file using Pylint:
pylint fileName.py
To install pep8:
pip3 install pep8
To check Python file using pep8:
pep8 fileName.py
- Virtual Box
To run the Virtual Machine, first, we need to download it and then install it. Virtual Box can be downloaded from here.
- Vagrant
Vagrant is the software that configures the VM and lets you share files between your host computer and the VM's filesystem. Vagrant can be downloaded from here.
psycopg2
python module is required. To install:
pip3 install psycopg2
- SQLAlchemy
SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL. For instructions on download and installation click here.
Design a database server to keep track of puppies used by the sheltes for adoption.
Using SQLAlchemy perform the following queries on your database:
- Query all of the puppies and return the results in ascending alphabetical order
- Query all of the puppies that are less than 6 months old organized by the youngest first
- Query all puppies by ascending weight
- Query all puppies grouped by the shelter in which they are staying
-
Create a new folder.
-
If the folder doesn't already contain a Vagrantfile. Run the following command to create one.
vagrant init
- To start the virtual machine, from your local directory, run the following command:
vagrant up
- Then to drop a full-fledged SSH session, run the following command:
vagrant ssh
-
Download and run database_setup.py file to create the database.
-
Download and run puppypopulator.py file to populate your database with puppies and shelters.
-
Download and run the puppy_query.py file to do queries.
- Python Documentation
- Google Python Style Guide
- PEP8
- Vagrant
- Oracle VM Virtual Box
- PostgreSQL
- SQLAlchemy
The content of this repository is licensed under MIT.