from fastapi import FastAPI, status app = FastAPI() @app.post('/items', status_code=status.HTTP_201_CREATED) def create(): return {'ok': True}