Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1181 - 1190 of 1,977 for Fastapi (0.1 sec)

  1. docs/zh/docs/features.md

    * 用于生产应用。
    
    ## Starlette 特性
    
    **FastAPI** 和 <a href="https://www.starlette.io/" class="external-link" target="_blank"><strong>Starlette</strong></a> 完全兼容(并基于)。所以,你有的其他的 Starlette 代码也能正常工作。`FastAPI` 实际上是 `Starlette`的一个子类。所以,如果你已经知道或者使用 Starlette,大部分的功能会以相同的方式工作。
    
    通过 **FastAPI** 你可以获得所有 **Starlette** 的特性 ( FastAPI 就像加强版的 Starlette ):
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  2. docs_src/security/tutorial005_py310.py

    from datetime import datetime, timedelta, timezone
    
    import jwt
    from fastapi import Depends, FastAPI, HTTPException, Security, status
    from fastapi.security import (
        OAuth2PasswordBearer,
        OAuth2PasswordRequestForm,
        SecurityScopes,
    )
    from jwt.exceptions import InvalidTokenError
    from passlib.context import CryptContext
    from pydantic import BaseModel, ValidationError
    
    # to get a string like this run:
    # openssl rand -hex 32
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon May 20 17:37:28 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/security/simple-oauth2.md

    * 可选的 `client_id`(本例未使用)
    * 可选的 `client_secret`(本例未使用)
    
    /// info | "说明"
    
    `OAuth2PasswordRequestForm` 与 `OAuth2PasswordBearer` 一样,都不是 FastAPI 的特殊类。
    
    **FastAPI** 把 `OAuth2PasswordBearer` 识别为安全方案。因此,可以通过这种方式把它添加至 OpenAPI。
    
    但 `OAuth2PasswordRequestForm` 只是可以自行编写的类依赖项,也可以直接声明 `Form` 参数。
    
    但由于这种用例很常见,FastAPI 为了简便,就直接提供了对它的支持。
    
    ///
    
    ### 使用表单数据
    
    /// tip | "提示"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_handling_errors/test_tutorial002.py

    from fastapi.testclient import TestClient
    
    from docs_src.handling_errors.tutorial002 import app
    
    client = TestClient(app)
    
    
    def test_get_item_header():
        response = client.get("/items-header/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"item": "The Foo Wrestlers"}
    
    
    def test_get_item_not_found_header():
        response = client.get("/items-header/bar")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  5. docs/fr/docs/contributing.md

    </div>
    
    ////
    
    Il installera toutes les dépendances et votre FastAPI local dans votre environnement local.
    
    #### Utiliser votre FastAPI local
    
    Si vous créez un fichier Python qui importe et utilise FastAPI, et que vous l'exécutez avec le Python de votre environnement local, il utilisera votre code source FastAPI local.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  6. docs/es/docs/deployment/index.md

    # Despliegue - Introducción
    
    Desplegar una aplicación hecha con **FastAPI** es relativamente fácil.
    
    ## ¿Qué significa desplegar una aplicación?
    
    **Desplegar** una aplicación significa realizar una serie de pasos para hacerla **disponible para los usuarios**.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Feb 07 11:55:38 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  7. docs/en/docs/deployment/index.md

    # Deployment
    
    Deploying a **FastAPI** application is relatively easy.
    
    ## What Does Deployment Mean
    
    To **deploy** an application means to perform the necessary steps to make it **available to the users**.
    
    For a **web API**, it normally involves putting it in a **remote machine**, with a **server program** that provides good performance, stability, etc, so that your **users** can **access** the application efficiently and without interruptions or problems.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Jan 11 16:31:18 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dataclasses/test_tutorial002.py

    from dirty_equals import IsDict, IsOneOf
    from fastapi.testclient import TestClient
    
    from docs_src.dataclasses.tutorial002 import app
    
    client = TestClient(app)
    
    
    def test_get_item():
        response = client.get("/items/next")
        assert response.status_code == 200
        assert response.json() == {
            "name": "Island In The Moon",
            "price": 12.99,
            "description": "A place to be playin' and havin' fun",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Jul 31 14:09:15 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_query_params_str_validations/test_tutorial011.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.query_params_str_validations.tutorial011 import app
    
    client = TestClient(app)
    
    
    def test_multi_query_values():
        url = "/items/?q=foo&q=bar"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": ["foo", "bar"]}
    
    
    def test_query_no_values():
        url = "/items/"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  10. docs/zh/docs/deployment/docker.md

    Successfully installed fastapi pydantic uvicorn
    ```
    
    </div>
    
    /// info
    
    还有其他文件格式和工具来定义和安装依赖项。
    
     我将在下面的部分中向你展示一个使用 Poetry 的示例。 👇
    
    ///
    
    ### 创建 **FastAPI** 代码
    
    * 创建`app`目录并进入。
    * 创建一个空文件`__init__.py`。
    * 创建一个 `main.py` 文件:
    
    
    
    ```Python
    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Aug 12 21:47:53 UTC 2024
    - 31.2K bytes
    - Viewed (0)
Back to top