Following a CircleCI tutorial? This branch is the start point. Find the end point in the main branch.
The repository contains a RESTful API built with Flask for retrieving books from a list object defined in the API. You can use the following endpoints:
[GET] /bookapi/books/:id
- Fetching a single book by its id.
[GET] /bookapi/books
- Fetching all books
Note: The data is hard-coded to keep the tutorial simple, nothing fancy :)
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
FLASK_APP=api.py flask run
The endpoints are now accessible at:
To execute all the tests, run the following command:
pytest
This repo is built following a tutorial published on CircleCI blog under the CircleCI Guest Writer Program.
- Blog post: Testing Flask Framework with Pytest
- Author's GitHub profile: Waweru Mwaura
Join a team of freelance writers and write about your favorite technology topics for the CircleCI blog. Read more about the program here.
Reviewers: Ron Powell, Stanley Ndagi, Amos Omondi, and Oluyemi