Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 213 for halse (0.17 sec)

  1. 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 28 07:19:10 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  2. docs_src/sql_databases/sql_app/database.py

    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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Apr 05 11:53:09 GMT 2020
    - 461 bytes
    - Viewed (0)
  3. docs_src/sql_databases/sql_app/tests/test_sql_app.py

    from ..main import app, get_db
    
    SQLALCHEMY_DATABASE_URL = "sqlite://"
    
    engine = create_engine(
        SQLALCHEMY_DATABASE_URL,
        connect_args={"check_same_thread": False},
        poolclass=StaticPool,
    )
    TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
    
    
    Base.metadata.create_all(bind=engine)
    
    
    def override_get_db():
        try:
            db = TestingSessionLocal()
            yield db
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jun 22 11:20:12 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  4. docs_src/security/tutorial004_py310.py

            return UserInDB(**user_dict)
    
    
    def authenticate_user(fake_db, username: str, password: str):
        user = get_user(fake_db, username)
        if not user:
            return False
        if not verify_password(password, user.hashed_password):
            return False
        return user
    
    
    def create_access_token(data: dict, expires_delta: timedelta | None = None):
        to_encode = data.copy()
        if expires_delta:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_dependencies/test_tutorial004_py310.py

                        "summary": "Read Items",
                        "operationId": "read_items_items__get",
                        "parameters": [
                            {
                                "required": False,
                                "schema": IsDict(
                                    {
                                        "anyOf": [{"type": "string"}, {"type": "null"}],
                                        "title": "Q",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  6. tests/test_openapi_separate_input_output_schemas.py

                Item(name="Plumbus"),
            ]
    
        client = TestClient(app)
        return client
    
    
    def test_create_item():
        client = get_app_client()
        client_no = get_app_client(separate_input_output_schemas=False)
        response = client.post("/items/", json={"name": "Plumbus"})
        response2 = client_no.post("/items/", json={"name": "Plumbus"})
        assert response.status_code == response2.status_code == 200, response.text
        assert (
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 18.4K bytes
    - Viewed (2)
  7. fastapi/security/api_key.py

                    """
                    By default, if the query parameter is not provided, `APIKeyQuery` will
                    automatically cancel the request and send the client an error.
    
                    If `auto_error` is set to `False`, when the query parameter is not
                    available, instead of erroring out, the dependency result will be
                    `None`.
    
                    This is useful when you want to have optional authentication.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 23 22:29:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py

                        "summary": "Read Users",
                        "operationId": "read_users_users__get",
                        "parameters": [
                            {
                                "required": False,
                                "schema": {
                                    "title": "Skip",
                                    "type": "integer",
                                    "default": 0,
                                },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py

                        "summary": "Read Users",
                        "operationId": "read_users_users__get",
                        "parameters": [
                            {
                                "required": False,
                                "schema": {
                                    "title": "Skip",
                                    "type": "integer",
                                    "default": 0,
                                },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py

                        "summary": "Read Users",
                        "operationId": "read_users_users__get",
                        "parameters": [
                            {
                                "required": False,
                                "schema": {
                                    "title": "Skip",
                                    "type": "integer",
                                    "default": 0,
                                },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
Back to top