Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for fwrite (0.14 sec)

  1. fastapi/security/oauth2.py

                    For example, a single string with:
    
                    ```python
                    "items:read items:write users:read profile openid"
                    ````
    
                    would represent the scopes:
    
                    * `items:read`
                    * `items:write`
                    * `users:read`
                    * `profile`
                    * `openid`
                    """
                ),
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  2. docs/en/docs/alternatives.md

    That's why, as said in the official website:
    
    > Requests is one of the most downloaded Python packages of all time
    
    The way you use it is very simple. For example, to do a `GET` request, you would write:
    
    ```Python
    response = requests.get("http://example.com/some/url")
    ```
    
    The FastAPI counterpart API *path operation* could look like:
    
    ```Python hl_lines="1"
    @app.get("/some/url")
    def read_url():
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/first-steps.md

    ## Recap
    
    * Import `FastAPI`.
    * Create an `app` instance.
    * Write a **path operation decorator** (like `@app.get("/")`).
    * Write a **path operation function** (like `def root(): ...` above).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 12K bytes
    - Viewed (0)
  4. docs/fr/docs/tutorial/path-params.md

    ### Création d'un `Enum`
    
    Importez `Enum` et créez une sous-classe qui hérite de `str` et `Enum`.
    
    En héritant de `str` la documentation sera capable de savoir que les valeurs doivent être de type `string` et pourra donc afficher cette `Enum` correctement.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10K bytes
    - Viewed (0)
  5. docs/em/docs/advanced/security/oauth2-scopes.md

    👫 ↔ 🎨 "✔".
    
    🗄 (✅ 🛠️ 🩺), 👆 💪 🔬 "💂‍♂ ⚖".
    
    🕐❔ 1️⃣ 👫 💂‍♂ ⚖ ⚙️ Oauth2️⃣, 👆 💪 📣 & ⚙️ ↔.
    
    🔠 "↔" 🎻 (🍵 🚀).
    
    👫 🛎 ⚙️ 📣 🎯 💂‍♂ ✔, 🖼:
    
    * `users:read` ⚖️ `users:write` ⚠ 🖼.
    * `instagram_basic` ⚙️ 👱📔 / 👱📔.
    * `https://www.googleapis.com/auth/drive` ⚙️ 🇺🇸🔍.
    
    !!! info
        Oauth2️⃣ "↔" 🎻 👈 📣 🎯 ✔ ✔.
    
        ⚫️ 🚫 🤔 🚥 ⚫️ ✔️ 🎏 🦹 💖 `:` ⚖️ 🚥 ⚫️ 📛.
    
        👈 ℹ 🛠️ 🎯.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 11.1K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an.py

                ]
            }
        )
    
    
    def test_post_files_and_token(tmp_path, app: FastAPI):
        patha = tmp_path / "test.txt"
        pathb = tmp_path / "testb.txt"
        patha.write_text("<file content>")
        pathb.write_text("<file b content>")
    
        client = TestClient(app)
        with patha.open("rb") as filea, pathb.open("rb") as fileb:
            response = client.post(
                "/files/",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  7. tests/test_security_oauth2_optional.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    reusable_oauth2 = OAuth2(
        flows={
            "password": {
                "tokenUrl": "token",
                "scopes": {"read:users": "Read the users", "write:users": "Create users"},
            }
        },
        auto_error=False,
    )
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: Optional[str] = Security(reusable_oauth2)):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  8. .github/actions/people/app/main.py

        ):
            logging.info("The FastAPI People data hasn't changed, finishing.")
            sys.exit(0)
        people_path.write_text(new_people_content, encoding="utf-8")
        github_sponsors_path.write_text(new_github_sponsors_content, encoding="utf-8")
        logging.info("Setting up GitHub Actions git user")
        subprocess.run(["git", "config", "user.name", "github-actions"], check=True)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  9. docs/en/docs/deployment/concepts.md

    ### What is a Program
    
    The word **program** is commonly used to describe many things:
    
    * The **code** that you write, the **Python files**.
    * The **file** that can be **executed** by the operating system, for example: `python`, `python.exe` or `uvicorn`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 18K bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/request-files.md

    `UploadFile` имеет следующие методы `async`. Все они вызывают соответствующие файловые методы (используя внутренний SpooledTemporaryFile).
    
    * `write(data)`: Записать данные `data` (`str` или `bytes`) в файл.
    * `read(size)`: Прочитать количество `size` (`int`) байт/символов из файла.
    * `seek(offset)`: Перейти к байту на позиции `offset` (`int`) в файле.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 15.4K bytes
    - Viewed (0)
Back to top