Skip to content

Flask API Endpoints for Crime Data Queries (Erin) #48

@premkiran2

Description

@premkiran2

Description:
Add Restful endpoints in read_service for querying Crime data from the stlouis_gov_crime table (ensure columns: id, created_on, data_posted_on, is_active and necessary coloumns). Use SQLAlchemy for queries, filter only active records (is_active=1).

Acceptance Criteria:

  • Endpoints: GET /api/crime (paginated JSON response, only active data).
  • Inline docstrings and unit/integration tests (pytest + Flask test client).

Notes: Research and mention the source site (e.g., https://www.stlouis-mo.gov) in your PR title/description (e.g., "Add Crime API - Site: stlouis-mo.gov"). Update this issue with the exact site URL once confirmed. Ensure data_posted_on is parsed from site timestamps during ingestion.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions