mirror of
https://github.com/fastapi/fastapi.git
synced 2026-05-19 22:07:37 -04:00
📝 Add documentation about settings and env vars (#1118)
* Add doc and example for env var config * Syntax highlight for .env file * Add test for configuration docs * 📝 Update settings docs, add more examples * ✅ Add tests for settings * 🚚 Rename "Application Configuration" to "Metadata and Docs URLs" to disambiguate between that and settings * 🔥 Remove replaced example file Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
12
docs_src/metadata/tutorial001.py
Normal file
12
docs_src/metadata/tutorial001.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from fastapi import FastAPI
|
||||
|
||||
app = FastAPI(
|
||||
title="My Super Project",
|
||||
description="This is a very fancy project, with auto docs for the API and everything",
|
||||
version="2.5.0",
|
||||
)
|
||||
|
||||
|
||||
@app.get("/items/")
|
||||
async def read_items():
|
||||
return [{"name": "Foo"}]
|
||||
Reference in New Issue
Block a user