- Sort Score
- Result 10 results
- Languages All
Results 11 - 19 of 19 for Account (0.2 sec)
-
tests/test_security_api_key_cookie_optional.py
user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: User = Depends(get_current_user)): if current_user is None: return {"msg": "Create an account first"} else: return current_user def test_security_api_key(): client = TestClient(app, cookies={"key": "secret"}) response = client.get("/users/me")
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.1K bytes - Viewed (0) -
tests/test_security_openid_connect_optional.py
return user @app.get("/users/me") def read_current_user(current_user: Optional[User] = Depends(get_current_user)): if current_user is None: return {"msg": "Create an account first"} return current_user client = TestClient(app) def test_security_oauth2(): response = client.get("/users/me", headers={"Authorization": "Bearer footokenbar"})
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.4K bytes - Viewed (0) -
tests/test_security_http_basic_optional.py
security = HTTPBasic(auto_error=False) @app.get("/users/me") def read_current_user(credentials: Optional[HTTPBasicCredentials] = Security(security)): if credentials is None: return {"msg": "Create an account first"} return {"username": credentials.username, "password": credentials.password} client = TestClient(app) def test_security_http_basic(): response = client.get("/users/me", auth=("john", "secret"))
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.6K bytes - Viewed (0) -
tests/test_dependency_cache.py
async def super_dep(count: int = Depends(dep_counter)): return count @app.get("/counter/") async def get_counter(count: int = Depends(dep_counter)): return {"counter": count} @app.get("/sub-counter/") async def get_sub_counter( subcount: int = Depends(super_dep), count: int = Depends(dep_counter) ): return {"counter": count, "subcounter": subcount}
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Tue Aug 23 13:30:24 GMT 2022 - 2.7K bytes - Viewed (0) -
ci/official/utilities/extract_resultstore_links.py
verbose: bool = False): """Creates a JUnit-based XML file, with each invocation as a testcase.""" 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')
Python - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Wed Nov 08 17:50:27 GMT 2023 - 10.9K bytes - Viewed (0) -
configure.py
# ROCm / CUDA are mutually exclusive. # At most 1 GPU platform can be configured. gpu_platform_count = 0 if environ_cp.get('TF_NEED_ROCM') == '1': gpu_platform_count += 1 if environ_cp.get('TF_NEED_CUDA') == '1': gpu_platform_count += 1 if gpu_platform_count >= 2: raise UserInputError('CUDA / ROCm are mututally exclusive. '
Python - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Mon Apr 15 18:25:36 GMT 2024 - 53.8K bytes - Viewed (0) -
.github/actions/people/app/main.py
skip_users: Container[str], min_count: int = 2, ): users = [] for commenter, count in counter.most_common(50): if commenter in skip_users: continue if count >= min_count: author = authors[commenter] users.append( { "login": commenter, "count": count,
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 17:38:21 GMT 2024 - 19.2K bytes - Viewed (1) -
tests/test_jsonable_encoder.py
def test_encode_dataclass(): item = Item(name="foo", count=100) assert jsonable_encoder(item) == {"name": "foo", "count": 100} assert jsonable_encoder(item, include={"name"}) == {"name": "foo"} assert jsonable_encoder(item, exclude={"count"}) == {"name": "foo"} assert jsonable_encoder(item, include={}) == {} assert jsonable_encoder(item, exclude={}) == {"name": "foo", "count": 100} def test_encode_unsupported():
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 9K bytes - Viewed (0) -
scripts/docs.py
""" update_languages() shutil.rmtree(site_path, ignore_errors=True) langs = [lang.name for lang in get_lang_paths() if lang.is_dir()] cpu_count = os.cpu_count() or 1 process_pool_size = cpu_count * 4 typer.echo(f"Using process pool size: {process_pool_size}") with Pool(process_pool_size) as p: p.map(build_lang, langs) @app.command()
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Mon Jan 22 19:26:14 GMT 2024 - 10.9K bytes - Viewed (1)