- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 66 for inline (0.15 sec)
-
docs/en/docs/advanced/testing-dependencies.md
```Python app.dependency_overrides = {} ``` !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 2.9K bytes - Viewed (0) -
scripts/docs.py
raise typer.Abort() typer.echo("Valid README ✅") @app.command() def build_all() -> None: """ Build mkdocs site for en, and then build each language inside, end result is located at directory ./site/ with each language inside. """ update_languages() shutil.rmtree(site_path, ignore_errors=True) langs = [lang.name for lang in get_lang_paths() if lang.is_dir()]
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Jan 22 19:26:14 GMT 2024 - 10.9K bytes - Viewed (1) -
docs/zh/docs/advanced/testing-database.md
!!! tip "提示" 为减少代码重复,最好把这段代码写成函数,在 `database.py` 与 `tests/test_sql_app.py`中使用。 为了把注意力集中在测试代码上,本例只是复制了这段代码。 ## 创建数据库 因为现在是想在新文件中使用新数据库,所以要使用以下代码创建数据库: ```Python Base.metadata.create_all(bind=engine) ``` 一般是在 `main.py` 中调用这行代码,但在 `main.py` 里,这行代码用于创建 `sql_app.db`,但是现在要为测试创建 `test.db`。 因此,要在测试代码中添加这行代码创建新的数据库文件。 ```Python hl_lines="16" {!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!}
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Jan 28 18:09:26 GMT 2024 - 2.8K bytes - Viewed (0) -
docs/zh/docs/advanced/async-sql-databases.md
``` !!! tip "提示" 连接 PostgreSQL 等数据库时,需要修改 `DATABASE_URL`。 ## 创建表 本例中,使用 Python 文件创建表,但在生产环境中,应使用集成迁移等功能的 Alembic 创建表。 本例在启动 **FastAPI** 应用前,直接执行这些操作。 * 创建 `engine` * 使用 `metadata` 对象创建所有表 ```Python hl_lines="25-28" {!../../../docs_src/async_sql_databases/tutorial001.py!} ``` ## 创建模型 创建以下 Pydantic 模型: * 创建笔记的模型(`NoteIn`) * 返回笔记的模型(`Note`)
Plain Text - Registered: Sun Mar 31 07:19:09 GMT 2024 - Last Modified: Sat Mar 30 22:44:40 GMT 2024 - 4.3K bytes - Viewed (0) -
docs/em/docs/tutorial/path-operation-configuration.md
{!> ../../../docs_src/path_operation_configuration/tutorial003_py310.py!} ``` ## 📛 ⚪️➡️ #️⃣ 📛 😑 📏 & 📔 💗 ⏸, 👆 💪 📣 *➡ 🛠️* 📛 🔢 <abbr title="a multi-line string as the first expression inside a function (not assigned to any variable) used for documentation"> #️⃣ </abbr> & **FastAPI** 🔜 ✍ ⚫️ ⚪️➡️ 📤.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 5.3K bytes - Viewed (0) -
docs/tr/docs/features.md
* **Taviz yok** hiçbir şeyden taviz vermeden, database frontend vs. Bütün hepsinin kolayca entegre edilebiliyor. ### Sınırsız "plug-inler" Başka bir deyişle, plug-inlere ihtiyacımız yok, import edip direkt olarak kullanmaya başlayabiliriz.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.1K bytes - Viewed (0) -
docs/en/docs/tutorial/body.md
<img src="/img/tutorial/body/image01.png"> And will be also used in the API docs inside each *path operation* that needs them: <img src="/img/tutorial/body/image02.png"> ## Editor support In your editor, inside your function you will get type hints and completion everywhere (this wouldn't happen if you received a `dict` instead of a Pydantic model):
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 7.3K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/classes-as-dependencies.md
```Python commons: CommonQueryParams = Depends() ``` You declare the dependency as the type of the parameter, and you use `Depends()` without any parameter, instead of having to write the full class *again* inside of `Depends(CommonQueryParams)`. The same example would then look like: === "Python 3.10+" ```Python hl_lines="19" {!> ../../../docs_src/dependencies/tutorial004_an_py310.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.4K bytes - Viewed (0) -
docs/en/docs/tutorial/schema-extra-example.md
* `Path()` * `Query()` * `Header()` * `Cookie()` * `Body()` * `Form()` * `File()` you can also declare a group of `examples` with additional information that will be added to their **JSON Schemas** inside of **OpenAPI**. ### `Body` with `examples` Here we pass `examples` containing one example of the data expected in `Body()`: === "Python 3.10+" ```Python hl_lines="22-29"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.8K bytes - Viewed (0) -
docs/en/docs/advanced/additional-status-codes.md
# Additional Status Codes By default, **FastAPI** will return the responses using a `JSONResponse`, putting the content you return from your *path operation* inside of that `JSONResponse`. It will use the default status code or the one you set in your *path operation*. ## Additional status codes
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 2.6K bytes - Viewed (0)