This repository contains a Flask-based web application for managing calibration data files for Pandora instruments. The system allows for processing calibration files, querying data, and retrieving file contents through a RESTful API.
- Process and store calibration files
- Query calibration data based on specific keys
- Retrieve full content of calibration files
- Health check endpoint
- List all calibration files in the system
- File Name -
LuftBlick.postman_collection.json
- Python 3.11
- Flask
- SQLAlchemy
- SQLite
- Docker
.
├── Dockerfile
├── README.md
├── app.py
├── calibration_files
│ └── Pandora101s1_CF_v12d20230620.txt
├── docker-compose.yml
├── instance
│ └── calibration.db
├── models.py
├── requirements.in
└── requirements.txt
-
Clone the repository:
git clone https://github.com/akshatjain-beam/luftblick.git cd luftblick
-
Build and Run the Docker image:
docker-compose up --build
The application will be accessible at http://localhost:5001
.
-
Clone the repository:
git clone https://github.com/akshatjain-beam/luftblick.git cd luftblick
-
Create a virtual environment and activate it:
python3.11 -m venv venv && source venv/bin/activate
-
Upgarde the pip
pip install --upgrade pip
-
If want to use the
requirements.in
file for populating therequirements.txt
file(optional):pip install pip-tools
pip-compile --resolver=backtracking requirements.in
-
Install the required packages:
pip install -r requirements.txt
-
Run the application:
python app.py
The application will be accessible at http://localhost:5001
.
-
Process Files
- URL:
/api/process_files
- Method: POST
- Description: Processes calibration files in the
calibration_files
directory and saves the data in the database.
- URL:
-
Query Calibration Data
- URL:
/api/query
- Method: GET
- Description: Queries calibration data based on provided keys.
- URL:
-
Health Check
- URL:
/api/health
- Method: GET
- Description: Checks the health status of the application.
- URL:
-
Get File Content
- URL:
/api/get_content
- Method: GET
- Parameters:
filename
- Description: Retrieves the content of a specific calibration file.
- URL:
-
List Calibration Files
- URL:
/api/calibration_files
- Method: GET
- Description: Lists all calibration files in the system.
- URL:
This guide will help you import a JSON file into Postman, enabling you to load collections, environments, or data files.
- Ensure you have Postman installed on your computer.
-
Open Postman
Launch the Postman application on your computer.
-
Go to the Import Page
- Click on the
Import
button located at the top left corner of the Postman interface. - Alternatively, you can use the shortcut
Ctrl + O
(Windows/Linux) orCmd + O
(Mac) to open the import dialog.
- Click on the
-
Select Import Method
- In the import dialog, choose the
File
tab.
- In the import dialog, choose the
-
Upload Your JSON File
- Drag and drop your JSON file into the import window, or click
Choose Files
to browse and select the file from your computer. - In our case, the file is present at
LuftBlick.postman_collection.json
inluftblick
folder.
- Drag and drop your JSON file into the import window, or click
-
Import the File
- Once your file is selected, click the
Import
button to start the import process.
- Once your file is selected, click the
-
Verify Import
- After importing, check the
Collections
tab (orEnvironments
, if applicable) to ensure your data has been correctly loaded.
- After importing, check the