Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for and (0.19 sec)

  1. docs_src/dataclasses/tutorial003.py

        return [  # (9)
            {
                "name": "Breaters",
                "items": [
                    {
                        "name": "Island In The Moon",
                        "description": "A place to be be playin' and havin' fun",
                    },
                    {"name": "Holy Buddies"},
                ],
            },
            {
                "name": "System of an Up",
                "items": [
                    {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.4K bytes
    - Viewed (0)
  2. docs_src/events/tutorial003.py

    ml_models = {}
    
    
    @asynccontextmanager
    async def lifespan(app: FastAPI):
        # Load the ML model
        ml_models["answer_to_everything"] = fake_answer_to_everything_ml_model
        yield
        # Clean up the ML models and release the resources
        ml_models.clear()
    
    
    app = FastAPI(lifespan=lifespan)
    
    
    @app.get("/predict")
    async def predict(x: float):
        result = ml_models["answer_to_everything"](x)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 07 15:46:00 GMT 2023
    - 569 bytes
    - Viewed (0)
  3. docs_src/path_operation_configuration/tutorial003.py

        tags: Set[str] = set()
    
    
    @app.post(
        "/items/",
        response_model=Item,
        summary="Create an item",
        description="Create an item with all the information, name, description, price, tax and a set of unique tags",
    )
    async def create_item(item: Item):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 517 bytes
    - Viewed (0)
Back to top