Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for columns (0.18 sec)

  1. docs/pt/docs/tutorial/extra-data-types.md

    # Tipos de dados extras
    
    Até agora, você tem usado tipos de dados comuns, tais como:
    
    * `int`
    * `float`
    * `str`
    * `bool`
    
    Mas você também pode usar tipos de dados mais complexos.
    
    E você ainda terá os mesmos recursos que viu até agora:
    
    * Ótimo suporte do editor.
    * Conversão de dados das requisições recebidas.
    * Conversão de dados para os dados da resposta.
    * Validação de dados.
    * Anotação e documentação automáticas.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 3K bytes
    - Viewed (0)
  2. docs_src/sql_databases/sql_app/models.py

    from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
    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")
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 14:35:33 GMT 2024
    - 710 bytes
    - Viewed (0)
  3. docs_src/sql_databases/sql_app_py310/models.py

    from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
    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")
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 14:35:33 GMT 2024
    - 710 bytes
    - Viewed (0)
  4. docs_src/async_sql_databases/tutorial001.py

    database = databases.Database(DATABASE_URL)
    
    metadata = sqlalchemy.MetaData()
    
    notes = sqlalchemy.Table(
        "notes",
        metadata,
        sqlalchemy.Column("id", sqlalchemy.Integer, primary_key=True),
        sqlalchemy.Column("text", sqlalchemy.String),
        sqlalchemy.Column("completed", sqlalchemy.Boolean),
    )
    
    
    engine = sqlalchemy.create_engine(
        DATABASE_URL, connect_args={"check_same_thread": False}
    )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 1.4K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/sql-databases.md

    The `__tablename__` attribute tells SQLAlchemy the name of the table to use in the database for each of these models.
    
    ### Create model attributes/columns
    
    Now create all the model (class) attributes.
    
    Each of these attributes represents a column in its corresponding database table.
    
    We use `Column` from SQLAlchemy as the default value.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 29.6K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body/test_tutorial001_py310.py

            {
                "detail": [
                    {
                        "loc": ["body", 1],
                        "msg": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)",
                        "type": "value_error.jsondecode",
                        "ctx": {
                            "msg": "Expecting property name enclosed in double quotes",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (1)
  7. tests/test_tutorial/test_body/test_tutorial001.py

            {
                "detail": [
                    {
                        "loc": ["body", 1],
                        "msg": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)",
                        "type": "value_error.jsondecode",
                        "ctx": {
                            "msg": "Expecting property name enclosed in double quotes",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 14.7K bytes
    - Viewed (5)
  8. docs/em/docs/tutorial/sql-databases.md

        {!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!}
        ```
    
    #### 🇸🇲 👗 & Pydantic 👗
    
    👀 👈 🇸🇲 *🏷* 🔬 🔢 ⚙️ `=`, & 🚶‍♀️ 🆎 🔢 `Column`, 💖:
    
    ```Python
    name = Column(String)
    ```
    
    ⏪ Pydantic *🏷* 📣 🆎 ⚙️ `:`, 🆕 🆎 ✍ ❕/🆎 🔑:
    
    ```Python
    name: str
    ```
    
    ✔️ ⚫️ 🤯, 👆 🚫 🤚 😕 🕐❔ ⚙️ `=` & `:` ⏮️ 👫.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 25.2K bytes
    - Viewed (1)
  9. docs/zh/docs/tutorial/sql-databases.md

        {!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
        ```
    
    #### SQLAlchemy 风格和 Pydantic 风格
    
    请注意,SQLAlchemy*模型*使用 `=`来定义属性,并将类型作为参数传递给`Column`,例如:
    
    ```Python
    name = Column(String)
    ```
    
    虽然 Pydantic*模型*使用`:` 声明类型,但新的类型注释语法/类型提示是:
    
    ```Python
    name: str
    ```
    
    请牢记这一点,这样您在使用`:`还是`=`时就不会感到困惑。
    
    ### 创建用于读取/返回的Pydantic*模型/模式*
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 27K bytes
    - Viewed (0)
  10. docs/en/docs/python-types.md

    {!../../../docs_src/python_types/tutorial002.py!}
    ```
    
    That is not the same as declaring default values like would be with:
    
    ```Python
        first_name="john", last_name="doe"
    ```
    
    It's a different thing.
    
    We are using colons (`:`), not equals (`=`).
    
    And adding type hints normally doesn't change what happens from what would happen without them.
    
    But now, imagine you are again in the middle of creating that function, but with type hints.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17K bytes
    - Viewed (0)
Back to top