Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
AddStaffSchema,
UpdateStaffEmailSchema,
UpdateMenuItemSchema,
MenuScanResponse
MenuScanResponse,

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
CreateOrderSchema

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
)
from .auth import (
authenticate_student,
Expand All @@ -28,7 +29,8 @@
remove_staff_member,
update_staff_email,
)
from .user import get_user_menu
from .user import get_user_menu, create_payment_order
from .webhook import router as webhook_router

app = FastAPI()

Expand All @@ -45,6 +47,8 @@

security = HTTPBearer()

app.include_router(webhook_router)

@app.get("/health", tags=["health"])
def health_check():
return {
Expand All @@ -67,6 +71,13 @@
):
return await get_user_menu(credentials.credentials)

@app.post("/user/order/create", tags=["user"])
async def create_order_endpoint(

Check warning

Code scanning / Pylint (reported by Codacy)

Missing function docstring Warning

Missing function docstring

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing function or method docstring Warning

Missing function or method docstring
order_data: CreateOrderSchema,

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation before block (add 4 spaces). Warning

Wrong hanging indentation before block (add 4 spaces).
credentials: HTTPAuthorizationCredentials = Security(security)
):
return await create_payment_order(order_data, credentials.credentials)

@app.post('/staff/add-member', tags=["manager"])
async def add_staff_endpoint(
staff_data: AddStaffSchema,
Expand Down Expand Up @@ -105,7 +116,7 @@

@app.get("/staff/menu", tags=["staff", "manager"])
async def get_staff_menu(
credentials: HTTPAuthorizationCredentials = Security(security)

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation before block (add 4 spaces). Warning

Wrong hanging indentation before block (add 4 spaces).
):
token = credentials.credentials
return await get_menu(token)
Expand Down
8 changes: 8 additions & 0 deletions app/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,11 @@
detected_items: List[ExtractedMenuItem]
count: int
message: str = "Scan complete. Please verify items before saving."

class CartItemSchema(BaseModel):

Check warning

Code scanning / Pylint (reported by Codacy)

Too few public methods (0/2) Warning

Too few public methods (0/2)

Check warning

Code scanning / Pylint (reported by Codacy)

Missing class docstring Warning

Missing class docstring

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Too few public methods (0/2) Warning

Too few public methods (0/2)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing class docstring Warning

Missing class docstring
item_id: str

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4
quantity: int = Field(..., gt=0)

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

class CreateOrderSchema(BaseModel):

Check warning

Code scanning / Pylint (reported by Codacy)

Missing class docstring Warning

Missing class docstring

Check warning

Code scanning / Pylint (reported by Codacy)

Too few public methods (0/2) Warning

Too few public methods (0/2)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing class docstring Warning

Missing class docstring

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Too few public methods (0/2) Warning

Too few public methods (0/2)
stall_id: str

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4
items: List[CartItemSchema]

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4
86 changes: 86 additions & 0 deletions app/user.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
#app/user.py

import os
import razorpay

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'razorpay' (import-error) Warning

Unable to import 'razorpay' (import-error)
from fastapi.responses import JSONResponse
from starlette import status
from firebase_admin import auth
from .firebase_init import db
from datetime import datetime
from .schema import CreateOrderSchema

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4
razorpay_client = razorpay.Client(auth=(

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "razorpay_client" doesn't conform to UPPER_CASE naming style Warning

Constant name "razorpay_client" doesn't conform to UPPER_CASE naming style
os.environ.get("RAZORPAY_KEY_ID"),
os.environ.get("RAZORPAY_KEY_SECRET")
))

async def get_user_details(id_token: str):
try:
Expand All @@ -23,7 +30,7 @@

def serialize_firestore_data(data: dict):
for k, v in data.items():
if isinstance(v, datetime):

Check warning

Code scanning / Prospector (reported by Codacy)

Unused variable 'user_uid' (unused-variable) Warning

Unused variable 'user_uid' (unused-variable)
data[k] = v.isoformat()
return data

Expand Down Expand Up @@ -83,7 +90,7 @@
})

