Skip to content

Oceloteater/flask-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask-app

Notes on implementation, requirements and running the app

Technologies

This application uses the following technologies:

Rationale for using these technologies are that Flask-RESTful is the standard and a requirement of the task. SQLAlchemy allows you to swap out db implementations easily. SQLite is simple db solution but better than using in-memory store. And Redis is the latest caching option of choice for modern apps.

Basic structure was inspired from here:

https://www.udemy.com/course/rest-api-flask-and-python/

Requirements

Running

Installing dependencies:

pip install -r requirements.txt

Run redis server:

[__dir__]/Redis/redis-server.exe

'localhost', 6379

Run app:

[__dir__]/git-projects/flask-app

python app.py

(creates data.db) in your root directory

URI:

http://127.0.0.1:5000/

Resources

(Dog, '/dog/<string:name>')
(DogList, '/dogs')

Notes

Task 1: (Create a Dog Application)

Implemented:

  • Create - new dog with id, name, breed and age
  • Read - return list of dogs and get individual dog by name (not id)
  • Update - existing dog or create new one if not found
  • Delete - remove a given individual dog
  • Datastore - SQLite db

Task 2: (Implement Validation)

Implemented:

  • Simple validation using reqparse

Task 3: (Implement Caching)

Implemented:

  • Simple caching using Redis

Task 4: (Implement Configuration)

Not Implemented:

  • No (bonus) config
  • No unit tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages