pythonasyncioapiasyncfastapiframeworkjsonjson-schemaopenapiopenapi3pydanticpython-typespython3redocreststarletteswaggerswagger-uiuvicornweb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.3 KiB
1.3 KiB
🎻 📁
👆 💪 🍦 🎻 📁 🔁 ⚪️➡️ 📁 ⚙️ StaticFiles
.
⚙️ StaticFiles
- 🗄
StaticFiles
. - "🗻"
StaticFiles()
👐 🎯 ➡.
{!../../../docs_src/static_files/tutorial001.py!}
!!! note "📡 ℹ"
👆 💪 ⚙️ from starlette.staticfiles import StaticFiles
.
**FastAPI** 🚚 🎏 `starlette.staticfiles` `fastapi.staticfiles` 🏪 👆, 👩💻. ✋️ ⚫️ 🤙 👟 🔗 ⚪️➡️ 💃.
⚫️❔ "🗜"
"🗜" ⛓ ❎ 🏁 "🔬" 🈸 🎯 ➡, 👈 ⤴️ ✊ 💅 🚚 🌐 🎧-➡.
👉 🎏 ⚪️➡️ ⚙️ APIRouter
🗻 🈸 🍕 🔬. 🗄 & 🩺 ⚪️➡️ 👆 👑 🈸 🏆 🚫 🔌 🕳 ⚪️➡️ 🗻 🈸, ♒️.
👆 💪 ✍ 🌅 🔃 👉 🏧 👩💻 🦮.
ℹ
🥇 "/static"
🔗 🎧-➡ 👉 "🎧-🈸" 🔜 "🗻" 🔛. , 🙆 ➡ 👈 ▶️ ⏮️ "/static"
🔜 🍵 ⚫️.
directory="static"
🔗 📛 📁 👈 🔌 👆 🎻 📁.
name="static"
🤝 ⚫️ 📛 👈 💪 ⚙️ 🔘 FastAPI.
🌐 👫 🔢 💪 🎏 🌘 "static
", 🔆 👫 ⏮️ 💪 & 🎯 ℹ 👆 👍 🈸.
🌅 ℹ
🌖 ℹ & 🎛 ✅ 💃 🩺 🔃 🎻 📁.