- Sort Score
- Result 10 results
- Languages All
Results 661 - 670 of 2,381 for apps (0.04 sec)
-
docs_src/background_tasks/tutorial002_an.py
from typing_extensions import Annotated 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: Union[str, None] = None): if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q @app.post("/send-notification/{email}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 725 bytes - Viewed (0) -
docs_src/security/tutorial002_an_py39.py
from typing import Annotated, Union from fastapi import Depends, FastAPI from fastapi.security import OAuth2PasswordBearer from pydantic import BaseModel app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") class User(BaseModel): username: str email: Union[str, None] = None full_name: Union[str, None] = None disabled: Union[bool, None] = None def fake_decode_token(token):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 786 bytes - Viewed (0) -
docs_src/security/tutorial007.py
import secrets from fastapi import Depends, FastAPI, HTTPException, status from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI() security = HTTPBasic() def get_current_username(credentials: HTTPBasicCredentials = Depends(security)): current_username_bytes = credentials.username.encode("utf8") correct_username_bytes = b"stanleyjobson" is_correct_username = secrets.compare_digest(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jan 11 14:33:05 UTC 2024 - 1.1K bytes - Viewed (0) -
tests/test_tutorial/test_first_steps/test_tutorial001.py
import pytest from fastapi.testclient import TestClient from docs_src.first_steps.tutorial001 import app client = TestClient(app) @pytest.mark.parametrize( "path,expected_status,expected_response", [ ("/", 200, {"message": "Hello World"}), ("/nonexistent", 404, {"detail": "Not Found"}), ], ) def test_get_path(path, expected_status, expected_response): response = client.get(path)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.2K bytes - Viewed (0) -
docs_src/extra_models/tutorial002.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel, EmailStr app = FastAPI() class UserBase(BaseModel): username: str email: EmailStr full_name: Union[str, None] = None class UserIn(UserBase): password: str class UserOut(UserBase): pass class UserInDB(UserBase): hashed_password: str def fake_password_hasher(raw_password: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 824 bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/fileconfig/ApiAdminFileconfigAction.java
import org.codelibs.fess.Constants; import org.codelibs.fess.app.pager.FileConfigPager; import org.codelibs.fess.app.service.FileConfigService; import org.codelibs.fess.app.web.CrudMode; import org.codelibs.fess.app.web.api.ApiResult; import org.codelibs.fess.app.web.api.ApiResult.ApiConfigResponse; import org.codelibs.fess.app.web.api.ApiResult.ApiResponse; import org.codelibs.fess.app.web.api.ApiResult.ApiUpdateResponse;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 7K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/general/ApiAdminGeneralAction.java
*/ package org.codelibs.fess.app.web.api.admin.general; import org.codelibs.core.beans.util.BeanUtil; import org.codelibs.core.beans.util.CopyOptions; import org.codelibs.core.misc.DynamicProperties; import org.codelibs.fess.app.web.admin.general.AdminGeneralAction; import org.codelibs.fess.app.web.api.ApiResult; import org.codelibs.fess.app.web.api.ApiResult.ApiConfigResponse;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 2.6K bytes - Viewed (0) -
CONTRIBUTING.md
3. Pull requests are not merged directly into the master branch. 4. Code contributions require signing a Google CLA. API changes ----------- We make changes to Guava's public [APIs][], including adding new APIs, very carefully. Because of this, if you're interested in seeing a new feature in Guava, the best approach is to create an [issue][] (or comment on an existing
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Nov 17 18:47:47 UTC 2023 - 3.7K bytes - Viewed (0) -
docs_src/response_model/tutorial001_py310.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: list[str] = [] @app.post("/items/", response_model=Item) async def create_item(item: Item) -> Any: return item @app.get("/items/", response_model=list[Item]) async def read_items() -> Any:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 07 13:45:48 UTC 2023 - 537 bytes - Viewed (0) -
tests/test_default_response_class.py
router_a.include_router( router_a_b_override, prefix="/b", default_response_class=PlainTextResponse ) app.include_router(router_a, prefix="/a") app.include_router( router_b_override, prefix="/b", default_response_class=PlainTextResponse ) client = TestClient(app) orjson_type = "application/x-orjson" text_type = "text/plain; charset=utf-8" html_type = "text/html; charset=utf-8"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Mar 01 20:49:20 UTC 2020 - 5.2K bytes - Viewed (0)