Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 112 for keys (0.16 sec)

  1. docs/es/docs/python-types.md

    Para definir un `dict` le pasas 2 sub-tipos separados por comas.
    
    El primer sub-tipo es para los keys del `dict`.
    
    El segundo sub-tipo es para los valores del `dict`:
    
    ```Python hl_lines="1  4"
    {!../../../docs_src/python_types/tutorial008.py!}
    ```
    
    Esto significa:
    
    * La variable `prices` es un `dict`:
        * Los keys de este `dict` son de tipo `str` (Digamos que son el nombre de cada ítem).
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  2. scripts/docs.py

                continue
            code = lang_path.name
            languages.append({code: f"/{code}/"})
        for lang_dict in languages:
            code = list(lang_dict.keys())[0]
            url = lang_dict[code]
            if code not in local_language_names:
                print(
                    f"Missing language name for: {code}, "
                    "update it in docs/language_names.yml"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  3. fastapi/encoders.py

            encoded_dict = {}
            allowed_keys = set(obj.keys())
            if include is not None:
                allowed_keys &= set(include)
            if exclude is not None:
                allowed_keys -= set(exclude)
            for key, value in obj.items():
                if (
                    (
                        not sqlalchemy_safe
                        or (not isinstance(key, str))
                        or (not key.startswith("_sa"))
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/additional-responses.md

    ```Python
    old_dict = {
        "old key": "old value",
        "second old key": "second old value",
    }
    new_dict = {**old_dict, "new key": "new value"}
    ```
    
    Here, `new_dict` will contain all the key-value pairs from `old_dict` plus the new key-value pair:
    
    ```Python
    {
        "old key": "old value",
        "second old key": "second old value",
        "new key": "new value",
    }
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

    We can do better...
    
    ## What makes a dependency
    
    Up to now you have seen dependencies declared as functions.
    
    But that's not the only way to declare dependencies (although it would probably be the more common).
    
    The key factor is that a dependency should be a "callable".
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  6. fastapi/responses.py

        """
    
        def render(self, content: Any) -> bytes:
            assert orjson is not None, "orjson must be installed to use ORJSONResponse"
            return orjson.dumps(
                content, option=orjson.OPT_NON_STR_KEYS | orjson.OPT_SERIALIZE_NUMPY
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/body-nested-models.md

    You can also declare a body as a `dict` with keys of some type and values of some other type.
    
    This way, you don't have to know beforehand what the valid field/attribute names are (as would be the case with Pydantic models).
    
    This would be useful if you want to receive keys that you don't already know.
    
    ---
    
    Another useful case is when you want to have keys of another type (e.g., `int`).
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  8. tests/test_orjson_response_class.py

    app = FastAPI(default_response_class=ORJSONResponse)
    
    
    @app.get("/orjson_non_str_keys")
    def get_orjson_non_str_keys():
        key = quoted_name(value="msg", quote=False)
        return {key: "Hello World", 1: 1}
    
    
    client = TestClient(app)
    
    
    def test_orjson_non_str_keys():
        with client:
            response = client.get("/orjson_non_str_keys")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Sep 02 10:17:31 GMT 2022
    - 562 bytes
    - Viewed (0)
  9. docs/en/docs/advanced/settings.md

    # Settings and Environment Variables
    
    In many cases your application could need some external settings or configurations, for example secret keys, database credentials, credentials for email services, etc.
    
    Most of these settings are variable (can change), like database URLs. And many could be sensitive, like secrets.
    
    For this reason it's common to provide them in environment variables that are read by the application.
    
    ## Environment Variables
    
    !!! tip
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  10. docs/es/docs/features.md

    }
    
    my_second_user: User = User(**second_user_data)
    ```
    
    !!! info
        `**second_user_data` significa:
    
        Pasa las <abbr title="en español key se refiere a la guía de un diccionario">keys</abbr> y los valores del dict `second_user_data` directamente como argumentos de key-value, equivalente a: `User(id=4, name="Mary", joined="2018-11-30")`
    
    ### Soporte del editor
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.9K bytes
    - Viewed (0)
Back to top