Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for Montes (0.17 sec)

  1. .github/actions/people/app/main.py

        commenters = Counter()
        last_month_commenters = Counter()
        three_months_commenters = Counter()
        six_months_commenters = Counter()
        one_year_commenters = Counter()
        authors: Dict[str, Author] = {}
    
        now = datetime.now(tz=timezone.utc)
        one_month_ago = now - timedelta(days=30)
        three_months_ago = now - timedelta(days=90)
        six_months_ago = now - timedelta(days=180)
        one_year_ago = now - timedelta(days=365)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  2. docs_src/openapi_callbacks/tutorial001.py

        "{$callback_url}/invoices/{$request.body.id}", response_model=InvoiceEventReceived
    )
    def invoice_notification(body: InvoiceEvent):
        pass
    
    
    @app.post("/invoices/", callbacks=invoices_callback_router.routes)
    def create_invoice(invoice: Invoice, callback_url: Union[HttpUrl, None] = None):
        """
        Create an invoice.
    
        This will (let's imagine) let the API user (some external developer) create an
        invoice.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_openapi_webhooks/test_tutorial001.py

        response = client.get("/users/")
        assert response.status_code == 200, response.text
        assert response.json() == ["Rick", "Morty"]
    
    
    def test_dummy_webhook():
        # Just for coverage
        app.webhooks.routes[0].endpoint({})
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Oct 20 09:00:44 GMT 2023
    - 4.4K bytes
    - Viewed (2)
  4. fastapi/openapi/utils.py

        return path, security_schemes, definitions
    
    
    def get_fields_from_routes(
        routes: Sequence[BaseRoute],
    ) -> List[ModelField]:
        body_fields_from_routes: List[ModelField] = []
        responses_from_routes: List[ModelField] = []
        request_fields_from_routes: List[ModelField] = []
        callback_flat_models: List[ModelField] = []
        for route in routes:
            if getattr(route, "include_in_schema", None) and isinstance(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  5. tests/test_custom_route_class.py

        assert response.json() == expected_response
    
    
    def test_route_classes():
        routes = {}
        for r in app.router.routes:
            assert isinstance(r, Route)
            routes[r.path] = r
        assert getattr(routes["/a/"], "x_type") == "A"  # noqa: B009
        assert getattr(routes["/a/b/"], "x_type") == "B"  # noqa: B009
        assert getattr(routes["/a/b/c/"], "x_type") == "C"  # noqa: B009
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  6. tests/test_additional_responses_custom_model_in_callback.py

    
    @callback_router.get(
        "{$callback_url}/callback/", responses={400: {"model": CustomModel}}
    )
    def callback_route():
        pass  # pragma: no cover
    
    
    @app.post("/", callbacks=callback_router.routes)
    def main_route(callback_url: HttpUrl):
        pass  # pragma: no cover
    
    
    client = TestClient(app)
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  7. tests/test_include_router_defaults_overrides.py

        callbacks=callback_router4.routes,
        deprecated=True,
    )
    router4_default = APIRouter()
    
    
    @app.get(
        "/override1",
        tags=["path1a", "path1b"],
        responses={
            401: {"description": "Client error level 1"},
            501: {"description": "Server error level 1"},
        },
        deprecated=True,
        callbacks=callback_router1.routes,
        dependencies=[Depends(dep1)],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 358.6K bytes
    - Viewed (0)
  8. docs_src/extending_openapi/tutorial001.py

            title="Custom title",
            version="2.5.0",
            summary="This is a very custom OpenAPI schema",
            description="Here's a longer description of the custom **OpenAPI** schema",
            routes=app.routes,
        )
        openapi_schema["info"]["x-logo"] = {
            "url": "https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png"
        }
        app.openapi_schema = openapi_schema
        return app.openapi_schema
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 737 bytes
    - Viewed (0)
  9. fastapi/routing.py

                    """
                ),
            ] = None,
            routes: Annotated[
                Optional[List[BaseRoute]],
                Doc(
                    """
                    **Note**: you probably shouldn't use this parameter, it is inherited
                    from Starlette and supported for compatibility.
    
                    ---
    
                    A list of routes to serve incoming HTTP and WebSocket requests.
                    """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  10. tests/test_generate_unique_id_function.py

        @app.post(
            "/",
            response_model=List[Item],
            responses={404: {"model": List[Message]}},
            generate_unique_id_function=custom_generate_unique_id3,
            callbacks=callback_router.routes,
        )
        def post_root(item1: Item, item2: Item):
            return item1, item2  # pragma: nocover
    
        @app.post(
            "/tocallback",
            response_model=List[Item],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jan 13 15:10:26 GMT 2024
    - 66.7K bytes
    - Viewed (0)
Back to top