- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for timer (0.16 sec)
-
docs_src/custom_request_and_route/tutorial003.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 1K bytes - Viewed (0) -
docs_src/middleware/tutorial001.py
import time from fastapi import FastAPI, Request app = FastAPI() @app.middleware("http") async def add_process_time_header(request: Request, call_next): start_time = time.time() response = await call_next(request) process_time = time.time() - start_time response.headers["X-Process-Time"] = str(process_time)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 349 bytes - Viewed (0) -
tests/test_tutorial/test_extra_data_types/test_tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Apr 19 00:11:40 GMT 2024 - 6.8K bytes - Viewed (0) -
ci/official/utilities/extract_resultstore_links.py
os.makedirs(os.path.dirname(output_path), exist_ok=True) failure_count = 0 error_count = 0 date_time = datetime.datetime attrib = {'name': 'Bazel Invocations', 'time': '0.0', 'timestamp': date_time.isoformat(date_time.utcnow())} testsuites = ElemTree.Element('testsuites') testsuite = ElemTree.SubElement(testsuites, 'testsuite')
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) -
fastapi/param_functions.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 62.5K bytes - Viewed (0) -
ci/official/containers/linux_arm64/devel.usertools/squash_testlogs.py
" the file." ) n_failures = seen[key] p.text += f"\nNOTE: Number of failures for this test: {seen[key]}." p.text += "\n Most TF jobs run tests three times to root out flakes." if seen[key] == 3: p.text += ( "\n Since there were three failures, this is not flaky, and it" ) p.text += "\n probably caused the Kokoro invocation to fail."
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) -
.github/actions/people/app/main.py
if author_time > one_month_ago: last_month_commenters[author_name] += 1 if author_time > three_months_ago: three_months_commenters[author_name] += 1 if author_time > six_months_ago: six_months_commenters[author_name] += 1 if author_time > one_year_ago: one_year_commenters[author_name] += 1
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) -
tests/test_tutorial/test_extra_data_types/test_tutorial001_an_py310.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Apr 19 00:11:40 GMT 2024 - 7K bytes - Viewed (0) -
docs_src/extra_data_types/tutorial001.py
from datetime import datetime, time, timedelta from typing import Union from uuid import UUID from fastapi import Body, FastAPI app = FastAPI() @app.put("/items/{item_id}") async def read_items( item_id: UUID, start_datetime: datetime = Body(), end_datetime: datetime = Body(), process_after: timedelta = Body(), repeat_at: Union[time, None] = Body(default=None), ):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Apr 19 00:11:40 GMT 2024 - 755 bytes - Viewed (0) -
.github/actions/notify-translations/app/main.py
# Avoid race conditions with multiple labels sleep_time = random.random() * 10 # random number between 0 and 10 seconds logging.info( f"Sleeping for {sleep_time} seconds to avoid " "race conditions and multiple comments" ) time.sleep(sleep_time) # Get PR logging.debug(f"Processing PR: #{github_event.pull_request.number}")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Sep 27 23:01:46 GMT 2023 - 12.4K bytes - Viewed (0)