FastAPI என்பது Python-இல் standard type hints அடிப்படையில் API-களை உருவாக்க உதவும் ஒரு நவீன மற்றும் வேகமான (high-performance) web framework ஆகும்.
FastAPI என்பது Python-இல் standard type hints அடிப்படையில் API-களை உருவாக்க உதவும் ஒரு
நவீன மற்றும் வேகமான (high-performance) web framework ஆகும்.
இதன் முக்கிய அம்சங்கள்:
* **Fast**: மிக அதிக performance, **NodeJS** மற்றும் **Go**க்கு சமமாக (Starlette மற்றும் Pydantic காரணமாக). [Python frameworks-லேயே மிக வேகமான ஒன்றாக](#performance).
* **Fast to code**: அம்சங்களை உருவாக்கும் வேகம் சுமார் 200% முதல் 300% வரை அதிகரிக்கலாம். *
* **Fewer bugs**: மனித (developer) காரணமாக ஏற்படும் தவறுகள் சுமார் 40% வரை குறையலாம். *
* **Intuitive**: சிறந்த editor support, எல்லா இடங்களிலும் <dfntitle="also known as auto-complete, autocompletion, IntelliSense">Completion</dfn>. debugging நேரம் குறையும்.
* **Easy**: பயன்படுத்தவும் கற்றுக்கொள்ளவும் எளிதாக வடிவமைக்கப்பட்டுள்ளது. documentation-ஐ படிக்கும் நேரம் குறையும்.
* **Short**: code duplication குறையும். ஒவ்வொரு parameter declaration-லேயே பல அம்சங்கள் கிடைக்கும்; bugs குறையும்.
* **Standards-based**: API-களுக்கான open standards அடிப்படையில்...
<small>* production applications உருவாக்கிய ஒரு internal development team செய்த tests அடிப்படையிலான மதிப்பீடு.</small>
<small>* production applications உருவாக்கிய ஒரு internal development team செய்த tests அடிப்படையிலான
மதிப்பீடு.</small>
## Sponsors { #sponsors }
@ -73,13 +84,16 @@ FastAPI என்பது Python-இல் standard type hints அடிப்
## Opinions { #opinions }
"_[...] இந்த நாட்களில் **FastAPI** ஐ நான் மிகவும் அதிகமாக பயன்படுத்துகிறேன். [...] உண்மையிலேயே இதை என் team-னுடைய **ML services at Microsoft** எல்லாவற்றுக்கும் பயன்படுத்த திட்டமிட்டுள்ளேன். அதில் சில core **Windows** product-லேயே integrate ஆகிறது, சில **Office** products-லையும் ஆகிறது._"
"_[...] இந்த நாட்களில் **FastAPI** ஐ நான் மிகவும் அதிகமாக பயன்படுத்துகிறேன். [...]
உண்மையிலேயே இதை என் team-னுடைய **ML services at Microsoft** எல்லாவற்றுக்கும் பயன்படுத்த திட்டமிட்டுள்ளேன்.
அதில் சில core **Windows** product-லேயே integrate ஆகிறது, சில **Office** products-லையும் ஆகிறது._"
"_**predictions** பெற query செய்யக்கூடிய ஒரு **REST** server உருவாக்க **FastAPI** library-யை நாம் பயன்படுத்த தீர்மானித்தோம். [Ludwig காக]_"
"_**predictions** பெற query செய்யக்கூடிய ஒரு **REST** server உருவாக்க **FastAPI** library-யை நாம்
பயன்படுத்த தீர்மானித்தோம். [Ludwig காக]_"
<divstyle="text-align: right; margin-right: 10%;">Piero Molino, Yaroslav Dudin, and Sai Sumanth Miryala - <strong>Uber</strong><ahref="https://eng.uber.com/ludwig-v0-2/"><small>(ref)</small></a></div>
@ -97,13 +111,16 @@ FastAPI என்பது Python-இல் standard type hints அடிப்
---
"_உண்மையிலேயே, நீங்க build செய்தது மிகவும் solid ஆகவும் polished ஆகவும் உள்ளது. பல விதத்தில், **Hug** இப்படித்தான் இருக்கணும் என்று நான் நினைத்தது போலவே உள்ளது — இதை ஒருத்தர் build செய்தது பார்க்க மிகவும் inspiring ஆக உள்ளது._"
"_உண்மையிலேயே, நீங்க build செய்தது மிகவும் solid ஆகவும் polished ஆகவும் உள்ளது. பல விதத்தில்,
**Hug** இப்படித்தான் இருக்கணும் என்று நான் நினைத்தது போலவே உள்ளது — இதை ஒருத்தர் build செய்தது பார்க்க
"_REST APIs உருவாக்க ஒரு **modern framework** கற்றுக்கணும்னு நினைச்சா, **FastAPI** ஐ பார்க்கவும் [...] இது வேகமானது, பயன்படுத்த எளிது, கற்றுக்கொள்ள எளிது [...]_"
"_REST APIs உருவாக்க ஒரு **modern framework** கற்றுக்கணும்னு நினைச்சா, **FastAPI** ஐ பார்க்கவும் [...]
இது வேகமானது, பயன்படுத்த எளிது, கற்றுக்கொள்ள எளிது [...]_"
"_எங்களின் **APIs** காக நாம் **FastAPI** க்கு மாறிட்டோம் [...] உங்களுக்கு இது பிடிக்கும் என்று நினைக்கிறேன் [...]_"
@ -111,7 +128,10 @@ FastAPI என்பது Python-இல் standard type hints அடிப்
---
"_production Python API build செய்ய நினைப்பவர்களுக்கு, **FastAPI** ஐ நான் strongly recommend செய்வேன். இது **beautifully designed**, **simple to use**, மற்றும் **highly scalable**. எங்களின் API first development strategy-ல இது ஒரு **key component** ஆகி, Virtual TAC Engineer போன்ற பல automations மற்றும் services-ஐ இயக்குது._"
"_production Python API build செய்ய நினைப்பவர்களுக்கு, **FastAPI** ஐ நான் strongly recommend செய்வேன்.
இது **beautifully designed**, **simple to use**, மற்றும் **highly scalable**. எங்களின் API first development
strategy-ல இது ஒரு **key component** ஆகி, Virtual TAC Engineer போன்ற பல automations மற்றும் services-ஐ
@ -119,7 +139,8 @@ FastAPI என்பது Python-இல் standard type hints அடிப்
## FastAPI mini documentary { #fastapi-mini-documentary }
2025 முடிவில் வெளியான [FastAPI mini documentary](https://www.youtube.com/watch?v=mpR8ngthqiE) ஒன்று இருக்கிறது; அதை online-ல பார்க்கலாம்:
2025 முடிவில் வெளியான [FastAPI mini documentary](https://www.youtube.com/watch?v=mpR8ngthqiE) ஒன்று இருக்கிறது;
அதை online-ல பார்க்கலாம்:
<ahref="https://www.youtube.com/watch?v=mpR8ngthqiE"><imgsrc="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg"alt="FastAPI Mini Documentary"></a>
@ -127,7 +148,8 @@ FastAPI என்பது Python-இல் standard type hints அடிப்
web APIக்கு பதிலாக terminal-ல் பயன்படுத்த ஒரு <abbrtitle="Command Line Interface">CLI</abbr> app உருவாக்க விரும்பினால், [**Typer**](https://typer.tiangolo.com/) ஐ பார்க்கவும்.
web APIக்கு பதிலாக terminal-ல் பயன்படுத்த ஒரு <abbrtitle="Command Line Interface">CLI</abbr> app உருவாக்க விரும்பினால்,
[**Typer**](https://typer.tiangolo.com/) ஐ பார்க்கவும்.
**Typer** என்பது FastAPI-னுடைய small sibling. இது **CLIs கான FastAPI** ஆக இருக்கவே உருவாக்கப்பட்டது. ⌨️ 🚀
@ -140,7 +162,8 @@ FastAPI “giants” மேல் நின்று உருவாக்கப
## Installation { #installation }
[virtual environment](https://fastapi.tiangolo.com/virtual-environments/) ஒன்றை create செய்து activate செய்துவிட்டு, பிறகு FastAPI ஐ install செய்யுங்கள்:
[virtual environment](https://fastapi.tiangolo.com/virtual-environments/) ஒன்றை create செய்து activate செய்துவிட்டு,
`fastapi dev` command உங்க `main.py` file-ஐ automatic-ஆ படிச்சு, அதில் உள்ள **FastAPI** app-ஐ கண்டுபிடிச்சு, [Uvicorn](https://www.uvicorn.dev) பயன்படுத்தி server-ஐ start செய்யும்.
`fastapi dev` command உங்க `main.py` file-ஐ automatic-ஆ படிச்சு, அதில் உள்ள **FastAPI** app-ஐ கண்டுபிடிச்சு,
[Uvicorn](https://www.uvicorn.dev) பயன்படுத்தி server-ஐ start செய்யும்.
default-ஆ, local development காக `fastapi dev` auto-reload enabled-ஆ start ஆகும்.
@ -247,7 +273,8 @@ default-ஆ, local development காக `fastapi dev` auto-reload enabled-ஆ s
### Check it { #check-it }
உங்க browser-ல [http://127.0.0.1:8000/items/5?q=somequery](http://127.0.0.1:8000/items/5?q=somequery) ஐ திறக்கவும்.
உங்க browser-ல
[http://127.0.0.1:8000/items/5?q=somequery](http://127.0.0.1:8000/items/5?q=somequery) ஐ திறக்கவும்.
JSON response இப்படியே வரும்:
@ -266,7 +293,8 @@ JSON response இப்படியே வரும்:
இப்போ [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) க்கு செல்லவும்.
automatic interactive API documentation (இதை [Swagger UI](https://github.com/swagger-api/swagger-ui) வழங்குகிறது) உங்களுக்கு தெரியும்:
automatic interactive API documentation (இதை [Swagger UI](https://github.com/swagger-api/swagger-ui) வழங்குகிறது)
இன்னும் நிறைய features உடன் ஒரு complete example காக <ahref="https://fastapi.tiangolo.com/tutorial/">Tutorial - User Guide</a> பார்க்கவும்.
இன்னும் நிறைய features உடன் ஒரு complete example காக
<ahref="https://fastapi.tiangolo.com/tutorial/">Tutorial - User Guide</a> பார்க்கவும்.
**Spoiler alert**: tutorial - user guide-ல இதில் எல்லாம் இருக்கு:
* வேறு பல இடங்களிலிருந்து **parameters** declare செய்வது: **headers**, **cookies**, **form fields** மற்றும் **files**.
* வேறு பல இடங்களிலிருந்து **parameters** declare செய்வது: **headers**, **cookies**, **form fields** மற்றும்
**files**.
* `maximum_length` அல்லது `regex` போன்ற **validation constraints** எப்படி set செய்வது.
* மிகவும் powerful, பயன்படுத்த எளிதான **<dfntitle="also known as components, resources, providers, services, injectables">Dependency Injection</dfn>** system.
* மிகவும் powerful, பயன்படுத்த எளிதான
**<dfntitle="also known as components, resources, providers, services, injectables">Dependency Injection</dfn>** system.
* Security மற்றும் authentication, இதில் **OAuth2** + **JWT tokens** மற்றும் **HTTP Basic** auth support.
* **deeply nested JSON models** declare செய்ய இன்னும் advanced (ஆனா அதே மாதிரி easy) techniques (Pydantic காரணமாக).
* **deeply nested JSON models** declare செய்ய இன்னும் advanced (ஆனா அதே மாதிரி easy) techniques
(Pydantic காரணமாக).
* [Strawberry](https://strawberry.rocks) மற்றும் பிற libraries உடன் **GraphQL** integration.
* Starlette காரணமாக கிடைக்கும் பல extra features:
* **WebSockets**
@ -452,9 +493,11 @@ item: Item
### Deploy your app (optional) { #deploy-your-app-optional }
[FastAPI Cloud](https://fastapicloud.com) க்கு உங்க FastAPI app-ஐ optional-ஆ deploy செய்யலாம்; இன்னும் join செய்யலன்னா waiting list-ல சேருங்க. 🚀
[FastAPI Cloud](https://fastapicloud.com) க்கு உங்க FastAPI app-ஐ optional-ஆ deploy செய்யலாம்;
இன்னும் join செய்யலன்னா waiting list-ல சேருங்க. 🚀
உங்கிடம் ஏற்கனவே **FastAPI Cloud** account இருந்தா (waiting list-ல இருந்து நாம் invite செய்திருப்போம் 😉), ஒரு command-லேயே app-ஐ deploy செய்யலாம்.
உங்கிடம் ஏற்கனவே **FastAPI Cloud** account இருந்தா (waiting list-ல இருந்து நாம் invite செய்திருப்போம் 😉),
ஒரு command-லேயே app-ஐ deploy செய்யலாம்.
<divclass="termy">
@ -474,23 +517,29 @@ Deploying to FastAPI Cloud...
#### About FastAPI Cloud { #about-fastapi-cloud }
**[FastAPI Cloud](https://fastapicloud.com)**-ஐ **FastAPI**-யை உருவாக்கிய அதே author மற்றும் team தான் build செய்தாங்க.
**[FastAPI Cloud](https://fastapicloud.com)**-ஐ **FastAPI**-யை உருவாக்கிய அதே author மற்றும் team தான்
build செய்தாங்க.
ஒரு API-யை **building**, **deploying**, **accessing** செய்வதைக் குறைந்த முயற்சியில் smooth-ஆ மாற்றுகிறது.
FastAPI-யோட app build செய்யும்போது கிடைக்கும் அதே **developer experience**-ஐ cloud-க்கு **deploying** செய்யும்போதும் கொண்டு வருகிறது. 🎉
FastAPI-யோட app build செய்யும்போது கிடைக்கும் அதே **developer experience**-ஐ cloud-க்கு **deploying**
செய்யும்போதும் கொண்டு வருகிறது. 🎉
*FastAPI and friends* open source projects-க்கு FastAPI Cloud தான் primary sponsor மற்றும் funding provider. ✨
*FastAPI and friends* open source projects-க்கு FastAPI Cloud தான் primary sponsor மற்றும்
funding provider. ✨
#### Deploy to other cloud providers { #deploy-to-other-cloud-providers }
FastAPI open source, மேலும் standards அடிப்படையிலானது. நீங்க விரும்பும் எந்த cloud provider-லையாவது FastAPI apps-ஐ deploy செய்யலாம்.
FastAPI open source, மேலும் standards அடிப்படையிலானது. நீங்க விரும்பும் எந்த cloud provider-லையாவது
Independent TechEmpower benchmarks-ல், Uvicorn-ல் ஓடும் **FastAPI** applications [Python frameworks-லேயே மிகவும் வேகமான ஒன்றாக](https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7) காட்டப்படுது; Starlette மற்றும் Uvicorn தங்களுக்குக் கீழே மட்டும் (FastAPI உள்ளே பயன்படுத்துவது). (*)
Independent TechEmpower benchmarks-ல், Uvicorn-ல் ஓடும் **FastAPI** applications
[Python frameworks-லேயே மிகவும் வேகமான ஒன்றாக](https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7)
காட்டப்படுது; Starlette மற்றும் Uvicorn தங்களுக்குக் கீழே மட்டும் (FastAPI உள்ளே பயன்படுத்துவது). (*)
மேலும் புரிஞ்சுக்க [Benchmarks](https://fastapi.tiangolo.com/benchmarks/) section பார்க்கவும்.
@ -500,7 +549,8 @@ FastAPI, Pydantic மற்றும் Starlette மீது depend ஆகி
* [`python-multipart`](https://github.com/Kludex/python-multipart) - `request.form()` உடன் form <dfntitle="converting the string that comes from an HTTP request into Python data">"parsing"</dfn> support வேணும்னா required.
* [`python-multipart`](https://github.com/Kludex/python-multipart) - `request.form()` உடன் form
<dfntitle="converting the string that comes from an HTTP request into Python data">"parsing"</dfn>
support வேணும்னா required.
FastAPI பயன்படுத்துவது:
* [`uvicorn`](https://www.uvicorn.dev) - உங்க application-ஐ load செய்து serve செய்யும் server காக. இதில் `uvicorn[standard]` அடங்கும்; அதில் high performance serving காக தேவையான சில dependencies (எ.கா. `uvloop`) இருக்கிறது.
* [`uvicorn`](https://www.uvicorn.dev) - உங்க application-ஐ load செய்து serve செய்யும் server காக.
இதில் `uvicorn[standard]` அடங்கும்; அதில் high performance serving காக தேவையான சில dependencies
* இதில் `fastapi-cloud-cli` அடங்கும்; இதனால் உங்க FastAPI application-ஐ [FastAPI Cloud](https://fastapicloud.com) க்கு deploy செய்யலாம்.
* இதில் `fastapi-cloud-cli` அடங்கும்; இதனால் உங்க FastAPI application-ஐ
[FastAPI Cloud](https://fastapicloud.com) க்கு deploy செய்யலாம்.
### Without `standard` Dependencies { #without-standard-dependencies }
`standard` optional dependencies வேண்டாம் என்றால், `pip install "fastapi[standard]"` க்கு பதிலாக `pip install fastapi` மூலம் install செய்யலாம்.
`standard` optional dependencies வேண்டாம் என்றால், `pip install "fastapi[standard]"` க்கு பதிலாக
`pip install fastapi` மூலம் install செய்யலாம்.
### Without `fastapi-cloud-cli` { #without-fastapi-cloud-cli }
standard dependencies உடன் ஆனால் `fastapi-cloud-cli` இல்லாமல் install செய்யணும்னா, `pip install "fastapi[standard-no-fastapi-cloud-cli]"` பயன்படுத்தலாம்.
standard dependencies உடன் ஆனால் `fastapi-cloud-cli` இல்லாமல் install செய்யணும்னா,
`pip install "fastapi[standard-no-fastapi-cloud-cli]"` பயன்படுத்தலாம்.