Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 371 for kwargs (0.17 sec)

  1. fastapi/params.py

                    }
                )
                kwargs["pattern"] = pattern or regex
            else:
                kwargs["regex"] = pattern or regex
                kwargs.update(**current_json_schema_extra)
            use_kwargs = {k: v for k, v in kwargs.items() if v is not _Unset}
    
            super().__init__(**use_kwargs)
    
        def __repr__(self) -> str:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  2. docs_src/sql_databases_peewee/sql_app/database.py

    db_state = ContextVar("db_state", default=db_state_default.copy())
    
    
    class PeeweeConnectionState(peewee._ConnectionState):
        def __init__(self, **kwargs):
            super().__setattr__("_state", db_state)
            super().__init__(**kwargs)
    
        def __setattr__(self, name, value):
            self._state.get()[name] = value
    
        def __getattr__(self, name):
            return self._state.get()[name]
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 662 bytes
    - Viewed (0)
  3. fastapi/background.py

                ),
            ],
            *args: P.args,
            **kwargs: P.kwargs,
        ) -> None:
            """
            Add a function to be called in the background after the response is sent.
    
            Read more about it in the
            [FastAPI docs for Background Tasks](https://fastapi.tiangolo.com/tutorial/background-tasks/).
            """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  4. fastapi/utils.py

                annotation=type_, default=default, alias=alias
            )
        else:
            field_info = field_info or FieldInfo()
        kwargs = {"name": name, "field_info": field_info}
        if PYDANTIC_V2:
            kwargs.update({"mode": mode})
        else:
            kwargs.update(
                {
                    "type_": type_,
                    "class_validators": class_validators,
                    "default": default,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  5. docs/extensions/s3zip/examples/boto3/main.py

            aws_access_key_id='YOUR-ACCESSKEYID',
            aws_secret_access_key='YOUR-SECRETACCESSKEY',
            config=Config(signature_version='s3v4'),
            region_name='us-east-1')
    
    
    def _add_header(request, **kwargs):
        request.headers.add_header('x-minio-extract', 'true')
    event_system = s3.meta.events
    event_system.register_first('before-sign.s3.*', _add_header)
    
    # List zip contents
    Python
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Aug 04 21:15:45 GMT 2021
    - 771 bytes
    - Viewed (0)
  6. scripts/mkdocs_hooks.py

        langs = [file.stem for file in material_langs_path.glob("*.html")]
        return langs
    
    
    class EnFile(File):
        pass
    
    
    def on_config(config: MkDocsConfig, **kwargs: Any) -> MkDocsConfig:
        available_langs = get_mkdocs_material_langs()
        dir_path = Path(config.docs_dir)
        lang = dir_path.parent.name
        if lang in available_langs:
            config.theme["language"] = lang
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  7. tests/test_ws_router.py

    class CustomError(Exception):
        pass
    
    
    @router.websocket("/custom_error/")
    async def router_ws_custom_error(websocket: WebSocket):
        raise CustomError()
    
    
    def make_app(app=None, **kwargs):
        app = app or FastAPI(**kwargs)
        app.include_router(router)
        app.include_router(prefix_router, prefix="/prefix")
        app.include_router(native_prefix_route)
        return app
    
    
    app = make_app(app)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  8. fastapi/param_functions.py

            Any,
            Doc(
                """
                Include extra fields used by the JSON Schema.
                """
            ),
            deprecated(
                """
                The `extra` kwargs is deprecated. Use `json_schema_extra` instead.
                """
            ),
        ],
    ) -> Any:
        """
        Declare a path parameter for a *path operation*.
    
        Read more about it in the
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  9. fastapi/_compat.py

        def _model_rebuild(model: Type[BaseModel]) -> None:
            model.model_rebuild()
    
        def _model_dump(
            model: BaseModel, mode: Literal["json", "python"] = "json", **kwargs: Any
        ) -> Any:
            return model.model_dump(mode=mode, **kwargs)
    
        def _get_model_config(model: BaseModel) -> Any:
            return model.model_config
    
        def get_schema_from_model_field(
            *,
            field: ModelField,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  10. fastapi/dependencies/utils.py

            use_annotation = annotation
            type_annotation = annotation
        if get_origin(use_annotation) is Annotated:
            annotated_args = get_args(annotation)
            type_annotation = annotated_args[0]
            fastapi_annotations = [
                arg
                for arg in annotated_args[1:]
                if isinstance(arg, (FieldInfo, params.Depends))
            ]
            fastapi_specific_annotations = [
                arg
    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)
Back to top