return JSONResponse(
status_code=status.HTTP_200_OK,

Check notice

Code scanning / Pylint (reported by Codacy)

Catching too general exception Exception Note

Catching too general exception Exception
content={
"college_id": college_id,
"stalls": stalls_response
Expand All @@ -95,3 +102,82 @@
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
content={"message": str(e)}
)


async def create_payment_order(order_data: CreateOrderSchema, id_token: str):

Check warning

Code scanning / Pylint (reported by Codacy)

Missing function docstring Warning

Missing function docstring

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing function or method docstring Warning

Missing function or method docstring
try:

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4
user_data, user_uid = await get_user_details(id_token)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
if not user_data:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
return JSONResponse(

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
status_code=status.HTTP_401_UNAUTHORIZED,

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
content={"message": "Invalid or expired token."}

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
)

college_id = user_data.get("college_id")

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
stall_id = order_data.stall_id

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

total_amount = 0

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

menu_ref = (

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
db.collection("colleges")

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
.document(college_id)

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
.collection("stalls")

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
.document(stall_id)

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
.collection("menu_items")

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
)

for cart_item in order_data.items:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
item_doc = menu_ref.document(cart_item.item_id).get()

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 (bad-indentation) Warning

Bad indentation. Found 6 spaces, expected 12 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12

if item_doc.exists:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 (bad-indentation) Warning

Bad indentation. Found 6 spaces, expected 12 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12
item_data = item_doc.to_dict()

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 (bad-indentation) Warning

Bad indentation. Found 8 spaces, expected 16 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 Note

Bad indentation. Found 8 spaces, expected 16

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 Note

Bad indentation. Found 8 spaces, expected 16

if item_data.get('is_available') is False:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 (bad-indentation) Warning

Bad indentation. Found 8 spaces, expected 16 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 Note

Bad indentation. Found 8 spaces, expected 16

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 Note

Bad indentation. Found 8 spaces, expected 16
return JSONResponse(

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 (bad-indentation) Warning

Bad indentation. Found 6 spaces, expected 12 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12
status_code=status.HTTP_400_BAD_REQUEST,

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
content={"message": f"Sorry, {item_data.get('name')} is currently out of stock."}

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
)

price = item_data.get('price', 0)

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 (bad-indentation) Warning

Bad indentation. Found 8 spaces, expected 16 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 Note

Bad indentation. Found 8 spaces, expected 16

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 Note

Bad indentation. Found 8 spaces, expected 16
total_amount += price * cart_item.quantity

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 (bad-indentation) Warning

Bad indentation. Found 8 spaces, expected 16 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 Note

Bad indentation. Found 8 spaces, expected 16

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 Note

Bad indentation. Found 8 spaces, expected 16
else:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 (bad-indentation) Warning

Bad indentation. Found 6 spaces, expected 12 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12
return JSONResponse(

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12
status_code=status.HTTP_400_BAD_REQUEST,

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
content={"message": "One or more items in your cart no longer exist."}

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
)

if total_amount <= 0:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
return JSONResponse(

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
status_code=status.HTTP_400_BAD_REQUEST,

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
content={"message": "Invalid order total (0). Check item availability."}

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
)

data = {

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
"amount": int(total_amount * 100),

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
"currency": "INR",

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
"receipt": f"order_{user_uid[:5]}_{int(datetime.now().timestamp())}",

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
"notes": {

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
"stall_id": stall_id,

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
"user_uid": user_uid,

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
"college_id": college_id

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
}
}

order = razorpay_client.order.create(data=data)

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

return JSONResponse(

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 (bad-indentation) Warning

Bad indentation. Found 8 spaces, expected 16 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 8 spaces, expected 16 Note

Bad indentation. Found 8 spaces, expected 16
status_code=status.HTTP_200_OK,

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
content={

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
"id": order['id'],

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
"amount": order['amount'],

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
"currency": order['currency'],

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
"key_id": os.environ.get("RAZORPAY_KEY_ID"),

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
"message": "Order created successfully"

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
}
)

except Exception as e:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check warning

Code scanning / Pylint (reported by Codacy)

Variable name "e" doesn't conform to snake_case naming style Warning

Variable name "e" doesn't conform to snake_case naming style

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Variable name "e" doesn't conform to snake_case naming style Warning

Variable name "e" doesn't conform to snake_case naming style

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Catching too general exception Exception Note

Catching too general exception Exception

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4
return JSONResponse(

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 10 spaces, expected 20 (bad-indentation) Warning

Bad indentation. Found 10 spaces, expected 20 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
content={"message": f"Payment Error: {str(e)}"}

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
)
66 changes: 66 additions & 0 deletions app/webhook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# app/webhook.py

Check warning

Code scanning / Pylint (reported by Codacy)

Missing module docstring Warning

Missing module docstring

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing module docstring Warning

Missing module docstring
import os
import hmac
import hashlib
import json

Check warning on line 5 in app/webhook.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

app/webhook.py#L5

'json' imported but unused (F401)

Check warning

Code scanning / Prospector (reported by Codacy)

Unused import json (unused-import) Warning

Unused import json (unused-import)

Check notice

Code scanning / Pylint (reported by Codacy)

Unused import json Note

Unused import json

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Unused import json Note

Unused import json
from fastapi import APIRouter, Request, HTTPException

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'fastapi' (import-error) Warning

Unable to import 'fastapi' (import-error)
from firebase_admin import firestore

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'firebase_admin' (import-error) Warning

Unable to import 'firebase_admin' (import-error)
from .firebase_init import db

router = APIRouter()

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "router" doesn't conform to UPPER_CASE naming style Warning

Constant name "router" doesn't conform to UPPER_CASE naming style


@router.post("/webhook/razorpay", tags=["webhook"])
async def razorpay_webhook(request: Request):

Check warning

Code scanning / Pylint (reported by Codacy)

Missing function docstring Warning

Missing function docstring

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing function or method docstring Warning

Missing function or method docstring
signature = request.headers.get('X-Razorpay-Signature')

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4
secret = os.environ.get("RAZORPAY_WEBHOOK_SECRET")

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4
body = await request.body()

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

try:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4
expected_signature = hmac.new(

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
key=secret.encode(),

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
msg=body,

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
digestmod=hashlib.sha256

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
).hexdigest()

if not hmac.compare_digest(expected_signature, signature):

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
raise HTTPException(status_code=400, detail="Invalid signature")

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 (bad-indentation) Warning

Bad indentation. Found 6 spaces, expected 12 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12
except Exception:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4
raise HTTPException(status_code=400, detail="Signature verification failed")

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Consider explicitly re-raising using the 'from' keyword Note

Consider explicitly re-raising using the 'from' keyword

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

payload = await request.json()

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4
event_type = payload.get('event')

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

if event_type in ['payment.captured', 'payment_link.paid']:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4
payment = payload['payload']['payment']['entity']

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
notes = payment.get('notes', {})

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

if isinstance(notes, list):

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
notes = {}

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 (bad-indentation) Warning

Bad indentation. Found 6 spaces, expected 12 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12

stall_id = notes.get('stall_id')

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
user_id = notes.get('user_uid')

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

if not stall_id:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
stall_id = "manual_test_stall"

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 (bad-indentation) Warning

Bad indentation. Found 6 spaces, expected 12 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12

order_data = {

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylint (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
"order_id": payment['order_id'],

Check warning

Code scanning / Pylint (reported by Codacy)

Wrong hanging indentation (add 2 spaces). Warning

Wrong hanging indentation (add 2 spaces).
"payment_id": payment['id'],
"amount": payment['amount'] / 100,
"status": "PAID",
"stall_id": stall_id,
"user_id": user_id,
"created_at": firestore.SERVER_TIMESTAMP
}

try:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
db.collection('orders').add(order_data)

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 (bad-indentation) Warning

Bad indentation. Found 6 spaces, expected 12 (bad-indentation)

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12
except Exception as e:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Variable name "e" doesn't conform to snake_case naming style Warning

Variable name "e" doesn't conform to snake_case naming style

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
print(f"Error saving order to Firestore: {e}")

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 (bad-indentation) Warning

Bad indentation. Found 6 spaces, expected 12 (bad-indentation)

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12
raise HTTPException(status_code=500, detail="Failed to save order")

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 (bad-indentation) Warning

Bad indentation. Found 6 spaces, expected 12 (bad-indentation)

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 6 spaces, expected 12 Note

Bad indentation. Found 6 spaces, expected 12

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Consider explicitly re-raising using the 'from' keyword Note

Consider explicitly re-raising using the 'from' keyword

else:

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8
print(f"⏭️ Skipping event: {event_type}")

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning

Bad indentation. Found 4 spaces, expected 8 (bad-indentation)

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 4 spaces, expected 8 Note

Bad indentation. Found 4 spaces, expected 8

return {"status": "ok"}

Check warning

Code scanning / Prospector (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning

Bad indentation. Found 2 spaces, expected 4 (bad-indentation)

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Bad indentation. Found 2 spaces, expected 4 Note

Bad indentation. Found 2 spaces, expected 4
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
python-dotenv==1.2.1
python-jwt==4.1.0
python-multipart==0.0.21
razorpay==2.0.0
requests==2.32.5
requests-toolbelt==0.10.1
rsa==4.9.1
Expand All @@ -60,5 +61,5 @@
typing-inspection==0.4.2
typing_extensions==4.15.0
uritemplate==4.2.0
urllib3==2.6.3
urllib3==1.26.20

Check warning on line 64 in requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

requirements.txt#L64

Insecure dependency pypi/urllib3@1.26.20 (CVE-2025-50181: urllib3: urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation) (update to 2.5.0)

Check warning on line 64 in requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

requirements.txt#L64

Insecure dependency pypi/urllib3@1.26.20 (CVE-2025-66418: urllib3: urllib3: Unbounded decompression chain leads to resource exhaustion) (update to 2.6.0)

Check warning on line 64 in requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

requirements.txt#L64

Insecure dependency pypi/urllib3@1.26.20 (CVE-2025-66471: urllib3: urllib3 Streaming API improperly handles highly compressed data) (update to 2.6.0)

Check warning on line 64 in requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

requirements.txt#L64

Insecure dependency pypi/urllib3@1.26.20 (CVE-2026-21441: urllib3: urllib3 vulnerable to decompression-bomb safeguard bypass when following HTTP redirects (streaming API)) (update to 2.6.3)
uvicorn==0.40.0
Loading