- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 44 for fwrite (0.73 sec)
-
ci/official/utilities/extract_resultstore_links.py
indent_xml(testsuites) tree = ElemTree.ElementTree(testsuites) file_path = os.path.join(output_path) with open(file_path, 'wb') as f: f.write(b'<?xml version="1.0"?>\n') tree.write(f) if verbose: print(f'\nWrote XML with Bazel invocation results to {file_path}') def print_invocation_results(result_store_dict: ResultDictType):
Python - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Wed Nov 08 17:50:27 GMT 2023 - 10.9K bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_an_py310.py
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: str | None = None): if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q @app.post("/send-notification/{email}")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 683 bytes - Viewed (1) -
tests/test_tutorial/test_request_files/test_tutorial001_03.py
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_upload_file(tmp_path): path = tmp_path / "test.txt" path.write_bytes(b"<file content>")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 6K bytes - Viewed (0) -
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) -
ci/official/containers/linux_arm64/devel.usertools/squash_testlogs.py
"as failing," ) p.text += "\n but do not make the Kokoro invocation fail." os.makedirs(os.path.dirname(sys.argv[2]), exist_ok=True) result.update_statistics()
Python - Registered: Tue May 07 12:40:20 GMT 2024 - Last Modified: Mon Sep 18 19:00:37 GMT 2023 - 4.8K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial003.py
from docs_src.request_files.tutorial003 import app client = TestClient(app) def test_post_files(tmp_path): 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/",
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 7.1K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial002.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 8.5K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial003_py39.py
"type": "value_error.missing", } ] } @needs_py39 def test_post_files(tmp_path, app: FastAPI): 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/",
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 7.6K bytes - Viewed (0) -
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) -
tests/test_tutorial/test_request_files/test_tutorial001_03_an.py
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_upload_file(tmp_path): path = tmp_path / "test.txt" path.write_bytes(b"<file content>")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 6K bytes - Viewed (0)