-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
38 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"config":{"lang":["en"],"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"FastAPI Camelcase Package for providing a class for camelizing request and response bodies for fastapi while keeping your python code snake cased. Full code can be found on github Dependencies pydantic pyhumps Usage # using CamelModel instead of Pydantic BaseModel from fastapi_camelcase import CamelModel class User(CamelModel): first_name: str last_name: str age: int","title":"Getting Started"},{"location":"#fastapi-camelcase","text":"Package for providing a class for camelizing request and response bodies for fastapi while keeping your python code snake cased. Full code can be found on github","title":"FastAPI Camelcase"},{"location":"#dependencies","text":"pydantic pyhumps","title":"Dependencies"},{"location":"#usage","text":"# using CamelModel instead of Pydantic BaseModel from fastapi_camelcase import CamelModel class User(CamelModel): first_name: str last_name: str age: int","title":"Usage"},{"location":"example/","text":"How to use (full example) import uvicorn from fastapi import FastAPI from fastapi_camelcase import CamelModel class User(CamelModel): first_name: str last_name: str age: int app = FastAPI() @app.get(\"/user/get\", response_model=User) async def get_user(): return User(first_name=\"John\", last_name=\"Doe\", age=30) @app.post(\"/user/create\", response_model=User) async def create_user(user: User): return user if __name__ == \"__main__\": uvicorn.run(app, host=\"0.0.0.0\", port=8000)","title":"Full Example"},{"location":"example/#how-to-use-full-example","text":"import uvicorn from fastapi import FastAPI from fastapi_camelcase import CamelModel class User(CamelModel): first_name: str last_name: str age: int app = FastAPI() @app.get(\"/user/get\", response_model=User) async def get_user(): return User(first_name=\"John\", last_name=\"Doe\", age=30) @app.post(\"/user/create\", response_model=User) async def create_user(user: User): return user if __name__ == \"__main__\": uvicorn.run(app, host=\"0.0.0.0\", port=8000)","title":"How to use (full example)"},{"location":"install/","text":"Using Pip pip install fastapi-camelcase Using Pipenv pipenv install fastapi-camelcase Using poetry poetry add fastapi-camelcase","title":"Install"},{"location":"install/#using-pip","text":"pip install fastapi-camelcase","title":"Using Pip"},{"location":"install/#using-pipenv","text":"pipenv install fastapi-camelcase","title":"Using Pipenv"},{"location":"install/#using-poetry","text":"poetry add fastapi-camelcase","title":"Using poetry"}]} | ||
{"config":{"lang":["en"],"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"FastAPI Camelcase Package for providing a class for camelizing request and response bodies for fastapi while keeping your python code snake cased. Full code can be found on github Dependencies pydantic pyhumps Usage # using CamelModel instead of Pydantic BaseModel from fastapi_camelcase import CamelModel class User ( CamelModel ): first_name : str last_name : str age : int","title":"Getting Started"},{"location":"#fastapi-camelcase","text":"Package for providing a class for camelizing request and response bodies for fastapi while keeping your python code snake cased. Full code can be found on github","title":"FastAPI Camelcase"},{"location":"#dependencies","text":"pydantic pyhumps","title":"Dependencies"},{"location":"#usage","text":"# using CamelModel instead of Pydantic BaseModel from fastapi_camelcase import CamelModel class User ( CamelModel ): first_name : str last_name : str age : int","title":"Usage"},{"location":"example/","text":"How to use (full example) import uvicorn from fastapi import FastAPI from fastapi_camelcase import CamelModel class User ( CamelModel ): first_name : str last_name : str age : int app = FastAPI () @app . get ( \"/user/get\" , response_model = User ) async def get_user (): return User ( first_name = \"John\" , last_name = \"Doe\" , age = 30 ) @app . post ( \"/user/create\" , response_model = User ) async def create_user ( user : User ): return user if __name__ == \"__main__\" : uvicorn . run ( app , host = \"0.0.0.0\" , port = 8000 )","title":"Full Example"},{"location":"example/#how-to-use-full-example","text":"import uvicorn from fastapi import FastAPI from fastapi_camelcase import CamelModel class User ( CamelModel ): first_name : str last_name : str age : int app = FastAPI () @app . get ( \"/user/get\" , response_model = User ) async def get_user (): return User ( first_name = \"John\" , last_name = \"Doe\" , age = 30 ) @app . post ( \"/user/create\" , response_model = User ) async def create_user ( user : User ): return user if __name__ == \"__main__\" : uvicorn . run ( app , host = \"0.0.0.0\" , port = 8000 )","title":"How to use (full example)"},{"location":"install/","text":"Using Pip pip install fastapi-camelcase Using Pipenv pipenv install fastapi-camelcase Using poetry poetry add fastapi-camelcase","title":"Install"},{"location":"install/#using-pip","text":"pip install fastapi-camelcase","title":"Using Pip"},{"location":"install/#using-pipenv","text":"pipenv install fastapi-camelcase","title":"Using Pipenv"},{"location":"install/#using-poetry","text":"poetry add fastapi-camelcase","title":"Using poetry"}]} |
Binary file not shown.