Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 136 for DateTime (0.21 sec)

  1. 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` 만을 받습니다.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Dec 08 15:43:31 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  2. docs_src/openapi_webhooks/tutorial001.py

    from datetime import datetime
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Subscription(BaseModel):
        username: str
        monthly_fee: float
        start_date: datetime
    
    
    @app.webhooks.post("new-subscription")
    def new_subscription(body: Subscription):
        """
        When a new user subscribes to your service we'll send you a POST request with this
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Oct 20 09:00:44 GMT 2023
    - 550 bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/encoder.md

    ## Usando a função `jsonable_encoder`
    
    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 formato  <a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">ISO</a>.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/encoder.md

    🖼, 🚥 👆 💪 🏪 ⚫️ 💽.
    
    👈, **FastAPI** 🚚 `jsonable_encoder()` 🔢.
    
    ## ⚙️ `jsonable_encoder`
    
    ➡️ 🌈 👈 👆 ✔️ 💽 `fake_db` 👈 🕴 📨 🎻 🔗 💽.
    
    🖼, ⚫️ 🚫 📨 `datetime` 🎚, 👈 🚫 🔗 ⏮️ 🎻.
    
    , `datetime` 🎚 🔜 ✔️ 🗜 `str` ⚗ 💽 <a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">💾 📁</a>.
    
    🎏 🌌, 👉 💽 🚫🔜 📨 Pydantic 🏷 (🎚 ⏮️ 🔢), 🕴 `dict`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  5. docs_src/security/tutorial005.py

    from datetime import datetime, timedelta, timezone
    from typing import List, Union
    
    from fastapi import Depends, FastAPI, HTTPException, Security, status
    from fastapi.security import (
        OAuth2PasswordBearer,
        OAuth2PasswordRequestForm,
        SecurityScopes,
    )
    from jose import JWTError, jwt
    from passlib.context import CryptContext
    from pydantic import BaseModel, ValidationError
    
    # to get a string like this run:
    # openssl rand -hex 32
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  6. docs_src/security/tutorial005_an_py39.py

    from datetime import datetime, timedelta, timezone
    from typing import Annotated, List, Union
    
    from fastapi import Depends, FastAPI, HTTPException, Security, status
    from fastapi.security import (
        OAuth2PasswordBearer,
        OAuth2PasswordRequestForm,
        SecurityScopes,
    )
    from jose import JWTError, jwt
    from passlib.context import CryptContext
    from pydantic import BaseModel, ValidationError
    
    # to get a string like this run:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  7. docs_src/security/tutorial005_py39.py

    from datetime import datetime, timedelta, timezone
    from typing import Union
    
    from fastapi import Depends, FastAPI, HTTPException, Security, status
    from fastapi.security import (
        OAuth2PasswordBearer,
        OAuth2PasswordRequestForm,
        SecurityScopes,
    )
    from jose import JWTError, jwt
    from passlib.context import CryptContext
    from pydantic import BaseModel, ValidationError
    
    # to get a string like this run:
    # openssl rand -hex 32
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  8. dbflute_fess/playsql/_readme.txt

    - - - - - - - - - -/
    
    The defaultValueMap.dataprop is for common columns like this:
    /- - - - - - - - - - - - - - - - - - - -
    map:{
        ; REGISTER_DATETIME = sysdate
        ; REGISTER_USER     = foo
        ; REGISTER_PROCESS  = bar
        ; UPDATE_DATETIME   = sysdate
        ; UPDATE_USER       = foo
        ; UPDATE_PROCESS    = bar
        ; VERSION_NO        = 0
    }
    Plain Text
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Sat Jul 04 22:46:31 GMT 2015
    - 1.3K bytes
    - Viewed (0)
  9. .github/actions/people/app/main.py

    import logging
    import subprocess
    import sys
    from collections import Counter, defaultdict
    from datetime import datetime, timedelta, timezone
    from pathlib import Path
    from typing import Any, Container, DefaultDict, Dict, List, Set, 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"
    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)
  10. docs/en/docs/tutorial/encoder.md

    ## Using the `jsonable_encoder`
    
    Let's imagine that you have a database `fake_db` that only receives JSON compatible data.
    
    For example, it doesn't receive `datetime` objects, as those are not compatible with JSON.
    
    So, a `datetime` object would have to be converted to a `str` containing the data in <a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">ISO format</a>.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 1.8K bytes
    - Viewed (0)
Back to top