Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for isSame (0.2 sec)

  1. docs_src/sql_databases/sql_app_py39/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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  2. tests/test_dependency_contextvars.py

    
    def test_dependency_contextvars():
        """
        Check that custom middlewares don't affect the contextvar context for dependencies.
    
        The code before yield and the code after yield should be run in the same contextvar
        context, so that request_state_context_var.reset(contextvar_token).
    
        If they are run in a different context, that raises an error.
        """
        response = client.get("/user")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Feb 17 12:40:12 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  3. 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)
  4. docs_src/sql_databases/sql_app/tests/test_sql_app.py

    from sqlalchemy.pool import StaticPool
    
    from ..database import Base
    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:
    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)
  5. fastapi/dependencies/utils.py

            default_value = value if value is not inspect.Signature.empty else Required
            if is_path_param:
                # We might check here that `default_value is Required`, but the fact is that the same
                # parameter might sometimes be a path parameter and sometimes not. See
                # `tests/test_infer_param_optionality.py` for an example.
                field_info = params.Path(annotation=use_annotation)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  6. fastapi/openapi/utils.py

                        (param["in"], param["name"]): param
                        for param in parameters
                        if param.get("required")
                    }
                    # Make sure required definitions of the same parameter take precedence
                    # over non-required definitions
                    all_parameters.update(required_parameters)
                    operation["parameters"] = list(all_parameters.values())
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  7. docs_src/sql_databases/sql_app_py310/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: Fri Jan 07 14:11:31 GMT 2022
    - 461 bytes
    - Viewed (0)
  8. ci/official/containers/linux_arm64/devel.usertools/squash_testlogs.py

        for p in testsuite._elem.xpath(".//system-out"):
          for c in p.getparent().xpath(".//error | .//failure"):
            c.text = p.text
          p.getparent().remove(p)
        # Remove duplicate results of the same exact test (e.g. due to retry
        # attempts)
        for p in testsuite._elem.xpath(".//error | .//failure"):
          # Sharded tests have target names like this:
          # WindowOpsTest.test_tflite_convert0 (<function hann_window at
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Sep 18 19:00:37 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  9. docs_src/sql_databases_peewee/sql_app/database.py

        def __setattr__(self, name, value):
            self._state.get()[name] = value
    
        def __getattr__(self, name):
            return self._state.get()[name]
    
    
    db = peewee.SqliteDatabase(DATABASE_NAME, check_same_thread=False)
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 662 bytes
    - Viewed (0)
  10. fastapi/security/oauth2.py

        """
        This is a special class that you can define in a parameter in a dependency to
        obtain the OAuth2 scopes required by all the dependencies in the same chain.
    
        This way, multiple dependencies can have different scopes, even when used in the
        same *path operation*. And with this, you can access all the scopes required in
        all those dependencies in a single place.
    
        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
    - 21.1K bytes
    - Viewed (1)
Back to top