Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 114 for Datetime (0.03 sec)

  1. docs/pt/docs/tutorial/encoder.md

    Vamos imaginar que você tenha um banco de dados `fake_db` que recebe apenas dados compatíveis com JSON.
    
    Por exemplo, ele não recebe objetos `datetime`, pois estes objetos não são compatíveis com JSON.
    
    Então, um objeto `datetime` teria que ser convertido em um `str` contendo os dados no <a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">formato ISO</a>.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  2. tests/test_webhooks_security.py

    from datetime import datetime
    from typing import Annotated
    
    from fastapi import FastAPI, Security
    from fastapi.security import HTTPBearer
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    bearer_scheme = HTTPBearer()
    
    
    class Subscription(BaseModel):
        username: str
        monthly_fee: float
        start_date: datetime
    
    
    @app.webhooks.post("new-subscription")
    def new_subscription(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  3. docs_src/security/tutorial005_py39.py

    from datetime import datetime, timedelta, timezone
    from typing import Union
    
    import jwt
    from fastapi import Depends, FastAPI, HTTPException, Security, status
    from fastapi.security import (
        OAuth2PasswordBearer,
        OAuth2PasswordRequestForm,
        SecurityScopes,
    )
    from jwt.exceptions import InvalidTokenError
    from pwdlib import PasswordHash
    from pydantic import BaseModel, ValidationError
    
    # to get a string like this run:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 02:57:38 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  4. docs/zh/docs/tutorial/encoder.md

    比如,如果您需要将其存储在数据库中。
    
    对于这种要求, **FastAPI**提供了`jsonable_encoder()`函数。
    
    ## 使用`jsonable_encoder`
    
    让我们假设你有一个数据库名为`fake_db`,它只能接收与JSON兼容的数据。
    
    例如,它不接收`datetime`这类的对象,因为这些对象与JSON不兼容。
    
    因此,`datetime`对象必须将转换为包含<a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">ISO格式化</a>的`str`类型对象。
    
    同样,这个数据库也不会接收Pydantic模型(带有属性的对象),而只接收`dict`。
    
    对此你可以使用`jsonable_encoder`。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  5. docs/ko/docs/tutorial/encoder.md

    예를 들면, 데이터베이스에 저장해야하는 경우입니다.
    
    이를 위해, **FastAPI** 에서는 `jsonable_encoder()` 함수를 제공합니다.
    
    ## `jsonable_encoder` 사용
    
    JSON 호환 가능 데이터만 수신하는 `fake_db` 데이터베이스가 존재한다고 가정하겠습니다.
    
    예를 들면, `datetime` 객체는 JSON과 호환되는 데이터가 아니므로 이 데이터는 받아들여지지 않습니다.
    
    따라서 `datetime` 객체는 <a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">ISO format</a> 데이터를 포함하는 `str`로 변환되어야 합니다.
    
    같은 방식으로 이 데이터베이스는 Pydantic 모델(속성이 있는 객체)을 받지 않고, `dict` 만을 받습니다.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  6. scripts/people.py

    import logging
    import secrets
    import subprocess
    import time
    from collections import Counter
    from collections.abc import Container
    from datetime import datetime, timedelta, timezone
    from pathlib import Path
    from typing import Any, Union
    
    import httpx
    import yaml
    from github import Github
    from pydantic import BaseModel, SecretStr
    from pydantic_settings import BaseSettings
    
    github_graphql_url = "https://api.github.com/graphql"
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  7. dbflute_fess/dfprop/databaseInfoMap.dfprop

    # | FLOAT         | java.math.BigDecimal | decimal?      |
    # | DOUBLE        | java.math.BigDecimal | decimal?      |
    # | DATE          | java.util.Date       | DateTime?     |
    # | TIME          | java.sql.Time        | DateTime?     |
    # | TIMESTAMP     | java.sql.Timestamp   | DateTime?     |
    # | BIT           | java.lang.Boolean    | bool?         |
    # | BOOLEAN       | java.lang.Boolean    | bool?         |
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Sat Oct 31 23:35:14 UTC 2015
    - 7.3K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_extra_data_types/test_tutorial001.py

                                "start_datetime": {
                                    "title": "Start Datetime",
                                    "type": "string",
                                    "format": "date-time",
                                },
                                "end_datetime": {
                                    "title": "End Datetime",
                                    "type": "string",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  9. fess-crawler/src/main/java/org/codelibs/fess/crawler/entity/SitemapFile.java

         * does not correspond to the time that any of the pages listed in that
         * Sitemap were changed. The value for the lastmod tag should be in W3C
         * Datetime format.
         *
         * By providing the last modification timestamp, you enable search engine
         * crawlers to retrieve only a subset of the Sitemaps in the index i.e. a
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Sun Jul 06 02:13:03 UTC 2025
    - 4.4K bytes
    - Viewed (1)
  10. docs/en/docs/tutorial/body-updates.md

    You can use the `jsonable_encoder` to convert the input data to data that can be stored as JSON (e.g. with a NoSQL database). For example, converting `datetime` to `str`.
    
    {* ../../docs_src/body_updates/tutorial001_py310.py hl[28:33] *}
    
    `PUT` is used to receive data that should replace the existing data.
    
    ### Warning about replacing { #warning-about-replacing }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 4.1K bytes
    - Viewed (0)
Back to top