- Sort Score
- Result 10 results
- Languages All
Results 4821 - 4830 of 7,238 for importOf (0.07 sec)
-
docs_src/dependency_testing/tutorial001_an_py39.py
from typing import Annotated, Union from fastapi import Depends, FastAPI from fastapi.testclient import TestClient app = FastAPI() async def common_parameters( q: Union[str, None] = None, skip: int = 0, limit: int = 100 ): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Items!", "params": commons}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedInputs.java
* the License. */ package com.google.common.util.concurrent; import static com.google.common.util.concurrent.Futures.immediateFailedFuture; import com.google.common.annotations.GwtCompatible; import java.util.concurrent.Future; import javax.annotation.CheckForNull; /** * Classes and futures used in {@link FuturesGetCheckedTest} and {@link FuturesGetUncheckedTest}. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 13:46:56 UTC 2023 - 6.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheManualTest.java
* the License. */ package com.google.common.cache; import static java.util.Arrays.asList; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import junit.framework.TestCase; /** @author Charles Fry */ public class CacheManualTest extends TestCase { public void testGetIfPresent() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 5.4K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb1/com/SmbComWriteAndX.java
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcifs.internal.smb1.com; import jcifs.Configuration; import jcifs.internal.smb1.AndXServerMessageBlock; import jcifs.internal.smb1.ServerMessageBlock; import jcifs.internal.util.SMBUtil; /** * */ public class SmbComWriteAndX extends AndXServerMessageBlock {
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 5.1K bytes - Viewed (0) -
docs_src/dependencies/tutorial008c_an.py
from fastapi import Depends, FastAPI, HTTPException from typing_extensions import Annotated app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun":
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 710 bytes - Viewed (0) -
docs_src/extending_openapi/tutorial001.py
from fastapi import FastAPI from fastapi.openapi.utils import get_openapi app = FastAPI() @app.get("/items/") async def read_items(): return [{"name": "Foo"}] def custom_openapi(): if app.openapi_schema: return app.openapi_schema openapi_schema = get_openapi( title="Custom title", version="2.5.0", summary="This is a very custom OpenAPI schema",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 737 bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_an_py310.py
from typing import Annotated from fastapi import BackgroundTasks, Depends, FastAPI app = FastAPI() def write_log(message: str): with open("log.txt", mode="a") as log: log.write(message) def get_query(background_tasks: BackgroundTasks, q: str | None = None): if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 683 bytes - Viewed (0) -
tests/test_openapi_route_extensions.py
from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI() @app.get("/", openapi_extra={"x-custom-extension": "value"}) def route_with_extras(): return {} client = TestClient(app) def test_get_route(): response = client.get("/") assert response.status_code == 200, response.text assert response.json() == {} def test_openapi():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.1K bytes - Viewed (0) -
tests/test_swagger_ui_init_oauth.py
from fastapi import FastAPI from fastapi.testclient import TestClient swagger_ui_init_oauth = {"clientId": "the-foo-clients", "appName": "The Predendapp"} app = FastAPI(swagger_ui_init_oauth=swagger_ui_init_oauth) @app.get("/items/") async def read_items(): return {"id": "foo"} client = TestClient(app) def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Aug 09 10:54:05 UTC 2020 - 718 bytes - Viewed (0) -
android/guava/src/com/google/common/net/InternetDomainName.java
import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.Immutable; import com.google.errorprone.annotations.concurrent.LazyInit; import com.google.thirdparty.publicsuffix.PublicSuffixPatterns; import com.google.thirdparty.publicsuffix.PublicSuffixType; import java.util.List; import javax.annotation.CheckForNull;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Feb 05 20:47:23 UTC 2024 - 28K bytes - Viewed (0)