Search Options

Results per page
Sort
Preferred Languages
Advance

Results 2191 - 2200 of 3,913 for getE (0.04 sec)

  1. docs_src/dependencies/tutorial004.py

    
    class CommonQueryParams:
        def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100):
            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: CommonQueryParams = Depends()):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 639 bytes
    - Viewed (0)
  2. docs_src/response_model/tutorial004_py39.py

        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item, response_model_exclude_unset=True)
    async def read_item(item_id: str):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 627 bytes
    - Viewed (0)
  3. docs_src/dependencies/tutorial008c.py

    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: str = Depends(get_username)):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 660 bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilCommon.kt

     * limitations under the License.
     */
    package okhttp3
    
    import okio.Buffer
    import okio.Path
    import okio.Path.Companion.toPath
    
    val okHttpRoot: Path
      get() = getEnv("OKHTTP_ROOT")!!.toPath()
    
    fun String(vararg codePoints: Int): String {
      val buffer = Buffer()
      for (codePoint in codePoints) {
        buffer.writeUtf8CodePoint(codePoint)
      }
      return buffer.readUtf8()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Dec 20 23:27:07 UTC 2023
    - 931 bytes
    - Viewed (0)
  5. scripts/playwright/request_form_models/image01.py

        browser.close()
    
    
    process = subprocess.Popen(
        ["fastapi", "run", "docs_src/request_form_models/tutorial001.py"]
    )
    try:
        for _ in range(3):
            try:
                response = httpx.get("http://localhost:8000/docs")
            except httpx.ConnectError:
                time.sleep(1)
                break
        with sync_playwright() as playwright:
            run(playwright)
    finally:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 13 09:14:46 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  6. docs_src/app_testing/app_b_py310/main.py

        "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"},
    }
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        id: str
        title: str
        description: str | None = None
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_main(item_id: str, x_token: str = Header()):
        if x_token != fake_secret_token:
            raise HTTPException(status_code=400, detail="Invalid X-Token header")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Jan 09 14:44:08 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  7. build-logic/documentation/src/main/groovy/gradlebuild/docs/model/ClassMetaDataRepository.java

     * limitations under the License.
     */
    package gradlebuild.docs.model;
    
    import groovy.lang.Closure;
    import org.gradle.api.UnknownDomainObjectException;
    
    public interface ClassMetaDataRepository<T> {
        T get(String fullyQualifiedClassName) throws UnknownDomainObjectException;
    
        T find(String fullyQualifiedClassName);
    
        void put(String fullyQualifiedClassName, T metaData);
    
        void each(Closure cl);
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 989 bytes
    - Viewed (0)
  8. scripts/playwright/cookie_param_models/image01.py

        browser.close()
    
    
    process = subprocess.Popen(
        ["fastapi", "run", "docs_src/cookie_param_models/tutorial001.py"]
    )
    try:
        for _ in range(3):
            try:
                response = httpx.get("http://localhost:8000/docs")
            except httpx.ConnectError:
                time.sleep(1)
                break
        with sync_playwright() as playwright:
            run(playwright)
    finally:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  9. build-logic/build-update-utils/src/main/kotlin/gradlebuild.wrapper.gradle.kts

                val versionInfo = Gson().fromJson(jsonText, VersionDownloadInfo::class.java)
                println("updating wrapper to $label version: ${versionInfo.version} (downloadUrl: ${versionInfo.downloadUrl})")
                wrapperTask.get().distributionUrl = versionInfo.downloadUrl
            }
        }
    }
    
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Tue Sep 17 08:58:33 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  10. docs/en/docs/reference/parameters.md

    # Request Parameters
    
    Here's the reference information for the request parameters.
    
    These are the special functions that you can put in *path operation function* parameters or dependency functions with `Annotated` to get data from the request.
    
    It includes:
    
    * `Query()`
    * `Path()`
    * `Body()`
    * `Cookie()`
    * `Header()`
    * `Form()`
    * `File()`
    
    You can import them all directly from `fastapi`:
    
    ```python
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 603 bytes
    - Viewed (0)
Back to top