Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for Printf (0.19 sec)

  1. ci/official/utilities/extract_resultstore_links.py

        tree.write(f)
        if verbose:
          print(f'\nWrote XML with Bazel invocation results to {file_path}')
    
    
    def print_invocation_results(result_store_dict: ResultDictType):
      """Prints out a short summary of the found ResultStore links (if any)."""
      print()
      if not result_store_dict:
        print('Found no ResultStore links for Bazel build/test invocations.')
      else:
    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)
  2. docs_src/custom_request_and_route/tutorial003.py

                duration = time.time() - before
                response.headers["X-Response-Time"] = str(duration)
                print(f"route duration: {duration}")
                print(f"route response: {response}")
                print(f"route response headers: {response.headers}")
                return response
    
            return custom_route_handler
    
    
    app = FastAPI()
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 1K bytes
    - Viewed (0)
  3. docs_src/python_types/tutorial011.py

    
    external_data = {
        "id": "123",
        "signup_ts": "2017-06-01 12:22",
        "friends": [1, "2", b"3"],
    }
    user = User(**external_data)
    print(user)
    # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]
    print(user.id)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Sep 02 15:56:35 GMT 2023
    - 498 bytes
    - Viewed (0)
  4. docs_src/handling_errors/tutorial006.py

    
    @app.exception_handler(StarletteHTTPException)
    async def custom_http_exception_handler(request, exc):
        print(f"OMG! An HTTP error!: {repr(exc)}")
        return await http_exception_handler(request, exc)
    
    
    @app.exception_handler(RequestValidationError)
    async def validation_exception_handler(request, exc):
        print(f"OMG! The client sent invalid data!: {exc}")
        return await request_validation_exception_handler(request, exc)
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Aug 09 11:10:33 GMT 2020
    - 928 bytes
    - Viewed (0)
  5. docs_src/python_types/tutorial001.py

    def get_full_name(first_name, last_name):
        full_name = first_name.title() + " " + last_name.title()
        return full_name
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 162 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_response_change_status_code/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.response_change_status_code.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.put("/get-or-create-task/foo")
        print(response.content)
        assert response.status_code == 200, response.text
        assert response.json() == "Listen to the Bar Fighters"
        response = client.put("/get-or-create-task/bar")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 521 bytes
    - Viewed (0)
  7. docs_src/extra_models/tutorial002_py310.py

        return "supersecret" + raw_password
    
    
    def fake_save_user(user_in: UserIn):
        hashed_password = fake_password_hasher(user_in.password)
        user_in_db = UserInDB(**user_in.dict(), hashed_password=hashed_password)
        print("User saved! ..not really")
        return user_in_db
    
    
    @app.post("/user/", response_model=UserOut)
    async def create_user(user_in: UserIn):
        user_saved = fake_save_user(user_in)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 792 bytes
    - Viewed (0)
  8. ci/official/containers/linux_arm64/devel.usertools/squash_testlogs.py

    from junitparser import JUnitXml
    
    result = JUnitXml()
    try:
      files = subprocess.check_output(
          ["grep", "-rlE", '(failures|errors)="[1-9]', sys.argv[1]]
      )
    except subprocess.CalledProcessError as e:
      print("No failures found to log!")
      exit(0)
    
    # For test cases, only show the ones that failed that have text (a log)
    seen = collections.Counter()
    runfiles_matcher = re.compile(r"(/.*\.runfiles/)")
    
    
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Sep 18 19:00:37 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  9. docs/select/select.py

        if 'Records' in event:
            records = event['Records']['Payload'].decode('utf-8')
            print(records)
        elif 'Stats' in event:
            statsDetails = event['Stats']['Details']
            print("Stats details bytesScanned: ")
            print(statsDetails['BytesScanned'])
            print("Stats details bytesProcessed: ")
    Python
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Aug 18 00:11:39 GMT 2018
    - 1K bytes
    - Viewed (0)
  10. docs_src/python_types/tutorial011_py310.py

    
    external_data = {
        "id": "123",
        "signup_ts": "2017-06-01 12:22",
        "friends": [1, "2", b"3"],
    }
    user = User(**external_data)
    print(user)
    # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]
    print(user.id)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Sep 02 15:56:35 GMT 2023
    - 461 bytes
    - Viewed (0)
Back to top