Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Nations (0.22 sec)

  1. tests/test_operations_signatures.py

    import inspect
    
    from fastapi import APIRouter, FastAPI
    
    method_names = ["get", "put", "post", "delete", "options", "head", "patch", "trace"]
    
    
    def test_signatures_consistency():
        base_sig = inspect.signature(APIRouter.get)
        for method_name in method_names:
            router_method = getattr(APIRouter, method_name)
            app_method = getattr(FastAPI, method_name)
            router_sig = inspect.signature(router_method)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon May 27 12:08:13 GMT 2019
    - 934 bytes
    - Viewed (0)
  2. .github/actions/people/app/main.py

        github_sponsors_path.write_text(new_github_sponsors_content, encoding="utf-8")
        logging.info("Setting up GitHub Actions git user")
        subprocess.run(["git", "config", "user.name", "github-actions"], check=True)
        subprocess.run(
            ["git", "config", "user.email", "github-actions@github.com"], check=True
        )
        branch_name = "fastapi-people"
        logging.info(f"Creating a new branch {branch_name}")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  3. tests/test_multipart_installation.py

        with pytest.raises(RuntimeError, match=multipart_incorrect_install_error):
            app = FastAPI()
    
            @app.post("/")
            async def root(f: bytes = File()):
                return f  # pragma: nocover
    
    
    def test_incorrect_multipart_installed_multi_form(monkeypatch):
        monkeypatch.delattr("multipart.multipart.parse_options_header", raising=False)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  4. fastapi/dependencies/utils.py

                from multipart import __version__  # type: ignore
    
                assert __version__
                try:
                    # parse_options_header is only available in the right multipart
                    from multipart.multipart import parse_options_header  # type: ignore
    
                    assert parse_options_header
                except ImportError:
                    logger.error(multipart_incorrect_install_error)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  5. scripts/docs.py

            # Don't remove en dist_path as it might already contain other languages.
            # When running build_all(), that function already removes site_path.
            # All this is only relevant locally, on GitHub Actions all this is done through
            # artifacts and multiple workflows, so it doesn't matter if directories are
            # removed or not.
        else:
            dist_path = site_path / lang
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  6. tests/test_extra_routes.py

                                    }
                                },
                            },
                        },
                        "summary": "Options Item",
                        "operationId": "options_item_items__item_id__options",
                        "parameters": [
                            {
                                "required": True,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 13.7K bytes
    - Viewed (0)
  7. fastapi/openapi/models.py

        description: Optional[str] = None
        get: Optional[Operation] = None
        put: Optional[Operation] = None
        post: Optional[Operation] = None
        delete: Optional[Operation] = None
        options: Optional[Operation] = None
        head: Optional[Operation] = None
        patch: Optional[Operation] = None
        trace: Optional[Operation] = None
        servers: Optional[List[Server]] = None
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (0)
  8. fastapi/applications.py

            Add a *path operation* using an HTTP OPTIONS operation.
    
            ## Example
    
            ```python
            from fastapi import FastAPI
    
            app = FastAPI()
    
            @app.options("/items/")
            def get_item_options():
                return {"additions": ["Aji", "Guacamole"]}
            ```
            """
            return self.router.options(
                path,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_cors/test_tutorial001.py

        headers = {
            "Origin": "https://localhost.tiangolo.com",
            "Access-Control-Request-Method": "GET",
            "Access-Control-Request-Headers": "X-Example",
        }
        response = client.options("/", headers=headers)
        assert response.status_code == 200, response.text
        assert response.text == "OK"
        assert (
            response.headers["access-control-allow-origin"]
            == "https://localhost.tiangolo.com"
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 1.2K bytes
    - Viewed (0)
  10. fastapi/routing.py

            """
            Add a *path operation* using an HTTP OPTIONS operation.
    
            ## Example
    
            ```python
            from fastapi import APIRouter, FastAPI
    
            app = FastAPI()
            router = APIRouter()
    
            @router.options("/items/")
            def get_item_options():
                return {"additions": ["Aji", "Guacamole"]}
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
Back to top