- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 526 for users4 (0.06 sec)
-
tests/test_tutorial/test_testing_dependencies/test_tutorial001_an.py
def test_override_in_users(): response = client.get("/users/") assert response.status_code == 200, response.text assert response.json() == { "message": "Hello Users!", "params": {"q": None, "skip": 5, "limit": 10}, } def test_override_in_users_with_q(): response = client.get("/users/?q=foo") assert response.status_code == 200, response.text
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.5K bytes - Viewed (0) -
docs/em/docs/tutorial/bigger-applications.md
๐น `items` ๐ โ๏ธ ๐ข `router` (`items.router`). ๐ ๐ 1๏ธโฃ ๐ฅ โ ๐ `app/routers/items.py`, โซ๏ธ `APIRouter` ๐. & โคด๏ธ ๐ฅ ๐ ๐น `users`. ๐ฅ ๐ช ๐ ๐ซ ๐: ```Python from app.routers import items, users ``` /// info ๐ฅ โฌ "โ ๐": ```Python from .routers import items, users ``` ๐ฅ โฌ "๐ ๐":
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 15.5K bytes - Viewed (0) -
tests/scan_test.go
} DB.Table("users").Select("id, name, age").Where("id = ?", user2.ID).Scan(&res) if res.ID != user2.ID || res.Name != user2.Name || res.Age != int(user2.Age) { t.Fatalf("Scan into struct should work, got %#v, should %#v", res, user2) } DB.Model(&User{Model: gorm.Model{ID: user3.ID}}).Select("id, name, age").Scan(&res) if res.ID != user3.ID || res.Name != user3.Name || res.Age != int(user3.Age) {
Registered: Sun Oct 27 09:35:08 UTC 2024 - Last Modified: Wed Jun 12 10:57:36 UTC 2024 - 10.9K bytes - Viewed (0) -
tests/test_security_oauth2_optional_description.py
"scopes": {"read:users": "Read the users", "write:users": "Create users"}, } }, description="OAuth2 security scheme", auto_error=False, ) class User(BaseModel): username: str def get_current_user(oauth_header: Optional[str] = Security(reusable_oauth2)): if oauth_header is None: return None user = User(username=oauth_header) return user
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.9K bytes - Viewed (0) -
docs/en/docs/tutorial/bigger-applications.md
โย ย โ โโโ users.py # "users" submodule, e.g. import app.routers.users โย ย โโโ internal # "internal" is a "Python subpackage" โย ย โโโ __init__.py # makes "internal" a "Python subpackage" โย ย โโโ admin.py # "admin" submodule, e.g. import app.internal.admin ``` ## `APIRouter` Let's say the file dedicated to handling just users is the submodule at `/app/routers/users.py`.
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 18.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an_py310.py
response = client.get( "/users/me", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 400, response.text assert response.json() == {"detail": "Inactive user"} @needs_py310 def test_read_items(client: TestClient): access_token = get_access_token(scope="me items", client=client) response = client.get(
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/connpool_test.go
"SELECT * FROM `users` WHERE name = ? AND `users`.`deleted_at` IS NULL ORDER BY `users`.`id` LIMIT ?", "SELECT * FROM `users` WHERE name = ? AND `users`.`deleted_at` IS NULL ORDER BY `users`.`id` LIMIT ?", "INSERT INTO `users` (`created_at`,`updated_at`,`deleted_at`,`name`,`age`,`birthday`,`company_id`,`manager_id`,`active`) VALUES (?,?,?,?,?,?,?,?,?)", "SELECT * FROM `users` WHERE name = ? AND `users`.`deleted_at` IS NULL ORDER BY `users`.`id` LIMIT ?",
Registered: Sun Oct 27 09:35:08 UTC 2024 - Last Modified: Tue Feb 06 02:54:40 UTC 2024 - 5.5K bytes - Viewed (0) -
tests/test_security_http_basic_realm_description.py
security = HTTPBasic(realm="simple", description="HTTPBasic scheme") @app.get("/users/me") def read_current_user(credentials: HTTPBasicCredentials = Security(security)): return {"username": credentials.username, "password": credentials.password} client = TestClient(app) def test_security_http_basic(): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.8K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an_py39.py
response = client.get( "/users/me", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 400, response.text assert response.json() == {"detail": "Inactive user"} @needs_py39 def test_read_items(client: TestClient): access_token = get_access_token(scope="me items", client=client) response = client.get(
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_security_oauth2.py
"tokenUrl": "token", "scopes": {"read:users": "Read the users", "write:users": "Create users"}, } } ) class User(BaseModel): username: str # Here we use string annotations to test them def get_current_user(oauth_header: "str" = Security(reusable_oauth2)): user = User(username=oauth_header) return user @app.post("/login") # Here we use string annotations to test them
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.7K bytes - Viewed (0)