This project provides a web application to turn Excel files into dynamic RESTful APIs. Users can upload Excel files, define input/output mappings, and expose calculations as API endpoints.
- User Authentication: Register and log in to manage your files and calculations.
- Excel File Management: Upload, list, and delete Excel files.
- Calculation Mapping: Define which cells are inputs and outputs for each calculation.
- Run Calculations: Provide input values via web forms or API, and receive calculated outputs.
- Dynamic API Endpoints: Each calculation is accessible via a unique RESTful endpoint.
- Visit
/register
to create an account. - Login at
/login
.
- Go to the Home page after login.
- Use the upload form to add
.xlsx
files.
- Click "Create New Calculation".
- Select an Excel file, name the calculation, and specify input/output cells (e.g.,
DATA!B1, DATA!B2
).
- From the Home page, click "Run" next to a calculation.
- Enter input values and submit to see results.
- Visit
/api
to see all calculation endpoints. - Example API call:
curl -X GET "http://localhost:5000/calculation/api/<calculation_id>?INPUT1=val1&INPUT2=val2"
app/
– Main application code (models, routes, services, repositories)uploads/
– Uploaded Excel filesinstance/
– SQLite databasetests/
– Unit tests
Install dependencies:
pip install -r requirements.txt
Run the app:
python run.py
You can run the application using Docker:
-
Build the Docker image:
docker build -t excel-to-api .
-
Run the container:
docker run -p 5000:5000 excel-to-api
This will start the app on http://localhost:5000.
- Optimize recalculations → cache results (don’t always recalculate Excel, store results in JSON).
- Add some tests
- Support custom names for calculations in the API.