Search Options

Results per page
Sort
Preferred Languages
Advance

Results 201 - 210 of 479 for unifon (0.06 sec)

  1. docs_src/query_params_str_validations/tutorial004_an.py

    from typing import Union
    
    from fastapi import FastAPI, Query
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: Annotated[
            Union[str, None], Query(min_length=3, max_length=50, pattern="^fixedquery$")
        ] = None,
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 410 bytes
    - Viewed (0)
  2. docs_src/response_model/tutorial003_05.py

    from typing import Union
    
    from fastapi import FastAPI, Response
    from fastapi.responses import RedirectResponse
    
    app = FastAPI()
    
    
    @app.get("/portal", response_model=None)
    async def get_portal(teleport: bool = False) -> Union[Response, dict]:
        if teleport:
            return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Jan 10 16:22:47 UTC 2023
    - 405 bytes
    - Viewed (0)
  3. docs/em/docs/python-types.md

    ```
    
    ////
    
    #### ⚙ī¸ `Union` ⚖ī¸ `Optional`
    
    đŸšĨ 👆 ⚙ī¸ 🐍 âŦ 🔛 3ī¸âƒŖ.1ī¸âƒŖ0ī¸âƒŖ, đŸ“Ĩ 💁‍♂ âšĒī¸âžĄī¸ 👇 đŸ“ļ **🤔** ☝ 🎑:
    
    * đŸ‘ļ ❎ ⚙ī¸ `Optional[SomeType]`
    * ↩ī¸ đŸ‘ļ **⚙ī¸ `Union[SomeType, None]`** đŸ‘ļ.
    
    đŸ‘¯â€â™‚ī¸ 🌓 & 🔘 đŸ‘Ģ 🎏, ✋ī¸ 👤 🔜 👍 `Union` ↩ī¸ `Optional` ↩ī¸ 🔤 "**đŸ“Ļ**" 🔜 😑 🔑 👈 💲 đŸ“Ļ, & âšĢī¸ 🤙 ⛓ "âšĢī¸ đŸ’Ē `None`", đŸšĨ âšĢī¸ đŸšĢ đŸ“Ļ & ✔.
    
    👤 💭 `Union[SomeType, None]` 🌖 🔑 🔃 âšĢī¸â” âšĢī¸ ⛓.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/query-params-str-validations.md

    ```Python hl_lines="7"
    {!> ../../docs_src/query_params_str_validations/tutorial001_py310.py!}
    ```
    
    ////
    
    đŸ”ĸ đŸ”ĸ `q` 🆎 `Union[str, None]` (⚖ī¸ `str | None` 🐍 3ī¸âƒŖ.1ī¸âƒŖ0ī¸âƒŖ), 👈 ⛓ 👈 âšĢī¸ 🆎 `str` ✋ī¸ đŸ’Ē `None`, & 👐, đŸ”ĸ 💲 `None`, FastAPI 🔜 💭 âšĢī¸ đŸšĢ ✔.
    
    /// note
    
    FastAPI 🔜 💭 👈 💲 `q` đŸšĢ ✔ ↩ī¸ đŸ”ĸ 💲 `= None`.
    
     `Union` `Union[str, None]` 🔜 ✔ 👆 👨‍🎨 🤝 👆 👍 🐕‍đŸĻē & 🔍 ❌.
    
    ///
    
    ## 🌖 đŸ”Ŧ
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  5. docs_src/path_params_numeric_validations/tutorial001.py

    from typing import Union
    
    from fastapi import FastAPI, Path, Query
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        item_id: int = Path(title="The ID of the item to get"),
        q: Union[str, None] = Query(default=None, alias="item-query"),
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 364 bytes
    - Viewed (0)
  6. docs_src/app_testing/app_b_an/main.py

    from typing import Union
    
    from fastapi import FastAPI, Header, HTTPException
    from pydantic import BaseModel
    from typing_extensions import Annotated
    
    fake_secret_token = "coneofsilence"
    
    fake_db = {
        "foo": {"id": "foo", "title": "Foo", "description": "There goes my hero"},
        "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"},
    }
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        id: str
        title: str
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Aug 15 22:31:16 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb1/dcerpc/msrpc/srvsvc.idl

    	typedef struct {
    		int count;
    		[size_is(count)] ShareInfo502 *array;
    	} ShareInfoCtr502;
    
    	typedef [switch_type(int)] union {
    		[case(0)] ShareInfo0 *info0;
    		[case(1)] ShareInfo1 *info1;
    		[case(502)] ShareInfo502 *info1;
    	} ShareInfo;
    
    	typedef [switch_type(int)] union {
    		[case(0)] ShareInfoCtr0 *info0;
    		[case(1)] ShareInfoCtr1 *info1;
    		[case(502)] ShareInfoCtr502 *info1;
    	} ShareCtr;
    
    	[op(0x0f)]
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 20:39:42 UTC 2019
    - 2.2K bytes
    - Viewed (0)
  8. docs_src/query_params/tutorial003.py

    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: str, q: Union[str, None] = None, short: bool = False):
        item = {"item_id": item_id}
        if q:
            item.update({"q": q})
        if not short:
            item.update(
                {"description": "This is an amazing item that has a long description"}
            )
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 406 bytes
    - Viewed (0)
  9. docs_src/sql_databases/tutorial001_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Depends, FastAPI, HTTPException, Query
    from sqlmodel import Field, Session, SQLModel, create_engine, select
    
    
    class Hero(SQLModel, table=True):
        id: Union[int, None] = Field(default=None, primary_key=True)
        name: str = Field(index=True)
        age: Union[int, None] = Field(default=None, index=True)
        secret_name: str
    
    
    sqlite_file_name = "database.db"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  10. docs_src/dependencies/tutorial001_02_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Depends, FastAPI
    
    app = FastAPI()
    
    
    async def common_parameters(
        q: Union[str, None] = None, skip: int = 0, limit: int = 100
    ):
        return {"q": q, "skip": skip, "limit": limit}
    
    
    CommonsDep = Annotated[dict, Depends(common_parameters)]
    
    
    @app.get("/items/")
    async def read_items(commons: CommonsDep):
        return commons
    
    
    @app.get("/users/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 466 bytes
    - Viewed (0)
Back to top