Practice flask web app
Practice flask web app
“MMasters” is a movie inventory company and they wish to introduce new features in their system.
MMasters is an “API first” company providing a lot of APIs around movie snapshots. They would like to introduce few features in the system -
They wish to pull movie snapshots from OMDB (http://www.omdbapi.com/) and store in our system.
They would also like to allow anyone to retrieve these movie snapshots.
As mentioned, they are an “API first” company and they now expect to build two APIs -
- one that gets all the movie snapshots from our system
- is an OPEN API
- one that creates movie snapshots in our system by fetching the information from omdb
- is a protected API
- every request should contain a header "x-api-key" with "d2ViLWFwcGxpY2F0aW9uLWluLWZsYXNr" as the value
- *allow our people to pass mutiple movie titles to be fetched from OMDB
They expect proper REST status in the system:
…and so on
Movie snapshot includes -
Summarizing -
As a part of the system
```shell script
brew install pipenv
cd
pipenv install
pipenv shell #(to activate virtualenv)
### Running Migrations
```shell script
export FLASK_APP='run_app.py'
flask db upgrade
```shell script
export API_KEY=’
export OMDB_API_KEY=’
export FLASK_APP=’run_app.py’
flask run
### Running the Tests
```shell script
python -m pytest tests/