Aditya Kushwaha

Results 7 comments of Aditya Kushwaha

Hi @dgquail can you provide more information regarding your local setup of docker-compose file. If you are using current docker compose file there is [swagger service](https://github.com/hotosm/tasking-manager/blob/8ce70d140ef7e6c88bb621b34ce390a751281eb5/docker-compose.yml#L85) which serves the docs...

**Having issue while trying to setup this PR locally** My local environment variables: `OSM_TEAMS_AUTH_DOMAIN='https://auth.mapping.team'` `OSM_TEAMS_API_URL='https://mapping.team'` `OSM_TEAMS_CLIENT_ID=--` `OSM_TEAMS_CLIENT_SECRET=--` `TM_OSM_TEAMS_REDIRECT_URI=http://127.0.0.1:3000/osmteams-authorized` The ui shows for sync with osm teams while creating new team...

- Added requirements for fastapi setup `fastapi==0.108.0`, `pydantic==2.5.3`, `pydantic-settings==2.1.0` - Rewritten docker file to include fatapi setup, changed image cmd to address fatapi - Rewritten docker-compose file, removed swagger service...

- Add `asyncpg` instead of pyscopg to add asnync db query capabilities - Update db connection string to facilitate asyncpg `postgresql+asyncpg://` - New db.py file to address async session setup

- Create new API endpoints using Fastapi APIRouter - Change authentication system using `starlette.authentication` - Change all functions to async `async def ....` - Make changes to functions data to...

- New main.py file created to setup fastapi app - Add necessary middlewares - Add API endpoints

Here are the references what I prefer for setting up pyinstrument in flask and fastapi - [https://pyinstrument.readthedocs.io/en/latest/guide.html#profile-a-web-request-in-flask](https://pyinstrument.readthedocs.io/en/latest/guide.html#profile-a-web-request-in-flask) - [https://pyinstrument.readthedocs.io/en/latest/guide.html#profile-a-web-request-in-fastapi](https://pyinstrument.readthedocs.io/en/latest/guide.html#profile-a-web-request-in-fastapi)