- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 1,976 for Fastapi (0.1 sec)
-
tests/test_fastapi_cli.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 02 06:03:05 UTC 2024 - 790 bytes - Viewed (0) -
docs_src/response_directly/tutorial001.py
from datetime import datetime from typing import Union from fastapi import FastAPI from fastapi.encoders import jsonable_encoder from fastapi.responses import JSONResponse from pydantic import BaseModel class Item(BaseModel): title: str timestamp: datetime description: Union[str, None] = None app = FastAPI() @app.put("/items/{id}") def update_item(id: str, item: Item):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 505 bytes - Viewed (0) -
docs/es/docs/how-to/graphql.md
Aquí hay algunas de las libraries de **GraphQL** que tienen soporte con **ASGI** las cuales podrías usar con **FastAPI**: * <a href="https://strawberry.rocks/" class="external-link" target="_blank">Strawberry</a> 🍓 * Con <a href="https://strawberry.rocks/docs/integrations/fastapi" class="external-link" target="_blank">documentación para FastAPI</a> * <a href="https://ariadnegraphql.org/" class="external-link" target="_blank">Ariadne</a>
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.5K bytes - Viewed (0) -
tests/test_security_api_key_query_description.py
from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyQuery from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyQuery(name="key", description="API Key Query") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(api_key)): user = User(username=oauth_header) return user @app.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_security_http_base_optional.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security.http import HTTPAuthorizationCredentials, HTTPBase from fastapi.testclient import TestClient app = FastAPI() security = HTTPBase(scheme="Other", auto_error=False) @app.get("/users/me") def read_current_user( credentials: Optional[HTTPAuthorizationCredentials] = Security(security), ): if credentials is None:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.9K bytes - Viewed (0) -
tests/test_security_http_digest.py
from fastapi import FastAPI, Security from fastapi.security import HTTPAuthorizationCredentials, HTTPDigest from fastapi.testclient import TestClient app = FastAPI() security = HTTPDigest() @app.get("/users/me") def read_current_user(credentials: HTTPAuthorizationCredentials = Security(security)): return {"scheme": credentials.scheme, "credentials": credentials.credentials} client = TestClient(app)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import OAuth2AuthorizationCodeBearer from fastapi.testclient import TestClient app = FastAPI() oauth2_scheme = OAuth2AuthorizationCodeBearer( authorizationUrl="authorize", tokenUrl="token", auto_error=True ) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): return {"token": token}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0) -
tests/test_security_http_bearer_optional.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer from fastapi.testclient import TestClient app = FastAPI() security = HTTPBearer(auto_error=False) @app.get("/users/me") def read_current_user( credentials: Optional[HTTPAuthorizationCredentials] = Security(security), ): if credentials is None:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer_description.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import OAuth2AuthorizationCodeBearer from fastapi.testclient import TestClient app = FastAPI() oauth2_scheme = OAuth2AuthorizationCodeBearer( authorizationUrl="authorize", tokenUrl="token", description="OAuth2 Code Bearer", auto_error=True, ) @app.get("/items/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.4K bytes - Viewed (0) -
tests/test_security_oauth2_password_bearer_optional.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import OAuth2PasswordBearer from fastapi.testclient import TestClient app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token", auto_error=False) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): if token is None: return {"msg": "Create an account first"} return {"token": token}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0)