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.

3.0 KiB

Editor Support

سرکاری FastAPI Extension آپ کے FastAPI development workflow کو path operation کی دریافت، navigation، نیز FastAPI Cloud deployment، اور لائیو log streaming کے ساتھ بہتر بناتا ہے۔

Extension کے بارے میں مزید تفصیلات کے لیے، GitHub repository پر README دیکھیں۔

سیٹ اپ اور Installation

FastAPI Extension VS Code اور Cursor دونوں کے لیے دستیاب ہے۔ اسے ہر editor میں Extensions پینل سے "FastAPI" تلاش کرکے اور FastAPI Labs کی شائع کردہ extension منتخب کرکے براہ راست install کیا جا سکتا ہے۔ یہ extension browser پر مبنی editors جیسے vscode.dev اور github.dev میں بھی کام کرتا ہے۔

Application Discovery

بطور default، extension آپ کے workspace میں FastAPI() instantiate کرنے والی فائلوں کو scan کرکے خودکار طور پر FastAPI applications دریافت کرے گا۔ اگر auto-detection آپ کے project structure کے لیے کام نہ کرے، تو آپ pyproject.toml میں [tool.fastapi] کے ذریعے یا fastapi.entryPoint VS Code setting میں module notation (مثلاً myapp.main:app) استعمال کرکے entrypoint بتا سکتے ہیں۔

Features

  • Path Operation Explorer - آپ کی application میں تمام path operations کا ایک sidebar tree view۔ کسی بھی route یا router definition تک جانے کے لیے کلک کریں۔
  • Route Search - Ctrl + Shift + E (macOS پر: Cmd + Shift + E) سے path، method، یا name سے تلاش کریں۔
  • CodeLens Navigation - Test client calls (مثلاً client.get('/items')) کے اوپر کلک کرنے والے links جو مماثل path operation تک لے جاتے ہیں تاکہ tests اور implementation کے درمیان تیز navigation ہو۔
  • Deploy to FastAPI Cloud - ایک کلک سے اپنی app کو FastAPI Cloud پر deploy کریں۔
  • Stream Application Logs - اپنی FastAPI Cloud پر deploy شدہ application سے level filtering اور text search کے ساتھ real-time log streaming۔

اگر آپ extension کی features سے واقف ہونا چاہتے ہیں، تو Command Palette (Ctrl + Shift + P یا macOS پر: Cmd + Shift + P) کھول کر "Welcome: Open walkthrough..." منتخب کریں اور پھر "Get started with FastAPI" walkthrough چنیں۔