Skip to content

Flask microservice + shared DB package#368

Open
jessiclassy wants to merge 12 commits intomainfrom
333-calendar-v20-flask-endpoints
Open

Flask microservice + shared DB package#368
jessiclassy wants to merge 12 commits intomainfrom
333-calendar-v20-flask-endpoints

Conversation

@jessiclassy
Copy link
Copy Markdown
Collaborator

new parallel service calendar-feed serves up Flask application to produce subscripton calendar feeds:

  • Service endpoints:
    • /health should return {status: 'ok'}
    • /status should return last deploy time (nice-to-have for DigitalOean)
  • .ics subscription feed endpoints
    • /feed/chamber/<chamber_id>
    • /feed/committee/<committee_id>
    • /feed/org/<org_token>
    • /feed/user/<user_token>
    • /feed/working-group/<user_token>
  • JSON feed endpoints as an option for web app consumption or future API offering
    • /feed/chamber/<chamber_id>/json
    • /feed/committee/<committee_id>/json
    • /feed/org/<org_token>/json
    • /feed/user/<user_token>/json
    • /feed/working-group/<user_token>/json

Also included in this PR is a shared db package

  • DB package contains functionality to share across feed, web app and other future services
    • db.connect returns a connection through a context manager, from db.connect import get_conn; with get_conn() as conn...
    • db.tokens defines relevant calendar access token functions
    • db.admin defines relevant admin-only functions for calendar access (backfilling tokens, clear/reset)
    • db.calendar_queries defines shared queries between web app calendar page and Flask calendar feed
  • Service Docker container must be run from repo root (must alter DigitalOcean source directory to match)
  • NB: DigitalOcean app spec needs to identify Dockerfile location within the service package

@jessiclassy jessiclassy requested a review from dsherbini April 3, 2026 23:45
@jessiclassy jessiclassy self-assigned this Apr 3, 2026
@jessiclassy jessiclassy linked an issue Apr 3, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calendar v2.0 Flask endpoints

1 participant