Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for loads (0.16 sec)

  1. docs/sts/client_grants/__init__.py

                    raise CredentialRetrievalError(
                        provider=method,
                        error_msg=message % response.status,
                    )
    
                creds = json.loads(response.data)
    
                query = {}
                query['Action'] = 'AssumeRoleWithClientGrants'
                query['Token'] = creds['access_token']
                query['DurationSeconds'] = creds['expires_in']
    Python
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 4.6K bytes
    - Viewed (1)
  2. tests/test_ws_dependencies.py

    def test_index():
        client = TestClient(app)
        with client.websocket_connect("/") as websocket:
            data = json.loads(websocket.receive_text())
            assert data == ["app", "index"]
    
    
    def test_routerindex():
        client = TestClient(app)
        with client.websocket_connect("/router") as websocket:
            data = json.loads(websocket.receive_text())
            assert data == ["app", "router2", "router", "routerindex"]
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 20:35:39 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  3. docs_src/generate_clients/tutorial004.py

    import json
    from pathlib import Path
    
    file_path = Path("./openapi.json")
    openapi_content = json.loads(file_path.read_text())
    
    for path_data in openapi_content["paths"].values():
        for operation in path_data.values():
            tag = operation["tags"][0]
            operation_id = operation["operationId"]
            to_remove = f"{tag}-"
            new_operation_id = operation_id[len(to_remove) :]
            operation["operationId"] = new_operation_id
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 04 22:02:18 GMT 2022
    - 493 bytes
    - Viewed (0)
  4. fastapi/openapi/docs.py

            Doc(
                """
                Load and use Google Fonts.
                """
            ),
        ] = True,
    ) -> HTMLResponse:
        """
        Generate and return the HTML response that loads ReDoc for the alternative
        API docs (normally served at `/redoc`).
    
        You would only call this function yourself if you needed to override some parts,
        for example the URLs to use to load ReDoc's JavaScript and CSS.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  5. docs/sts/web-identity.py

            allow_redirects=False, auth=(client_id, client_secret))
    
        print('body: ' + id_token_response.text)
    
        # we can now use the id_token as much as we want to access protected resources.
        tokens = json.loads(id_token_response.text)
        id_token = tokens['id_token']
    
        response = sts_client.assume_role_with_web_identity(
            RoleArn='arn:aws:iam::123456789012:user/svc-internal-api',
            RoleSessionName='test',
    Python
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Jul 28 01:37:51 GMT 2021
    - 2.9K bytes
    - Viewed (1)
  6. tests/test_tutorial/test_body/test_tutorial001_py310.py

                        "type": "type_error.dict",
                    }
                ]
            }
        )
    
    
    @needs_py310
    def test_other_exceptions(client: TestClient):
        with patch("json.loads", side_effect=Exception):
            response = client.post("/items/", json={"test": "test2"})
            assert response.status_code == 400, response.text
    
    
    @needs_py310
    def test_openapi_schema(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (1)
  7. tests/test_tutorial/test_body/test_tutorial001.py

                        "type": "type_error.dict",
                    }
                ]
            }
        )
    
    
    def test_other_exceptions(client: TestClient):
        with patch("json.loads", side_effect=Exception):
            response = client.post("/items/", json={"test": "test2"})
            assert response.status_code == 400, response.text
    
    
    def test_openapi_schema(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 14.7K bytes
    - Viewed (5)
  8. tensorflow/api_template.__init__.py

        if _os.path.exists(_plugin_dir):
          _ll.load_library(_plugin_dir)
          # Load Pluggable Device Library
          _ll.load_pluggable_device_library(_plugin_dir)
    
    if _os.getenv("TF_PLUGGABLE_DEVICE_LIBRARY_PATH", ""):
      _ll.load_pluggable_device_library(
          _os.getenv("TF_PLUGGABLE_DEVICE_LIBRARY_PATH")
      )
    
    # Add Keras module aliases
    _losses = _KerasLazyLoader(globals(), submodule="losses", name="losses")
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 05 06:27:59 GMT 2024
    - 6.7K bytes
    - Viewed (3)
  9. tests/test_dependency_contextmanager.py

        response = client.get("/context_b_bg")
        data = response.json()
        assert data["context_b"] == "started b"
        assert data["context_a"] == "started a"
        assert data["bg"] == "not set"
        middleware_state = json.loads(response.headers["x-state"])
        assert middleware_state["context_b"] == "finished b with a: started a"
        assert middleware_state["context_a"] == "finished a"
        assert middleware_state["bg"] == "not set"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_conditional_openapi/test_tutorial001.py

        importlib.reload(tutorial001)
    
        client = TestClient(tutorial001.app)
        return client
    
    
    @needs_pydanticv2
    def test_disable_openapi(monkeypatch):
        monkeypatch.setenv("OPENAPI_URL", "")
        # Load the client after setting the env var
        client = get_client()
        response = client.get("/openapi.json")
        assert response.status_code == 404, response.text
        response = client.get("/docs")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.8K bytes
    - Viewed (0)
Back to top