Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for Lyding (0.16 sec)

  1. tests/test_annotated.py

    import pytest
    from dirty_equals import IsDict
    from fastapi import APIRouter, FastAPI, Query
    from fastapi.testclient import TestClient
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/default")
    async def default(foo: Annotated[str, Query()] = "foo"):
        return {"foo": foo}
    
    
    @app.get("/required")
    async def required(foo: Annotated[str, Query(min_length=1)]):
        return {"foo": foo}
    
    
    @app.get("/multiple")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  2. fastapi/openapi/utils.py

    import http.client
    import inspect
    import warnings
    from typing import Any, Dict, List, Optional, Sequence, Set, Tuple, Type, Union, cast
    
    from fastapi import routing
    from fastapi._compat import (
        GenerateJsonSchema,
        JsonSchemaValue,
        ModelField,
        Undefined,
        get_compat_model_name_map,
        get_definitions,
        get_schema_from_model_field,
        lenient_issubclass,
    )
    from fastapi.datastructures import DefaultPlaceholder
    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)
  3. tests/test_openapi_examples.py

    from typing import Union
    
    from dirty_equals import IsDict
    from fastapi import Body, Cookie, FastAPI, Header, Path, Query
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        data: str
    
    
    @app.post("/examples/")
    def examples(
        item: Item = Body(
            examples=[
                {"data": "Data in Body examples, example1"},
            ],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 17K bytes
    - Viewed (0)
  4. fastapi/dependencies/utils.py

    import inspect
    from contextlib import AsyncExitStack, contextmanager
    from copy import copy, deepcopy
    from typing import (
        Any,
        Callable,
        Coroutine,
        Dict,
        ForwardRef,
        List,
        Mapping,
        Optional,
        Sequence,
        Tuple,
        Type,
        Union,
        cast,
    )
    
    import anyio
    from fastapi import params
    from fastapi._compat import (
        PYDANTIC_V2,
        ErrorWrapper,
        ModelField,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  5. scripts/docs.py

    import shutil
    import subprocess
    from functools import lru_cache
    from http.server import HTTPServer, SimpleHTTPRequestHandler
    from importlib import metadata
    from multiprocessing import Pool
    from pathlib import Path
    from typing import Any, Dict, List, Optional, Union
    
    import mkdocs.commands.build
    import mkdocs.commands.serve
    import mkdocs.config
    import mkdocs.utils
    import typer
    import yaml
    from jinja2 import Template
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  6. tests/test_openapi_separate_input_output_schemas.py

    from typing import List, Optional
    
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    from .utils import PYDANTIC_V2, needs_pydanticv2
    
    
    class SubItem(BaseModel):
        subname: str
        sub_description: Optional[str] = None
        tags: List[str] = []
        if PYDANTIC_V2:
            model_config = {"json_schema_serialization_defaults_required": True}
    
    
    class Item(BaseModel):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 18.4K bytes
    - Viewed (2)
  7. fastapi/openapi/models.py

    from enum import Enum
    from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Type, Union
    
    from fastapi._compat import (
        PYDANTIC_V2,
        CoreSchema,
        GetJsonSchemaHandler,
        JsonSchemaValue,
        _model_rebuild,
        with_info_plain_validator_function,
    )
    from fastapi.logger import logger
    from pydantic import AnyUrl, BaseModel, Field
    from typing_extensions import Annotated, Literal, TypedDict
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (1)
  8. fastapi/openapi/docs.py

    import json
    from typing import Any, Dict, Optional
    
    from fastapi.encoders import jsonable_encoder
    from starlette.responses import HTMLResponse
    from typing_extensions import Annotated, Doc
    
    swagger_ui_default_parameters: Annotated[
        Dict[str, Any],
        Doc(
            """
            Default configurations for Swagger UI.
    
            You can use it as a template to add any other configurations needed.
            """
        ),
    ] = {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  9. tests/test_sub_callbacks.py

    from typing import Optional
    
    from dirty_equals import IsDict
    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, HttpUrl
    
    app = FastAPI()
    
    
    class Invoice(BaseModel):
        id: str
        title: Optional[str] = None
        customer: str
        total: float
    
    
    class InvoiceEvent(BaseModel):
        description: str
        paid: bool
    
    
    class InvoiceEventReceived(BaseModel):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  10. tests/test_security_oauth2_optional_description.py

    from typing import Optional
    
    from dirty_equals import IsDict
    from fastapi import Depends, FastAPI, Security
    from fastapi.security import OAuth2, OAuth2PasswordRequestFormStrict
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    reusable_oauth2 = OAuth2(
        flows={
            "password": {
                "tokenUrl": "token",
                "scopes": {"read:users": "Read the users", "write:users": "Create users"},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.9K bytes
    - Viewed (0)
Back to top