- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 53 for keys (0.15 sec)
-
scripts/docs.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Jan 22 19:26:14 GMT 2024 - 10.9K bytes - Viewed (1) -
bin/diff_yaml.py
common = k0s.intersection(k1s) return added, removed, common def drop_keys(res, k1, k2): if k2 in res[k1]: del res[k1][k2] def normalize_configmap(res): try: if res['kind'] != "ConfigMap": return res data = res['data'] # some times keys are yamls... # so parse them for k in data: try:
Python - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Wed Mar 03 16:14:57 GMT 2021 - 4.5K bytes - Viewed (0) -
fastapi/encoders.py
encoded_dict = {} allowed_keys = set(obj.keys()) if include is not None: allowed_keys &= set(include) if exclude is not None: allowed_keys -= set(exclude) for key, value in obj.items(): if ( ( not sqlalchemy_safe or (not isinstance(key, str)) or (not key.startswith("_sa"))
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 10.8K bytes - Viewed (0) -
tests/test_orjson_response_class.py
app = FastAPI(default_response_class=ORJSONResponse) @app.get("/orjson_non_str_keys") def get_orjson_non_str_keys(): key = quoted_name(value="msg", quote=False) return {key: "Hello World", 1: 1} client = TestClient(app) def test_orjson_non_str_keys(): with client: response = client.get("/orjson_non_str_keys")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Sep 02 10:17:31 GMT 2022 - 562 bytes - Viewed (0) -
fastapi/responses.py
""" def render(self, content: Any) -> bytes: assert orjson is not None, "orjson must be installed to use ORJSONResponse" return orjson.dumps( content, option=orjson.OPT_NON_STR_KEYS | orjson.OPT_SERIALIZE_NUMPY
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Oct 18 12:36:40 GMT 2023 - 1.7K bytes - Viewed (0) -
.github/actions/people/app/main.py
authors=authors, skip_users=skip_users, ) tiers = get_individual_sponsors(settings=settings) keys = list(tiers.keys()) keys.sort(reverse=True) sponsors = [] for key in keys: sponsor_group = [] for login, sponsor in tiers[key].items(): sponsor_group.append( {"login": login, "avatarUrl": sponsor.avatarUrl, "url": sponsor.url}
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 17:38:21 GMT 2024 - 19.2K bytes - Viewed (1) -
fastapi/security/api_key.py
The dependency result will be a string containing the key value. ## Example ```python from fastapi import Depends, FastAPI from fastapi.security import APIKeyQuery app = FastAPI() query_scheme = APIKeyQuery(name="api_key") @app.get("/items/") async def read_items(api_key: str = Depends(query_scheme)): return {"api_key": api_key} ``` """ def __init__(
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 23 22:29:18 GMT 2024 - 9.1K bytes - Viewed (0) -
tests/test_security_api_key_query.py
return current_user client = TestClient(app) def test_security_api_key(): response = client.get("/users/me?key=secret") assert response.status_code == 200, response.text assert response.json() == {"username": "secret"} def test_security_api_key_no_key(): response = client.get("/users/me") assert response.status_code == 403, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.8K bytes - Viewed (0) -
tests/test_security_api_key_cookie_description.py
from fastapi.security import APIKeyCookie from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyCookie(name="key", description="An API Cookie Key") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(api_key)): user = User(username=oauth_header) return user @app.get("/users/me")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.1K bytes - Viewed (0) -
tests/test_security_api_key_cookie_optional.py
else: return current_user def test_security_api_key(): client = TestClient(app, cookies={"key": "secret"}) response = client.get("/users/me") assert response.status_code == 200, response.text assert response.json() == {"username": "secret"} def test_security_api_key_no_key(): client = TestClient(app) response = client.get("/users/me")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.1K bytes - Viewed (0)