Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for function (0.25 sec)

  1. docs_src/websockets/tutorial002_py310.py

            </ul>
            <script>
            var ws = null;
                function connect(event) {
                    var itemId = document.getElementById("itemId")
                    var token = document.getElementById("token")
                    ws = new WebSocket("ws://localhost:8000/items/" + itemId.value + "/ws?token=" + token.value);
                    ws.onmessage = function(event) {
                        var messages = document.getElementById('messages')
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.7K bytes
    - Viewed (0)
  2. docs_src/websockets/tutorial003_py39.py

                ws.onmessage = function(event) {
                    var messages = document.getElementById('messages')
                    var message = document.createElement('li')
                    var content = document.createTextNode(event.data)
                    message.appendChild(content)
                    messages.appendChild(message)
                };
                function sendMessage(event) {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  3. fastapi/background.py

                Doc(
                    """
                    The function to call after the response is sent.
    
                    It can be a regular `def` function or an `async def` function.
                    """
                ),
            ],
            *args: P.args,
            **kwargs: P.kwargs,
        ) -> None:
            """
            Add a function to be called in the background after the response is sent.
    
    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/datastructures.py

    from typing_extensions import Annotated, Doc
    
    
    class UploadFile(StarletteUploadFile):
        """
        A file uploaded in a request.
    
        Define it as a *path operation function* (or dependency) parameter.
    
        If you are using a regular `def` function, you can use the `upload_file.file`
        attribute to access the raw standard Python file (blocking, not async), useful and
        needed for non-async code.
    
        Read more about it in the
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. docs_src/websockets/tutorial002.py

            </ul>
            <script>
            var ws = null;
                function connect(event) {
                    var itemId = document.getElementById("itemId")
                    var token = document.getElementById("token")
                    ws = new WebSocket("ws://localhost:8000/items/" + itemId.value + "/ws?token=" + token.value);
                    ws.onmessage = function(event) {
                        var messages = document.getElementById('messages')
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Nov 13 16:10:54 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  6. docs_src/websockets/tutorial002_an.py

            </ul>
            <script>
            var ws = null;
                function connect(event) {
                    var itemId = document.getElementById("itemId")
                    var token = document.getElementById("token")
                    ws = new WebSocket("ws://localhost:8000/items/" + itemId.value + "/ws?token=" + token.value);
                    ws.onmessage = function(event) {
                        var messages = document.getElementById('messages')
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  7. docs_src/websockets/tutorial002_an_py39.py

            </ul>
            <script>
            var ws = null;
                function connect(event) {
                    var itemId = document.getElementById("itemId")
                    var token = document.getElementById("token")
                    ws = new WebSocket("ws://localhost:8000/items/" + itemId.value + "/ws?token=" + token.value);
                    ws.onmessage = function(event) {
                        var messages = document.getElementById('messages')
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  8. docs_src/websockets/tutorial001.py

                ws.onmessage = function(event) {
                    var messages = document.getElementById('messages')
                    var message = document.createElement('li')
                    var content = document.createTextNode(event.data)
                    message.appendChild(content)
                    messages.appendChild(message)
                };
                function sendMessage(event) {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 1.4K bytes
    - Viewed (0)
  9. docs_src/generate_clients/tutorial003.py

    from fastapi.routing import APIRoute
    from pydantic import BaseModel
    
    
    def custom_generate_unique_id(route: APIRoute):
        return f"{route.tags[0]}-{route.name}"
    
    
    app = FastAPI(generate_unique_id_function=custom_generate_unique_id)
    
    
    class Item(BaseModel):
        name: str
        price: float
    
    
    class ResponseMessage(BaseModel):
        message: str
    
    
    class User(BaseModel):
        username: str
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 04 22:02:18 GMT 2022
    - 939 bytes
    - Viewed (0)
  10. docs_src/path_operation_advanced_configuration/tutorial002.py

    @app.get("/items/")
    async def read_items():
        return [{"item_id": "Foo"}]
    
    
    def use_route_names_as_operation_ids(app: FastAPI) -> None:
        """
        Simplify operation IDs so that generated API clients have simpler function
        names.
    
        Should be called only after all routes have been added.
        """
        for route in app.routes:
            if isinstance(route, APIRoute):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 572 bytes
    - Viewed (0)
Back to top