- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 43 for first (0.17 sec)
-
docs_src/sql_databases/sql_app_py310/crud.py
from . import models, schemas def get_user(db: Session, user_id: int): return db.query(models.User).filter(models.User.id == user_id).first() def get_user_by_email(db: Session, email: str): return db.query(models.User).filter(models.User.email == email).first() def get_users(db: Session, skip: int = 0, limit: int = 100): return db.query(models.User).offset(skip).limit(limit).all()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1K bytes - Viewed (0) -
.github/actions/people/app/main.py
repository(name: "fastapi", owner: "tiangolo") { discussions(first: 100, after: $after, categoryId: $category_id) { edges { cursor node { number author { login avatarUrl url } title createdAt comments(first: 100) { nodes { createdAt author {
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 17:38:21 GMT 2024 - 19.2K bytes - Viewed (1) -
tests/test_security_http_base_optional.py
@app.get("/users/me") def read_current_user( credentials: Optional[HTTPAuthorizationCredentials] = Security(security), ): if credentials is None: return {"msg": "Create an account first"} return {"scheme": credentials.scheme, "credentials": credentials.credentials} client = TestClient(app) def test_security_http_base():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.9K bytes - Viewed (0) -
tests/test_security_api_key_query_optional.py
return user @app.get("/users/me") def read_current_user(current_user: Optional[User] = Depends(get_current_user)): if current_user is None: return {"msg": "Create an account first"} return current_user client = TestClient(app) def test_security_api_key(): response = client.get("/users/me?key=secret") assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2K bytes - Viewed (0) -
docs/extensions/s3zip/examples/boto3/main.py
region_name='us-east-1') def _add_header(request, **kwargs): request.headers.add_header('x-minio-extract', 'true') event_system = s3.meta.events event_system.register_first('before-sign.s3.*', _add_header) # List zip contents response = s3.list_objects_v2(Bucket="your-bucket", Prefix="path/to/file.zip/") print(response) # Download data.csv stored in the zip file
Python - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Wed Aug 04 21:15:45 GMT 2021 - 771 bytes - Viewed (0) -
.github/actions/notify-translations/app/main.py
all_discussions_query = """ query Q($category_id: ID) { repository(name: "fastapi", owner: "tiangolo") { discussions(categoryId: $category_id, first: 100) { nodes { title id number labels(first: 10) { edges { node { id name } } } } } } } """
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Sep 27 23:01:46 GMT 2023 - 12.4K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases.py
@needs_pydanticv1 def test_read_items(client): response = client.get("/items/") assert response.status_code == 200, response.text data = response.json() assert data first_item = data[0] assert "title" in first_item assert "description" in first_item # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_openapi_schema(client: TestClient): response = client.get("/openapi.json")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.1K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py
@needs_pydanticv1 def test_read_items(client): response = client.get("/items/") assert response.status_code == 200, response.text data = response.json() assert data first_item = data[0] assert "title" in first_item assert "description" in first_item @needs_py310 # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_openapi_schema(client: TestClient):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
tests/test_security_oauth2_optional.py
return form_data @app.get("/users/me") def read_users_me(current_user: Optional[User] = Depends(get_current_user)): if current_user is None: return {"msg": "Create an account first"} return current_user client = TestClient(app) def test_security_oauth2(): response = client.get("/users/me", headers={"Authorization": "Bearer footokenbar"})
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 10.8K bytes - Viewed (0) -
docs_src/sql_databases_peewee/sql_app/crud.py
from . import models, schemas def get_user(user_id: int): return models.User.filter(models.User.id == user_id).first() def get_user_by_email(email: str): return models.User.filter(models.User.email == email).first() def get_users(skip: int = 0, limit: int = 100): return list(models.User.select().offset(skip).limit(limit)) def create_user(user: schemas.UserCreate):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 843 bytes - Viewed (0)