Skip to content

An API written in Python with fastapi. Allows the user to design a curriculum and keep track of learning resources using PostgreSQL.

Notifications You must be signed in to change notification settings

am831/Curriculum-designer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Curriculum-designer

A curriculum designer that allows the user to organize and keep track of learning resources. All data is stored in a postgreSQL database.

  • organize learning goals by year
  • keep track of courses and subjects you need to learn
  • specify how many hours per week you'll spend on each course, for how long, and other details 5

Getting started

  • Download the source code
  • Add a .env file to the app directory that stores all sensitive data. See the Settings class in config.py for required fields.
  • Download postgres and set up a database
  • From within the app directory, start the server by running "python -m uvicorn main:app --reload"
  • It is recommended to send requests to the API using the postman app or another API develeopment tool.

Routers

Posts

GET

  • Gets all posts and outputs a table for each year to the command line. Is dependent on the user being logged in. The user needs to provide a bearer token.
  • Send the GET request to url/posts/
  • Responses: posts-get

POST

  • Create a post. Is dependent on the user being logged in. The user needs to provide a bearer token.
  • Send the POST request to url/posts/
  • Required request body in json format (only "course" is a required field): posts-post-req
  • Responses: posts-post-res

PUT

  • Update a post. Is dependent on the user being logged in. The user needs to provide a bearer token.
  • Send the PUT request to url/posts/{id} where id is the unique id of the post.
  • Required request body in json format (only provide fields you want to update): posts-put-req
  • Responses: posts-put-res

DELETE

  • Delete a post. Is dependent on the user being logged in. The user needs to provide a bearer token.
  • Send the DELETE request to url/posts/{id} where id is the unique id of the post.
  • Responses: posts-put-res

Users

POST

  • Create a user.
  • Send the POST request to url/users/
  • Required request body in json format: users-post
  • Responses: users-post-res

GET

  • Get a user's information.
  • Send the GET request to url/users/{id} where id is the unique id of the user.
  • Responses: users-post-res

Auth

POST

  • Provide credentials and get a bearer token.
  • Send the POST request to url/login
  • Required request body in form-data format: auth-post-req
  • Responses: auth-post-res

Demo using Postman

  1. Create a user 1
  2. Login. Then copy the bearer token 2
  3. Create a post. Paste the bearer token under the authorization tab. 3
  4. See all posts. Paste the bearer token under the authorization tab. 4 Your curriculim will be output to the command line, like this: 5

About

An API written in Python with fastapi. Allows the user to design a curriculum and keep track of learning resources using PostgreSQL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published