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

cckcoder/fast-api-basic

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fast-api-basic

Presentation

  • FastApi FastApi คืออะไร?

    • FastApi ทำงานอย่างไร
    • ใครเป็นคนสร้าง
    • FastApi In production
  • RESTFul

    • What's RESTFul
    • มีประโยชน์อย่างไร
    • Concept of restful
  • CRUD

    • คืออะไร
  • Tools

    • VSCode Extension

      • python
      • pylance
    • pip

Coding Time.

  • Install Fast Api with pip

    • python3 -m venv env
    • pip install fastapi
    • pip install uvicorn[standard]
  • Install Fast Api with pip (Windows)

    • python -m venv env
    • env/Scripts/activate
    • pip install fastapi
    • pip install uvicorn[standard]
  • Hello world

    • Ref
    • Create simple fast-api
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    async def root():
        return {"message": "Hello World"}
    • run api uvicorn main:app --reload
  • Swagger UI

  • Path Parameters

    • get book by name
        from fastapi import FastAPI
    
        app = FastAPI()
    
    
        @app.get("/books/{book_name}")
        async def read_item(book_name: str):
            return {"book_name": book_name}
  • Pydantic

    • Ref
    • What's pydantic
      • it's data validation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

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