Search Options

Results per page
Sort
Preferred Languages
Advance

Results 201 - 210 of 1,140 for rsync (0.04 sec)

  1. docs_src/security/tutorial004_an.py

        if user is None:
            raise credentials_exception
        return user
    
    
    async def get_current_active_user(
        current_user: Annotated[User, Depends(get_current_user)],
    ):
        if current_user.disabled:
            raise HTTPException(status_code=400, detail="Inactive user")
        return current_user
    
    
    @app.post("/token")
    async def login_for_access_token(
        form_data: Annotated[OAuth2PasswordRequestForm, Depends()],
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon May 20 17:37:28 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. docs_src/body_updates/tutorial001_py310.py

        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_item(item_id: str):
        return items[item_id]
    
    
    @app.put("/items/{item_id}", response_model=Item)
    async def update_item(item_id: str, item: Item):
        update_item_encoded = jsonable_encoder(item)
        items[item_id] = update_item_encoded
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 856 bytes
    - Viewed (0)
  3. docs_src/request_files/tutorial001_03_an.py

    from fastapi import FastAPI, File, UploadFile
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: Annotated[bytes, File(description="A file read as bytes")]):
        return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(
        file: Annotated[UploadFile, File(description="A file read as UploadFile")],
    ):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 431 bytes
    - Viewed (0)
  4. docs/em/docs/advanced/dataclasses.md

        ๐Ÿ”„, ๐Ÿ‘† ๐Ÿ’ช ๐ŸŒ€ `dataclasses` โฎ๏ธ ๐Ÿฉ ๐Ÿ†Ž โœ.
    
    8๏ธโƒฃ. ๐Ÿ‘€ ๐Ÿ‘ˆ ๐Ÿ‘‰ *โžก ๐Ÿ› ๏ธ ๐Ÿ”ข* โš™๏ธ ๐Ÿฅ” `def` โ†ฉ๏ธ `async def`.
    
        ๐Ÿ•ง, FastAPI ๐Ÿ‘† ๐Ÿ’ช ๐ŸŒ€ `def` & `async def` ๐Ÿ’ช.
    
        ๐Ÿšฅ ๐Ÿ‘† ๐Ÿ’ช โ†—๏ธ ๐Ÿ”ƒ ๐Ÿ•โ” โš™๏ธ โ”, โœ… ๐Ÿ‘… ๐Ÿ“„ _"๐Ÿƒ โ“" _ ๐Ÿฉบ ๐Ÿ”ƒ <a href="https://fastapi.tiangolo.com/async/#in-a-hurry" target="_blank" class="internal-link">`async` &amp; `await`</a>.
    
    9๏ธโƒฃ. ๐Ÿ‘‰ *โžก ๐Ÿ› ๏ธ ๐Ÿ”ข* ๐Ÿšซ ๐Ÿ›ฌ ๐ŸŽป (๐Ÿ‘ โšซ๏ธ ๐Ÿ’ช), โœ‹๏ธ ๐Ÿ“‡ ๐Ÿ“– โฎ๏ธ ๐Ÿ”— ๐Ÿ’ฝ.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. fastapi/security/api_key.py

        ```python
        from fastapi import Depends, FastAPI
        from fastapi.security import APIKeyQuery
    
        app = FastAPI()
    
        query_scheme = APIKeyQuery(name="api_key")
    
    
        @app.get("/items/")
        async def read_items(api_key: str = Depends(query_scheme)):
            return {"api_key": api_key}
        ```
        """
    
        def __init__(
            self,
            *,
            name: Annotated[
                str,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Apr 23 22:29:18 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  6. regression-test/src/androidTest/java/okhttp/regression/compare/ApacheHttpClientHttp2Test.kt

     * <http://www.apache.org/>.
     *
     */
    package okhttp.regression.compare
    
    import org.apache.hc.client5.http.async.methods.SimpleHttpRequests
    import org.apache.hc.client5.http.async.methods.SimpleHttpResponse
    import org.apache.hc.client5.http.impl.async.HttpAsyncClients
    import org.apache.hc.core5.concurrent.FutureCallback
    import org.apache.hc.core5.http.ProtocolVersion
    import org.junit.Assert
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  7. docs_src/websockets/tutorial002_an.py

                    input.value = ''
                    event.preventDefault()
                }
            </script>
        </body>
    </html>
    """
    
    
    @app.get("/")
    async def get():
        return HTMLResponse(html)
    
    
    async def get_cookie_or_token(
        websocket: WebSocket,
        session: Annotated[Union[str, None], Cookie()] = None,
        token: Annotated[Union[str, None], Query()] = None,
    ):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  8. docs_src/websockets/tutorial002_an_py39.py

                    input.value = ''
                    event.preventDefault()
                }
            </script>
        </body>
    </html>
    """
    
    
    @app.get("/")
    async def get():
        return HTMLResponse(html)
    
    
    async def get_cookie_or_token(
        websocket: WebSocket,
        session: Annotated[Union[str, None], Cookie()] = None,
        token: Annotated[Union[str, None], Query()] = None,
    ):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  9. tests/test_generic_parameterless_depends.py

    app = FastAPI()
    
    T = TypeVar("T")
    
    Dep = Annotated[T, Depends()]
    
    
    class A:
        pass
    
    
    class B:
        pass
    
    
    @app.get("/a")
    async def a(dep: Dep[A]):
        return {"cls": dep.__class__.__name__}
    
    
    @app.get("/b")
    async def b(dep: Dep[B]):
        return {"cls": dep.__class__.__name__}
    
    
    client = TestClient(app)
    
    
    def test_generic_parameterless_depends():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Apr 02 02:52:56 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/dependencies/index.md

    ## `async` oder nicht `async`
    
    Da Abhรคngigkeiten auch von **FastAPI** aufgerufen werden (so wie Ihre *Pfadoperation-Funktionen*), gelten beim Definieren Ihrer Funktionen die gleichen Regeln.
    
    Sie kรถnnen `async def` oder einfach `def` verwenden.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13K bytes
    - Viewed (0)
Back to top