Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for useCase (0.06 sec)

  1. cmd/api-router.go

    					host = r.Host
    				}
    				// Make sure to skip matching minio.<domain>` this is
    				// specifically meant for operator/k8s deployment
    				// The reason we need to skip this is for a special
    				// usecase where we need to make sure that
    				// minio.<namespace>.svc.<cluster_domain> is ignored
    				// by the bucketDNS style to ensure that path style
    				// is available and honored at this domain.
    				//
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 13 15:25:16 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  2. docs_src/extra_models/tutorial002.py

    from fastapi import FastAPI
    from pydantic import BaseModel, EmailStr
    
    app = FastAPI()
    
    
    class UserBase(BaseModel):
        username: str
        email: EmailStr
        full_name: Union[str, None] = None
    
    
    class UserIn(UserBase):
        password: str
    
    
    class UserOut(UserBase):
        pass
    
    
    class UserInDB(UserBase):
        hashed_password: str
    
    
    def fake_password_hasher(raw_password: str):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 824 bytes
    - Viewed (0)
  3. tests/test_response_model_data_filter.py

    app = FastAPI()
    
    
    class UserBase(BaseModel):
        email: str
    
    
    class UserCreate(UserBase):
        password: str
    
    
    class UserDB(UserBase):
        hashed_password: str
    
    
    class PetDB(BaseModel):
        name: str
        owner: UserDB
    
    
    class PetOut(BaseModel):
        name: str
        owner: UserBase
    
    
    @app.post("/users/", response_model=UserBase)
    async def create_user(user: UserCreate):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  4. docs_src/extra_models/tutorial002_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel, EmailStr
    
    app = FastAPI()
    
    
    class UserBase(BaseModel):
        username: str
        email: EmailStr
        full_name: str | None = None
    
    
    class UserIn(UserBase):
        password: str
    
    
    class UserOut(UserBase):
        pass
    
    
    class UserInDB(UserBase):
        hashed_password: str
    
    
    def fake_password_hasher(raw_password: str):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 792 bytes
    - Viewed (0)
  5. docs_src/sql_databases_peewee/sql_app/schemas.py

    class Item(ItemBase):
        id: int
        owner_id: int
    
        class Config:
            orm_mode = True
            getter_dict = PeeweeGetterDict
    
    
    class UserBase(BaseModel):
        email: str
    
    
    class UserCreate(UserBase):
        password: str
    
    
    class User(UserBase):
        id: int
        is_active: bool
        items: List[Item] = []
    
        class Config:
            orm_mode = True
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 868 bytes
    - Viewed (0)
  6. guava/src/com/google/common/reflect/Types.java

      }
    
      private static void disallowPrimitiveType(Type[] types, String usedAs) {
        for (Type type : types) {
          if (type instanceof Class) {
            Class<?> cls = (Class<?>) type;
            checkArgument(!cls.isPrimitive(), "Primitive type '%s' used as %s", cls, usedAs);
          }
        }
      }
    
      /** Returns the {@code Class} object of arrays with {@code componentType}. */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 23K bytes
    - Viewed (0)
  7. docs/zh/docs/tutorial/extra-models.md

    辅助的附加函数只是为了演示可能的数据流,但它们显然不能提供任何真正的安全机制。
    
    ///
    
    ## 减少重复
    
    **FastAPI** 的核心思想就是减少代码重复。
    
    代码重复会导致 bug、安全问题、代码失步等问题(更新了某个位置的代码,但没有同步更新其它位置的代码)。
    
    上面的这些模型共享了大量数据,拥有重复的属性名和类型。
    
    FastAPI 可以做得更好。
    
    声明 `UserBase` 模型作为其它模型的基类。然后,用该类衍生出继承其属性(类型声明、验证等)的子类。
    
    所有数据转换、校验、文档等功能仍将正常运行。
    
    这样,就可以仅声明模型之间的差异部分(具有明文的 `password`、具有 `hashed_password` 以及不包括密码)。
    
    通过这种方式,可以只声明模型之间的区别(分别包含明文密码、哈希密码,以及无密码的模型)。
    
    //// tab | Python 3.10+
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/extra-models.md

    ///
    
    ## 📉 ❎
    
    📉 📟 ❎ 1️⃣ 🐚 💭 **FastAPI**.
    
    📟 ❎ 📈 🤞 🐛, 💂‍♂ ❔, 📟 🔁 ❔ (🕐❔ 👆 ℹ 1️⃣ 🥉 ✋️ 🚫 🎏), ♒️.
    
    &amp; 👉 🏷 🌐 🤝 📚 💽 &amp; ❎ 🔢 📛 &amp; 🆎.
    
    👥 💪 👻.
    
    👥 💪 📣 `UserBase` 🏷 👈 🍦 🧢 👆 🎏 🏷. &amp; ⤴️ 👥 💪 ⚒ 🏿 👈 🏷 👈 😖 🚮 🔢 (🆎 📄, 🔬, ♒️).
    
    🌐 💽 🛠️, 🔬, 🧾, ♒️. 🔜 👷 🛎.
    
    👈 🌌, 👥 💪 📣 🔺 🖖 🏷 (⏮️ 🔢 `password`, ⏮️ `hashed_password` &amp; 🍵 🔐):
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/extra-models.md

    And these models are all sharing a lot of the data and duplicating attribute names and types.
    
    We could do better.
    
    We can declare a `UserBase` model that serves as a base for our other models. And then we can make subclasses of that model that inherit its attributes (type declarations, validation, etc).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/extra-models.md

    А все описанные выше модели используют много общих данных и дублируют названия атрибутов и типов.
    
    Мы можем это улучшить.
    
    Мы можем определить модель `UserBase`, которая будет базовой для остальных моделей. И затем мы можем создать подклассы этой модели, которые будут наследовать её атрибуты (объявления типов, валидацию, и т.п.).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.5K bytes
    - Viewed (0)
Back to top