Skip to content

mustafasencer/ghibli-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Studio Ghibli Movies

In this project, a simple Flask application is created to list the movies of Studio Ghibli.

Installation

First and foremost docker and docker-compose should be installed on your local machine.

The following commands will run the Flask application on http://localhost:8000.

docker-compose build
docker-compose up -d

API Documentation

API provides movie listing logic along with the index page content.

Cache

redis is utilized as the in-memory database.Cache aside strategy is applied in order to cache the movies.

Tests

pytest is utilized for the testing. Start the local test with the following command:

sh ./test-local.sh

You can also test with your local virtual environment. ENV variables are set within the conftest.py, please be aware to install redis on your local machine.

pytest -v

Project Structure

.
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ README.md
β”œβ”€β”€ app
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”œβ”€β”€ api.md
β”‚Β Β  β”œβ”€β”€ index.py
β”‚Β Β  └── movies.py
β”œβ”€β”€ app.py
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ services
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  └── ghibli_service.py
β”œβ”€β”€ static
β”‚Β Β  β”œβ”€β”€ errors.css
β”‚Β Β  └── style.css
β”œβ”€β”€ templates
β”‚Β Β  β”œβ”€β”€ 404.html
β”‚Β Β  β”œβ”€β”€ 429.html
β”‚Β Β  β”œβ”€β”€ 500.html
β”‚Β Β  β”œβ”€β”€ base.html
β”‚Β Β  β”œβ”€β”€ get_film.html
β”‚Β Β  β”œβ”€β”€ index.html
β”‚Β Β  └── list_films.html
β”œβ”€β”€ test-local.sh
β”œβ”€β”€ tests
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”œβ”€β”€ api
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ test_index.py
β”‚Β Β  β”‚Β Β  └── test_movies.py
β”‚Β Β  β”œβ”€β”€ conftest.py
β”‚Β Β  β”œβ”€β”€ services
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”‚Β Β  └── test_ghibli_api.py
β”‚Β Β  └── tests-start.sh
└── utils
    β”œβ”€β”€ __init__.py
    β”œβ”€β”€ cache.py
    └── error.py

About

Ghibli Movie List πŸͺΌ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors