Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

cyclic-software/starter-fastapi

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI Starter

This is the simplest possible python FastAPI app that responds with:

{"message": "Hello World"}

Deploy to Cyclic in seconds

Deploy to Cyclic

Set server.py as your entry point.

Run Locally

Prerequisites:

  • pyenv
  • python 3.10.11

Install: bin/install

  • creates virtual env
  • installs dependencies from requirements.txt

Run: bin/dev

  • runs a uvicorn server in reload mode

Run: bin/start

  • runs a uvicorn server

Try the server

Schema docs: http://localhost:8181/docs

Get an item: curl -i -XGET http://localhost:8181/item/1

List items: curl -i -XGET http://localhost:8181/items/

Post an item: curl -i -XPOST http://localhost:8181/items/ --data '{"item_id":1,"name":"Bob"}' -H 'content-type: application/json'

Questions / Help

Join us on Discord: https://discord.cyclic.sh

Enjoy!

About

Cyclic FastAPI starter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.