Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 43 for Case (0.13 sec)

  1. docs/en/overrides/main.html

    {% extends "base.html" %}
    
    {% block announce %}
    <div class="announce-wrapper">
      <div id="announce-left">
        <div class="item">
          <a class="announce-link" href="https://twitter.com/fastapi" target="_blank">
            <span class="twemoji twitter">
              {% include ".icons/fontawesome/brands/twitter.svg" %}
            </span> Follow <strong>@fastapi</strong> on <strong>Twitter</strong> to stay updated
          </a>
        </div>
        <div class="item">
    HTML
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Mar 25 23:10:11 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  2. docs/pt/docs/tutorial/extra-models.md

    E esses modelos estão compartilhando muitos dos dados e duplicando nomes e tipos de atributos.
    
    Nós poderíamos fazer melhor.
    
    Podemos declarar um modelo `UserBase` que serve como base para nossos outros modelos. E então podemos fazer subclasses desse modelo que herdam seus atributos (declarações de tipo, validação, etc.).
    
    Toda conversão de dados, validação, documentação, etc. ainda funcionará normalmente.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/security/first-steps.md

    **FastAPI** 使用依赖项在 OpenAPI 概图(及 API 文档)中定义**安全方案**。
    
    !!! info "技术细节"
    
        **FastAPI** 使用(在依赖项中声明的)类 `OAuth2PasswordBearer` 在 OpenAPI 中定义安全方案,这是因为它继承自 `fastapi.security.oauth2.OAuth2`,而该类又是继承自`fastapi.security.base.SecurityBase`。
    
        所有与 OpenAPI(及 API 文档)集成的安全工具都继承自 `SecurityBase`, 这就是为什么 **FastAPI** 能把它们集成至 OpenAPI 的原因。
    
    ## 实现的操作
    
    FastAPI 校验请求中的 `Authorization` 请求头,核对请求头的值是不是由 `Bearer ` + 令牌组成, 并返回令牌字符串(`str`)。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  4. 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 May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 14:35:33 GMT 2024
    - 710 bytes
    - Viewed (0)
  5. docs/zh/docs/deployment/deta.md

    在这里查看最近发送给应用的请求。
    
    您可以编辑或重新使用这些请求。
    
    <img src="/img/deployment/deta/image02.png">
    
    ## 更多内容
    
    如果要持久化保存应用数据,可以使用提供了**免费方案**的 <a href="https://docs.deta.sh/docs/base/py_tutorial?ref=fastapi" class="external-link" target="_blank">Deta Base</a>。
    
    Plain Text
    - Registered: Sun Mar 31 07:19:09 GMT 2024
    - Last Modified: Sun Jan 28 18:06:55 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  6. docs/zh/docs/advanced/testing-database.md

    ```
    
    !!! tip "提示"
    
        为减少代码重复,最好把这段代码写成函数,在 `database.py` 与 `tests/test_sql_app.py`中使用。
    
        为了把注意力集中在测试代码上,本例只是复制了这段代码。
    
    ## 创建数据库
    
    因为现在是想在新文件中使用新数据库,所以要使用以下代码创建数据库:
    
    ```Python
    Base.metadata.create_all(bind=engine)
    ```
    
    一般是在 `main.py` 中调用这行代码,但在 `main.py` 里,这行代码用于创建 `sql_app.db`,但是现在要为测试创建 `test.db`。
    
    因此,要在测试代码中添加这行代码创建新的数据库文件。
    
    ```Python hl_lines="16"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Jan 28 18:09:26 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  7. fastapi/security/api_key.py

    from typing import Optional
    
    from fastapi.openapi.models import APIKey, APIKeyIn
    from fastapi.security.base import SecurityBase
    from starlette.exceptions import HTTPException
    from starlette.requests import Request
    from starlette.status import HTTP_403_FORBIDDEN
    from typing_extensions import Annotated, Doc
    
    
    class APIKeyBase(SecurityBase):
        pass
    
    
    class APIKeyQuery(APIKeyBase):
        """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 23 22:29:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  8. docs_src/sql_databases/sql_app_py310/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 May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 14:35:33 GMT 2024
    - 710 bytes
    - Viewed (0)
  9. docs/es/docs/advanced/response-change-status-code.md

    ```Python hl_lines="1  9  12"
    {!../../../docs_src/response_change_status_code/tutorial001.py!}
    ```
    
    Y luego puedes retornar cualquier objeto que necesites, como normalmente lo harías (un `dict`, un modelo de base de datos, etc).
    
    Y si declaraste un `response_model`, aún se usará para filtrar y convertir el objeto que retornaste.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Feb 06 19:56:23 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  10. fastapi/security/open_id_connect_url.py

    from typing import Optional
    
    from fastapi.openapi.models import OpenIdConnect as OpenIdConnectModel
    from fastapi.security.base import SecurityBase
    from starlette.exceptions import HTTPException
    from starlette.requests import Request
    from starlette.status import HTTP_403_FORBIDDEN
    from typing_extensions import Annotated, Doc
    
    
    class OpenIdConnect(SecurityBase):
        """
        OpenID Connect authentication class. An instance of it would be used as a
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 2.7K bytes
    - Viewed (0)
Back to top