- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 113 for Open (0.14 sec)
-
docs_src/background_tasks/tutorial002.py
from typing import Union from fastapi import BackgroundTasks, Depends, FastAPI app = FastAPI() def write_log(message: str): with open("log.txt", mode="a") as log: log.write(message) def get_query(background_tasks: BackgroundTasks, q: Union[str, None] = None): if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 675 bytes - Viewed (0) -
.github/DISCUSSION_TEMPLATE/questions.yml
required: true - type: checkboxes id: help attributes: label: Commit to Help description: | After submitting this, I commit to one of: * Read open questions until I find 2 where I can help someone and add a comment to help there.
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Aug 03 15:59:41 GMT 2023 - 5.8K bytes - Viewed (1) -
tests/test_tutorial/test_request_files/test_tutorial001_an.py
} ] } ) def test_post_file(tmp_path): path = tmp_path / "test.txt" path.write_bytes(b"<file content>") client = TestClient(app) with path.open("rb") as file: response = client.post("/files/", files={"file": file}) assert response.status_code == 200, response.text assert response.json() == {"file_size": 14} def test_post_large_file(tmp_path):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.5K bytes - Viewed (0) -
docs/en/docs/tutorial/security/oauth2-jwt.md
```JSON { "username": "johndoe", "email": "******@****.***", "full_name": "John Doe", "disabled": false } ``` <img src="/img/tutorial/security/image09.png"> If you open the developer tools, you could see how the data sent only includes the token, the password is only sent in the first request to authenticate the user and get that access token, but not afterwards:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 13K bytes - Viewed (0) -
docs_src/nosql_databases/tutorial001.py
) authenticator = PasswordAuthenticator("username", "password") cluster.authenticate(authenticator) bucket: Bucket = cluster.open_bucket("bucket_name", lockmode=LOCKMODE_WAIT) bucket.timeout = 30 bucket.n1ql_timeout = 300 return bucket class User(BaseModel): username: str email: Union[str, None] = None
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 1.3K bytes - Viewed (0) -
docs/en/docs/how-to/configure-swagger-ui.md
# Configure Swagger UI You can configure some extra <a href="https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration" class="external-link" target="_blank">Swagger UI parameters</a>. To configure them, pass the `swagger_ui_parameters` argument when creating the `FastAPI()` app object or to the `get_swagger_ui_html()` function. `swagger_ui_parameters` receives a dictionary with the configurations passed to Swagger UI directly.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 2.8K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial002_an_py39.py
path = tmp_path / "test.txt" path.write_bytes(b"<file content>") path2 = tmp_path / "test2.txt" path2.write_bytes(b"<file content2>") client = TestClient(app) with path.open("rb") as file, path2.open("rb") as file2: response = client.post( "/files/", files=( ("files", ("test.txt", file)), ("files", ("test2.txt", file2)), ),
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 8.9K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial002_py39.py
path = tmp_path / "test.txt" path.write_bytes(b"<file content>") path2 = tmp_path / "test2.txt" path2.write_bytes(b"<file content2>") client = TestClient(app) with path.open("rb") as file, path2.open("rb") as file2: response = client.post( "/files/", files=( ("files", ("test.txt", file)), ("files", ("test2.txt", file2)), ),
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 9K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py
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/", data={"token": "foo"}, files={"file": filea, "fileb": ("testb.txt", fileb, "text/plain")}, )
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 9.9K bytes - Viewed (0) -
docs/em/docs/advanced/events.md
``` đĨ, `shutdown` đ đâđĻē đĸ đ â â ⸠`"Application shutdown"` đ `log.txt`. !!! info `open()` đĸ, `mode="a"` â "đģ",, ⸠đ đŽ âŽī¸ âĢī¸â đ đ đ, đĩ đ âŽī¸ đ. !!! tip đ đ đ đŧ đĨ âī¸ đŠ đ `open()` đĸ đ đ âŽī¸ đ. , âĢī¸ đ đ¤/đ ž (đĸ/đĸ), đ đ "â" đ â đž. âī¸ `open()` đĢ âī¸ `async` & `await`. , đĨ đŖ đ đâđĻē đĸ âŽī¸ đŠ `def` âŠī¸ `async def`. !!! info
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 6.2K bytes - Viewed (0)