A Flask-based web application for retrieving and exporting charging session data from Charge Amps systems.
- Web interface for entering RFID and date range.
- Retrieves charging session data using Charge Amps API.
- Exports results as an Excel (
.xlsx) file. - Optional endpoint to fetch registered RFID tags.
- Python 3.8+
-
Clone the repository:
git clone https://github.com/yourusername/py-charge-amps.git cd py-charge-amps```
-
Create a virtual environment and activate it:
source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txtStart the Flask application:
python app.pyThen open your browser and go to http://127.0.0.1:5000/.
Click on Configure Connection Settings and fill out the required information (username, password, api key, etc.)
This project includes a multi-stage Dockerfile for building and running the application in a lightweight container.
From the root of the project directory, run:
docker build -t py-charge-amps .This builds the image using:
- Build stage: Installs all Python dependencies into a minimal install directory using Alpine Linux.
- Final stage: Copies only the necessary files and dependencies into the final image.
You can run the container with:
docker run -p 5000:5000 py-charge-amps- The app listens on port 5000 by default.
- hypercorn is used as the ASGI server.
- You can configure credentials within the website
MIT License. See LICENSE file for details.