Search Options

Results per page
Sort
Preferred Languages
Advance

Results 811 - 820 of 1,086 for str (0.01 sec)

  1. docs_src/python_types/tutorial008_py39.py

    def process_items(prices: dict[str, float]):
        for item_name, item_price in prices.items():
            print(item_name)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Jan 16 14:44:08 UTC 2022
    - 145 bytes
    - Viewed (0)
  2. docs_src/python_types/tutorial012.py

    from typing import Optional
    
    from pydantic import BaseModel
    
    
    class User(BaseModel):
        name: str
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 122 bytes
    - Viewed (0)
  3. tests/test_union_body.py

    from dirty_equals import IsDict
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: Optional[str] = None
    
    
    class OtherItem(BaseModel):
        price: int
    
    
    @app.post("/items/")
    def save_union_body(item: Union[OtherItem, Item]):
        return {"item": item}
    
    
    client = TestClient(app)
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  4. docs_src/python_types/tutorial007.py

    from typing import Set, Tuple
    
    
    def process_items(items_t: Tuple[int, int, str], items_s: Set[bytes]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Apr 11 17:20:32 UTC 2020
    - 131 bytes
    - Viewed (0)
  5. docs/em/docs/tutorial/body-updates.md

    ℹ đŸŦ 👆 đŸ’Ē ⚙ī¸ <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT" class="external-link" target="_blank">đŸ‡ē🇸🔍 `PUT`</a> 🛠ī¸.
    
    👆 đŸ’Ē ⚙ī¸ `jsonable_encoder` 🗜 đŸ”ĸ đŸ’Ŋ 📊 👈 đŸ’Ē đŸĒ đŸŽģ (✅ ⏎ī¸ ☁ đŸ’Ŋ). đŸ–ŧ, 🏭 `datetime` `str`.
    
    //// tab | 🐍 3ī¸âƒŖ.6ī¸âƒŖ &amp; 🔛
    
    ```Python hl_lines="30-35"
    {!> ../../docs_src/body_updates/tutorial001.py!}
    ```
    
    ////
    
    //// tab | 🐍 3ī¸âƒŖ.9ī¸âƒŖ &amp; 🔛
    
    ```Python hl_lines="30-35"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  6. guava/src/com/google/common/io/LittleEndianDataOutputStream.java

      @Override
      public void writeShort(int v) throws IOException {
        out.write(0xFF & v);
        out.write(0xFF & (v >> 8));
      }
    
      @Override
      public void writeUTF(String str) throws IOException {
        ((DataOutputStream) out).writeUTF(str);
      }
    
      // Overriding close() because FilterOutputStream's close() method pre-JDK8 has bad behavior:
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 26 12:34:49 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb/SmbRandomAccessFile.java

        public final void writeUTF ( String str ) throws SmbException {
            int len = str.length();
            int ch, size = 0;
            byte[] dst;
    
            for ( int i = 0; i < len; i++ ) {
                ch = str.charAt(i);
                size += ch > 0x07F ? ( ch > 0x7FF ? 3 : 2 ) : 1;
            }
            dst = new byte[size];
            writeShort(size);
            Encdec.enc_utf8(str, dst, 0, size);
            write(dst, 0, size);
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Wed Jan 08 12:01:33 UTC 2020
    - 18.5K bytes
    - Viewed (0)
  8. docs_src/python_types/tutorial009b.py

    from typing import Union
    
    
    def say_hi(name: Union[str, None] = None):
        if name is not None:
            print(f"Hey {name}!")
        else:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 164 bytes
    - Viewed (0)
  9. docs/em/docs/advanced/security/oauth2-scopes.md

    👈, đŸ‘Ĩ ℹ Pydantic 🏷 `TokenData` ⏎ī¸ 🆕 🏠 `scopes`.
    
    ⚖ 📊 ⏎ī¸ Pydantic đŸ‘Ĩ đŸ’Ē ⚒ 💭 👈 đŸ‘Ĩ ✔ī¸, đŸ–ŧ, âšĢī¸â” `list` `str` ⏎ī¸ ↔ &amp; `str` ⏎ī¸ `username`.
    
    ↩ī¸, đŸ–ŧ, `dict`, ⚖ī¸ đŸ•ŗ 🙆, âšĢī¸ đŸ’Ē 💔 🈸 ☝ âĒ, ⚒ âšĢī¸ 💂‍♂ ⚠.
    
    đŸ‘Ĩ ✔ 👈 đŸ‘Ĩ ✔ī¸ 👩‍đŸ’ģ ⏎ī¸ 👈 🆔, &amp; đŸšĨ đŸšĢ, đŸ‘Ĩ 🤚 👈 🎏 ⚠ đŸ‘Ĩ ✍ ⏭.
    
    ```Python hl_lines="46  116-127"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/body-multiple-params.md

    ## 💗 đŸ’Ē = &amp; đŸ”ĸ
    
    ↗ī¸, 👆 đŸ’Ē đŸ“Ŗ 🌖 đŸ”ĸ đŸ”ĸ 🕐❔ 👆 đŸ’Ē, 🌖 🙆 đŸ’Ē đŸ”ĸ.
    
    , đŸ”ĸ, ⭐ 💲 đŸ”Ŧ đŸ”ĸ đŸ”ĸ, 👆 đŸšĢ ✔ī¸ đŸŽ¯ 🚮 `Query`, 👆 đŸ’Ē:
    
    ```Python
    q: Union[str, None] = None
    ```
    
    ⚖ī¸ 🐍 3ī¸âƒŖ.1ī¸âƒŖ0ī¸âƒŖ &amp; 🔛:
    
    ```Python
    q: str | None = None
    ```
    
    đŸ–ŧ:
    
    //// tab | 🐍 3ī¸âƒŖ.6ī¸âƒŖ &amp; 🔛
    
    ```Python hl_lines="27"
    {!> ../../docs_src/body_multiple_params/tutorial004.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5K bytes
    - Viewed (0)
Back to top