- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 113 for rapide (0.03 sec)
-
docs/uk/docs/tutorial/handling-errors.md
Перевага використання `генерації` (raise) помилки замість `повернення` значення (return) стане більш очевидним в розділі про Залежності та Безпеку. У цьому прикладі, якщо клієнт запитує елемент за ID, якого не існує, буде згенеровано помилку зі статус-кодом `404`:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 13.9K bytes - Viewed (0) -
docs/pt/docs/tutorial/bigger-applications.md
/// ### Importe as dependências { #import-the-dependencies } Este código reside no módulo `app.routers.items`, o arquivo `app/routers/items.py`. E precisamos obter a função de dependência do módulo `app.dependencies`, o arquivo `app/dependencies.py`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 20:32:40 UTC 2025 - 19.7K bytes - Viewed (0) -
docs_src/security/tutorial007_py39.py
correct_password_bytes = b"swordfish" is_correct_password = secrets.compare_digest( current_password_bytes, correct_password_bytes ) if not (is_correct_username and is_correct_password): raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Incorrect username or password", headers={"WWW-Authenticate": "Basic"}, ) return credentials.username
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.1K bytes - Viewed (0) -
docs/es/docs/advanced/security/oauth2-scopes.md
Esos detalles son específicos de la implementación. Para OAuth2 son solo strings. /// ## Vista global { #global-view }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 10:15:01 UTC 2025 - 14.2K bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial002_an_py310.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 974 bytes - Viewed (0) -
tests/test_empty_router.py
assert response.status_code == 200, response.text assert response.json() == ["OK"] def test_include_empty(): # if both include and router.path are empty - it should raise exception with pytest.raises(FastAPIError):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Jun 11 22:37:34 UTC 2023 - 805 bytes - Viewed (1) -
docs_src/query_params_str_validations/tutorial015_an_py39.py
"isbn-9781439512982": "Isaac Asimov: The Complete Stories, Vol. 2", } def check_valid_id(id: str): if not id.startswith(("isbn-", "imdb-")): raise ValueError('Invalid ID format, it must start with "isbn-" or "imdb-"') return id @app.get("/items/") async def read_items( id: Annotated[Union[str, None], AfterValidator(check_valid_id)] = None, ):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 01 22:02:35 UTC 2025 - 781 bytes - Viewed (0) -
tests/test_additional_responses_bad.py
"/a": { "get": { "responses": { # this is how one would imagine the openapi schema to be # but since the key is not valid, openapi.utils.get_openapi will raise ValueError "hello": {"description": "Not a valid additional response"}, "200": { "description": "Successful Response",Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.1K bytes - Viewed (0) -
docs_src/dependencies/tutorial013_an_py310.py
with Session(engine) as session: yield session def get_user(user_id: int, session: Annotated[Session, Depends(get_session)]): user = session.get(User, user_id) if not user: raise HTTPException(status_code=403, detail="Not authorized") def generate_stream(query: str): for ch in query: yield ch time.sleep(0.1) @app.get("/generate", dependencies=[Depends(get_user)])
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Sep 29 03:29:38 UTC 2025 - 937 bytes - Viewed (0) -
docs/es/docs/advanced/generate-clients.md
### Hey API { #hey-api } Una vez que tenemos una app de FastAPI con los modelos, podemos usar Hey API para generar un cliente de TypeScript. La forma más rápida de hacerlo es con npx. ```sh npx @hey-api/openapi-ts -i http://localhost:8000/openapi.json -o src/client ``` Esto generará un SDK de TypeScript en `./src/client`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 10.8K bytes - Viewed (0)