Search Options

Results per page
Sort
Preferred Languages
Advance

Results 591 - 600 of 1,178 for strs (0.25 sec)

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

    ### 添加类型
    
    让我们来修改上面例子的一行代码。
    
    我们将把下面这段代码中的函数参数从:
    
    ```Python
        first_name, last_name
    ```
    
    改成:
    
    ```Python
        first_name: str, last_name: str
    ```
    
    就是这样。
    
    这些就是"类型提示":
    
    {* ../../docs_src/python_types/tutorial002.py hl[1] *}
    
    
    这和声明默认值是不同的,例如:
    
    ```Python
        first_name="john", last_name="doe"
    ```
    
    这两者不一样。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Aug 18 06:34:40 UTC 2025
    - 8.6K bytes
    - Viewed (0)
  2. tests/test_response_model_default_factory.py

    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    
    class ResponseModel(BaseModel):
        code: int = 200
        message: str = Field(default_factory=lambda: "Successful operation.")
    
    
    @app.get(
        "/response_model_has_default_factory_return_dict",
        response_model=ResponseModel,
    )
    async def response_model_has_default_factory_return_dict():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Sep 20 18:51:40 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  3. docs/uk/docs/tutorial/body-nested-models.md

    * Передайте внутрішні типи як "параметри типу", використовуючи квадратні дужки: `[` and `]`.
    
    У Python 3.9 це буде виглядати так:
    
    ```Python
    my_list: list[str]
    ```
    
    У версіях Python до 3.9 це виглядає так:
    
    ```Python
    from typing import List
    
    my_list: List[str]
    ```
    
    Це стандартний синтаксис Python для оголошення типів.
    
    Використовуйте той самий стандартний синтаксис для атрибутів моделей з внутрішніми типами.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Feb 28 14:18:01 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  4. docs/uk/docs/tutorial/body-multiple-params.md

    Оскільки за замовчуванням окремі значення інтерпретуються як параметри запиту, Вам не потрібно явно додавати `Query`, можна просто використати:
    
    ```Python
    q: Union[str, None] = None
    ```
    
    Або в Python 3.10 та вище:
    
    ```Python
    q: str | None = None
    ```
    
    Наприклад:
    
    {* ../../docs_src/body_multiple_params/tutorial004_an_py310.py hl[28] *}
    
    
    /// info | Інформація
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Feb 28 14:19:00 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  5. docs/uk/docs/tutorial/query-params.md

    Але якщо Ви хочете зробити query параметр обов’язковим, просто не вказуйте для нього значення за замовчуванням:
    
    {* ../../docs_src/query_params/tutorial005.py hl[6:7] *}
    
    Тут `needy` – обов’язковий query параметр типу `str`.
    
    Якщо Ви відкриєте у браузері URL-адресу:
    
    ```
    http://127.0.0.1:8000/items/foo-item
    ```
    
    ...без додавання обов’язкового параметра `needy`, Ви побачите помилку:
    
    ```JSON
    {
      "detail": [
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 10:29:01 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  6. fastapi/_compat/shared.py

            if isinstance(cls, WithArgsTypes):
                return False
            raise  # pragma: no cover
    
    
    def _annotation_is_sequence(annotation: Union[type[Any], None]) -> bool:
        if lenient_issubclass(annotation, (str, bytes)):
            return False
        return lenient_issubclass(annotation, sequence_types)
    
    
    def field_annotation_is_sequence(annotation: Union[type[Any], None]) -> bool:
        origin = get_origin(annotation)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  7. internal/bucket/versioning/versioning_test.go

    	v := Versioning{
    		Status: Enabled,
    	}
    	buf, err := xml.Marshal(v)
    	if err != nil {
    		t.Fatalf("Failed to marshal %v: %v", v, err)
    	}
    
    	str := string(buf)
    	if strings.Contains(str, "ExcludedPrefixes") {
    		t.Fatalf("XML shouldn't contain ExcludedPrefixes tag - %s", str)
    	}
    }
    
    func TestVersioningZero(t *testing.T) {
    	var v Versioning
    	if v.Enabled() {
    		t.Fatalf("Expected to be disabled but got enabled")
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Sun May 08 05:06:44 UTC 2022
    - 8.8K bytes
    - Viewed (0)
  8. cmd/iam.go

    // policy for the STS credential. The policy mapping can be updated by the
    // administrator.
    //
    // - from `Subject.CommonName` field from the STS request for
    // AssumeRoleWithCertificate. In this case, the policy for the STS credential
    // has the same name as the value of this field.
    //
    // - from special JWT claim from STS request for AssumeRoleWithOIDC API (when
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Wed Oct 15 17:00:45 UTC 2025
    - 76.5K bytes
    - Viewed (0)
  9. src/main/java/jcifs/internal/fscc/FileBothDirectoryInfo.java

            bufferIndex += 24;
    
            String str;
            if (this.unicode) {
                if (fileNameLength > 0 && buffer[bufferIndex + fileNameLength - 1] == '\0'
                        && buffer[bufferIndex + fileNameLength - 2] == '\0') {
                    fileNameLength -= 2;
                }
                str = Strings.fromUNIBytes(buffer, bufferIndex, fileNameLength);
            } else {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 6K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/dependencies/sub-dependencies.md

    ```Python hl_lines="1"
    async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]):
        return {"fresh_value": fresh_value}
    ```
    
    ////
    
    //// tab | Python 3.9+ non-Annotated
    
    /// tip | Dica
    
    Utilize a versão com `Annotated` se possível.
    
    ///
    
    ```Python hl_lines="1"
    async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)):
        return {"fresh_value": fresh_value}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.1K bytes
    - Viewed (0)
Back to top