Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Specify
  • Loading branch information
RickiJay-WMDE committed Aug 29, 2025
commit bd8f5a5e98d942177af093405b154143e0a9c89c
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def read_root():


@app.get("/csv/metrics", response_class=StreamingResponse)
async def metric_csv(request: Request, background_tasks: BackgroundTasks):
async def metric_csv(
request: Request, background_tasks: BackgroundTasks
) -> StreamingResponse:
"""Quantity CSV"""

# authenticate_request(request)
Expand Down
7 changes: 4 additions & 3 deletions export_csv/metric.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Quantity CSV"""

from fastapi import BackgroundTasks
from sqlalchemy import and_, func, or_, select
from fastapi.responses import StreamingResponse
from sqlalchemy import Select, and_, func, or_, select

from export_csv.util import export_csv
from model.database import (
Expand All @@ -15,7 +16,7 @@
from model.enum import WikibaseType


async def export_metric_csv(background_tasks: BackgroundTasks):
async def export_metric_csv(background_tasks: BackgroundTasks) -> StreamingResponse:
"""CSV with Requested Metrics"""

query = get_metrics_query()
Expand All @@ -28,7 +29,7 @@ async def export_metric_csv(background_tasks: BackgroundTasks):
)


def get_metrics_query():
def get_metrics_query() -> Select:
"""
Filter Out Offline and Test Wikis

Expand Down