Skip to content

Woffee/qr_code_api_broken_code

 
 

Repository files navigation

RestAPI for Creating QR Codes

For this assignment I want you to go over the videos and I've created a X number of errors in the code that you will have to find and fix them. You should keep running the tests and read the error and try to understand what it mean. The purpose of this assignment is to get you accustomed to running the project and following the steps that the program uses to process requests.

Here is my repo with the working code: https://github.com/Woffee/fastapi_fall2024

You can get this repo working with the install instructions below. The assignment repo will not work because its filled with broken code.

To submit this assignment, you should make your own repository and add the remote to git and then push your fixed code to your own repo.

Grading

You will only get 100 if the entire QR program passes GitHub actions, so you will need to update the production.yml file to have your info and setup your environment variables on the repository.

Instructor Videos

Optional but extremely helpful:

  1. Best Series to Learn Bash Scripting Seriously learn this!!!

  2. Listen to someone else explain FastAPI and go through a project

Install

  1. Fork my repo on Github. Then clone YOUR new repo to your local machine: git clone git@github.com:XXX/qr_code_api_broken_code.git (replace XXX to your github username).

  2. Make virtual environment: python3 -m venv venv

  3. Activate virtual environment: source venv/bin/activate

  4. Install requirements: pip install -r requirements.txt

  5. IMPORTANT run: mkdir qr_codes to create a qr codes directory to save in, permissions will be messed up and the docker container won't be able to write to the qr_codes directory if you don't.

  6. Note: make sure docker is started

  7. run pytest locally to check that it works locally

  8. Start the app with docker compose up --build

  9. Goto http://localhost/docs to view openapi spec documentation

  10. Click "authorize" input username: admin password: secret

  11. Test making, retrieving, and deleting QR codes on the spec page.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 92.5%
  • Dockerfile 6.4%
  • Shell 1.1%