Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for Allain (0.19 sec)

  1. docs_src/security/tutorial004.py

    
    pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
        return pwd_context.verify(plain_password, hashed_password)
    
    
    def get_password_hash(password):
        return pwd_context.hash(password)
    
    
    def get_user(db, username: str):
        if username in db:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4K bytes
    - Viewed (0)
  2. docs_src/security/tutorial004_an.py

    
    pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
        return pwd_context.verify(plain_password, hashed_password)
    
    
    def get_password_hash(password):
        return pwd_context.hash(password)
    
    
    def get_user(db, username: str):
        if username in db:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  3. tests/test_compat.py

        # For coverage
        field_info = FieldInfo(annotation=str)
        field = ModelField(name="foo", field_info=field_info)
        assert field.default is Undefined
    
    
    @needs_pydanticv1
    def test_upload_file_dummy_with_info_plain_validator_function():
        # For coverage
        assert UploadFile.__get_pydantic_core_schema__(str, lambda x: None) == {}
    
    
    @needs_pydanticv1
    def test_union_scalar_list():
        # For coverage
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  4. docs/fr/docs/history-design-future.md

    Le tout de manière à offrir la meilleure expérience de développement à tous les développeurs.
    
    ## Exigences
    
    Après avoir testé plusieurs alternatives, j'ai décidé que j'allais utiliser <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">**Pydantic**</a> pour ses avantages.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  5. docs/em/docs/advanced/path-operation-advanced-configuration.md

    ```Python hl_lines="20-37  39-40"
    {!../../../docs_src/path_operation_advanced_configuration/tutorial006.py!}
    ```
    
    👉 🖼, 👥 🚫 📣 🙆 Pydantic 🏷. 👐, 📨 💪 🚫 <abbr title="converted from some plain format, like bytes, into Python objects">🎻</abbr> 🎻, ⚫️ ✍ 🔗 `bytes`, &amp; 🔢 `magic_data_reader()` 🔜 🈚 🎻 ⚫️ 🌌.
    
    👐, 👥 💪 📣 📈 🔗 📨 💪.
    
    ### 🛃 🗄 🎚 🆎
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body/test_tutorial001.py

            "tax": None,
        }
    
    
    def test_wrong_headers(client: TestClient):
        data = '{"name": "Foo", "price": 50.5}'
        response = client.post(
            "/items/", content=data, headers={"Content-Type": "text/plain"}
        )
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "model_attributes_type",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 14.7K bytes
    - Viewed (4)
  7. tests/test_tutorial/test_body/test_tutorial001_py310.py

        }
    
    
    @needs_py310
    def test_wrong_headers(client: TestClient):
        data = '{"name": "Foo", "price": 50.5}'
        response = client.post(
            "/items/", content=data, headers={"Content-Type": "text/plain"}
        )
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "model_attributes_type",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (1)
  8. docs/en/docs/tutorial/response-model.md

    But if we use the same model for another *path operation*, we could be sending our user's passwords to every client.
    
    !!! danger
        Never store the plain password of a user or send it in a response like this, unless you know all the caveats and you know what you are doing.
    
    ## Add an output model
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  9. docs_src/security/tutorial004_an_py310.py

    
    pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
        return pwd_context.verify(plain_password, hashed_password)
    
    
    def get_password_hash(password):
        return pwd_context.hash(password)
    
    
    def get_user(db, username: str):
        if username in db:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  10. docs_src/security/tutorial005_an.py

    oauth2_scheme = OAuth2PasswordBearer(
        tokenUrl="token",
        scopes={"me": "Read information about the current user.", "items": "Read items."},
    )
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
        return pwd_context.verify(plain_password, hashed_password)
    
    
    def get_password_hash(password):
        return pwd_context.hash(password)
    
    
    def get_user(db, username: str):
        if username in db:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.3K bytes
    - Viewed (0)
Back to top