Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for args (0.28 sec)

  1. .pre-commit-config.yaml

        hooks:
        -   id: check-added-large-files
        -   id: check-toml
        -   id: check-yaml
            args:
            -   --unsafe
        -   id: end-of-file-fixer
        -   id: trailing-whitespace
    -   repo: https://github.com/charliermarsh/ruff-pre-commit
        rev: v0.2.0
        hooks:
        -   id: ruff
            args:
            - --fix
        -   id: ruff-format
    ci:
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 737 bytes
    - Viewed (0)
  2. 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 May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  3. docs_src/sql_databases/sql_app_py39/database.py

    from sqlalchemy.orm import sessionmaker
    
    SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db"
    # SQLALCHEMY_DATABASE_URL = "postgresql://user:password@postgresserver/db"
    
    engine = create_engine(
        SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
    )
    SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 461 bytes
    - Viewed (0)
  4. fastapi/_compat.py

            for arg in get_args(annotation):
                if lenient_issubclass(arg, UploadFile):
                    return True
        return False
    
    
    def is_bytes_sequence_annotation(annotation: Any) -> bool:
        origin = get_origin(annotation)
        if origin is Union or origin is UnionType:
            at_least_one = False
            for arg in get_args(annotation):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  5. docs_src/sql_databases/sql_app_py310/tests/test_sql_app.py

    from sqlalchemy.orm import sessionmaker
    
    from ..database import Base
    from ..main import app, get_db
    
    SQLALCHEMY_DATABASE_URL = "sqlite:///./test.db"
    
    engine = create_engine(
        SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
    )
    TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
    
    
    Base.metadata.create_all(bind=engine)
    
    
    def override_get_db():
        try:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_dependencies/test_tutorial008c.py

    
    def test_fastapi_error(client: TestClient):
        with pytest.raises(FastAPIError) as exc_info:
            client.get("/items/portal-gun")
        assert "No response object was returned" in exc_info.value.args[0]
    
    
    def test_internal_server_error():
        from docs_src.dependencies.tutorial008c import app
    
        client = TestClient(app, raise_server_exceptions=False)
        response = client.get("/items/portal-gun")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_dependencies/test_tutorial008c_an.py

    
    def test_fastapi_error(client: TestClient):
        with pytest.raises(FastAPIError) as exc_info:
            client.get("/items/portal-gun")
        assert "No response object was returned" in exc_info.value.args[0]
    
    
    def test_internal_server_error():
        from docs_src.dependencies.tutorial008c_an import app
    
        client = TestClient(app, raise_server_exceptions=False)
        response = client.get("/items/portal-gun")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dependencies/test_tutorial008c_an_py39.py

    
    @needs_py39
    def test_fastapi_error(client: TestClient):
        with pytest.raises(FastAPIError) as exc_info:
            client.get("/items/portal-gun")
        assert "No response object was returned" in exc_info.value.args[0]
    
    
    @needs_py39
    def test_internal_server_error():
        from docs_src.dependencies.tutorial008c_an_py39 import app
    
        client = TestClient(app, raise_server_exceptions=False)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_dependencies/test_tutorial008d_an_py39.py

        from docs_src.dependencies.tutorial008d_an_py39 import InternalError
    
        with pytest.raises(InternalError) as exc_info:
            client.get("/items/portal-gun")
        assert (
            exc_info.value.args[0] == "The portal gun is too dangerous to be owned by Rick"
        )
    
    
    @needs_py39
    def test_internal_server_error():
        from docs_src.dependencies.tutorial008d_an_py39 import app
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  10. docs_src/wsgi/tutorial001.py

    from fastapi.middleware.wsgi import WSGIMiddleware
    from flask import Flask, request
    from markupsafe import escape
    
    flask_app = Flask(__name__)
    
    
    @flask_app.route("/")
    def flask_main():
        name = request.args.get("name", "World")
        return f"Hello, {escape(name)} from Flask!"
    
    
    app = FastAPI()
    
    
    @app.get("/v2")
    def read_main():
        return {"message": "Hello World"}
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue May 09 14:32:00 GMT 2023
    - 443 bytes
    - Viewed (0)
Back to top