Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for Case (0.16 sec)

  1. tests/test_schema_extra_examples.py

                    ],
                ),
            ):
                return item
    
        # TODO: enable these tests once/if Form(embed=False) is supported
        # TODO: In that case, define if File() should support example/examples too
        # @app.post("/form_example")
        # def form_example(firstname: str = Form(example="John")):
        #     return firstname
    
        # @app.post("/form_examples")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 37.7K bytes
    - Viewed (0)
  2. tests/test_security_http_base.py

    
    client = TestClient(app)
    
    
    def test_security_http_base():
        response = client.get("/users/me", headers={"Authorization": "Other foobar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"scheme": "Other", "credentials": "foobar"}
    
    
    def test_security_http_base_no_credentials():
        response = client.get("/users/me")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  3. tests/test_security_http_base_optional.py

    
    client = TestClient(app)
    
    
    def test_security_http_base():
        response = client.get("/users/me", headers={"Authorization": "Other foobar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"scheme": "Other", "credentials": "foobar"}
    
    
    def test_security_http_base_no_credentials():
        response = client.get("/users/me")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  4. ci/official/utilities/extract_resultstore_links.py

        command_type = invocation_results.get('command_type')
    
        case_attrib = attrib.copy()
        if command_type:
          command_type = command_type.title()
          case_name = f'{command_type} invocation {invocation_id}'
        else:
          case_name = f' Invocation {invocation_id}'
        case_attrib.update({'name': case_name,
                            'status': 'run', 'result': 'completed'})
    
    Python
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Nov 08 17:50:27 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  5. fastapi/dependencies/models.py

    from typing import Any, Callable, List, Optional, Sequence
    
    from fastapi._compat import ModelField
    from fastapi.security.base import SecurityBase
    
    
    class SecurityRequirement:
        def __init__(
            self, security_scheme: SecurityBase, scopes: Optional[Sequence[str]] = None
        ):
            self.security_scheme = security_scheme
            self.scopes = scopes
    
    
    class Dependant:
        def __init__(
            self,
            *,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  6. fastapi/dependencies/utils.py

    from fastapi.concurrency import (
        asynccontextmanager,
        contextmanager_in_threadpool,
    )
    from fastapi.dependencies.models import Dependant, SecurityRequirement
    from fastapi.logger import logger
    from fastapi.security.base import SecurityBase
    from fastapi.security.oauth2 import OAuth2, SecurityScopes
    from fastapi.security.open_id_connect_url import OpenIdConnect
    from fastapi.utils import create_response_field, get_path_param_names
    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)
  7. .github/actions/people/app/main.py

        logging.info("Pushing branch")
        subprocess.run(["git", "push", "origin", branch_name], check=True)
        logging.info("Creating PR")
        pr = repo.create_pull(title=message, body=message, base="master", head=branch_name)
        logging.info(f"Created PR: {pr.number}")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  8. fastapi/param_functions.py

                Swagger UI (that provides the `/docs` interface) has better support for the
                OpenAPI-specific examples than the JSON Schema `examples`, that's the main
                use case for this.
    
                Read more about it in the
                [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter).
                """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  9. docs_src/sql_databases/sql_app_py39/models.py

    from sqlalchemy.orm import relationship
    
    from .database import Base
    
    
    class User(Base):
        __tablename__ = "users"
    
        id = Column(Integer, primary_key=True)
        email = Column(String, unique=True, index=True)
        hashed_password = Column(String)
        is_active = Column(Boolean, default=True)
    
        items = relationship("Item", back_populates="owner")
    
    
    class Item(Base):
        __tablename__ = "items"
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 09 14:35:33 GMT 2024
    - 710 bytes
    - Viewed (0)
  10. 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():
    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)
Back to top