- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 30 for timedelta (0.07 seconds)
-
docs_src/security/tutorial005_an_py310.py
return False return user def create_access_token(data: dict, expires_delta: timedelta | None = None): to_encode = data.copy() if expires_delta: expire = datetime.now(timezone.utc) + expires_delta else: expire = datetime.now(timezone.utc) + timedelta(minutes=15) to_encode.update({"exp": expire}) encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 18:10:35 GMT 2026 - 5.4K bytes - Click Count (0) -
docs_src/security/tutorial004_py310.py
return False return user def create_access_token(data: dict, expires_delta: timedelta | None = None): to_encode = data.copy() if expires_delta: expire = datetime.now(timezone.utc) + expires_delta else: expire = datetime.now(timezone.utc) + timedelta(minutes=15) to_encode.update({"exp": expire}) encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 18:10:35 GMT 2026 - 4.1K bytes - Click Count (0) -
docs_src/security/tutorial005_py310.py
return False return user def create_access_token(data: dict, expires_delta: timedelta | None = None): to_encode = data.copy() if expires_delta: expire = datetime.now(timezone.utc) + expires_delta else: expire = datetime.now(timezone.utc) + timedelta(minutes=15) to_encode.update({"exp": expire}) encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 18:10:35 GMT 2026 - 5.3K bytes - Click Count (0) -
docs_src/security/tutorial004_an_py310.py
return False return user def create_access_token(data: dict, expires_delta: timedelta | None = None): to_encode = data.copy() if expires_delta: expire = datetime.now(timezone.utc) + expires_delta else: expire = datetime.now(timezone.utc) + timedelta(minutes=15) to_encode.update({"exp": expire}) encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 18:10:35 GMT 2026 - 4.2K bytes - Click Count (0) -
scripts/people.py
one_year_commenters = Counter[str]() authors: dict[str, Author] = {} now = datetime.now(tz=timezone.utc) one_month_ago = now - timedelta(days=30) three_months_ago = now - timedelta(days=90) six_months_ago = now - timedelta(days=180) one_year_ago = now - timedelta(days=365) for discussion in discussion_nodes: discussion_author_name = None if discussion.author:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Mar 23 13:51:24 GMT 2026 - 15K bytes - Click Count (0) -
docs/en/docs/tutorial/security/oauth2-jwt.md
If the token is invalid, return an HTTP error right away. {* ../../docs_src/security/tutorial004_an_py310.py hl[93:110] *} ## Update the `/token` *path operation* { #update-the-token-path-operation } Create a `timedelta` with the expiration time of the token. Create a real JWT access token and return it. {* ../../docs_src/security/tutorial004_an_py310.py hl[121:136] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 10.7K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/security/oauth2-jwt.md
解碼收到的權杖、驗證它,並回傳目前的使用者。 如果權杖無效,立即回傳一個 HTTP 錯誤。 {* ../../docs_src/security/tutorial004_an_py310.py hl[93:110] *} ## 更新 `/token` 路徑操作 { #update-the-token-path-operation } 用權杖有效期建立一個 `timedelta`。 建立真正的 JWT access token 並回傳它。 {* ../../docs_src/security/tutorial004_an_py310.py hl[121:136] *} ### 關於 JWT「主體」`sub` 的技術細節 { #technical-details-about-the-jwt-subject-sub }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 10.1K bytes - Click Count (0) -
docs/zh/docs/tutorial/security/oauth2-jwt.md
解码接收到的令牌,进行校验,并返回当前用户。 如果令牌无效,立即返回一个 HTTP 错误。 {* ../../docs_src/security/tutorial004_an_py310.py hl[93:110] *} ## 更新 `/token` 路径操作 { #update-the-token-path-operation } 用令牌的过期时间创建一个 `timedelta`。 创建一个真正的 JWT 访问令牌并返回它。 {* ../../docs_src/security/tutorial004_an_py310.py hl[121:136] *} ### 关于 JWT “主题” `sub` 的技术细节 { #technical-details-about-the-jwt-subject-sub }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 10.1K bytes - Click Count (0) -
docs/ja/docs/tutorial/security/oauth2-jwt.md
受け取ったトークンをデコードして検証し、現在のユーザーを返します。 トークンが無効な場合は、すぐにHTTPエラーを返します。 {* ../../docs_src/security/tutorial004_an_py310.py hl[93:110] *} ## `/token` *path operation* の更新 { #update-the-token-path-operation } トークンの有効期限を表す`timedelta`を作成します。 実際のJWTアクセストークンを作成し、それを返します。 {* ../../docs_src/security/tutorial004_an_py310.py hl[121:136] *} ### JWTの「subject」`sub` についての技術的な詳細 { #technical-details-about-the-jwt-subject-sub }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 14.6K bytes - Click Count (1) -
docs/tr/docs/tutorial/extra-data-types.md
* `datetime.time`: * Python `datetime.time`. * request'lerde ve response'larda ISO 8601 formatında bir `str` olarak temsil edilir, örn: `14:23:55.003`. * `datetime.timedelta`: * Python `datetime.timedelta`. * request'lerde ve response'larda toplam saniye sayısını ifade eden bir `float` olarak temsil edilir.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 2.8K bytes - Click Count (0)