How affrin-19005/teamcity-calculator works
This is a small Flask calculator: a browser submits two numbers and an operation, the server validates and calculates, and the browser displays the result or an error. The runtime has a UI template, browser-side interaction, a Flask endpoint, and arithmetic logic. The template and styles were not excerpted, so their implementation details and their connection to the browser script are not assumed.
Main entry points: app.py Calculation endpoint · script.js Browser interaction · index.html Calculator page
Components 5
Browser
- Calculator page
templates/index.html - Browser interaction
static/script.js
Flask server
- Calculation endpoint
app.py - Arithmetic logic
app.py
Other components
- User
Connections 5
- Calculation endpoint → Calculator page: renders
app.py - User → Browser interaction: uses
- Browser interaction → Calculation endpoint: POSTs calculation
static/script.js - Calculation endpoint → Arithmetic logic: calculates
app.py - Calculation endpoint → Browser interaction: returns JSON
static/script.js