Skip to content

Flask-based API client that enables Authentication using Bearer Token (cached with TTL). Fetching and Processing hierarchical data into a structured format, Running inside Docker for easy setup.

Notifications You must be signed in to change notification settings

medro25/FlaskAPI_dev

Repository files navigation

🏆 Flask API Application

A Flask-based API client , enabling:

  • Authentication using Bearer Token (cached with TTL).
  • Fetching event & participant details.
  • Processing hierarchical data into a structured format.
  • Exporting participant data to a CSV file.
  • Running inside Docker for easy setup.

📑 Table of Contents


🛠 Setup Instructions

Prerequisites

Ensure you have installed:

  • Python 3.10+ (if running locally)
  • Docker & Docker Compose (recommended for container execution)
  • pip (for package management)

🌍 API Access Requirements

  • You need valid credentials (LUXID_API_USERNAME and LUXID_API_PASSWORD) to authenticate.

🚀 Running with Docker (Recommended)

Clone the Repository

https://github.com/medro25/FlaskApp_Luxid

Create a .env File

echo "LUXID_API_USERNAME=your_username" > .env
echo "LUXID_API_PASSWORD=your_password" >> .env

Build & Run the Application

docker-compose up

Access API

 http://localhost:5000/fetch-participant-info

Stop & Remove Containers (when done)

docker-compose down

⚙️ Running Locally (Without Docker)

Clone Repository

git clone https://github.com/YOUR_USERNAME/luxid-flask-app.git
cd luxid-flask-app

Create Virtual Environment

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

Install Dependencies

pip install -r requirements.txt

Create a .env File (if not already created)

echo "LUXID_API_USERNAME=your_username" > .env
echo "LUXID_API_PASSWORD=your_password" >> .env

Run Flask Application

python app.py

API will now be accessible at:

"API running at: http://localhost:5000/fetch-participant-info"

🧪 Running Tests

✅ Run Tests Locally

pytest -v

✅ Run Tests in Docker

docker-compose run --rm flask-app pytest -v

✅ Run Specific Test

pytest tests/test_api_client.py -v

About

Flask-based API client that enables Authentication using Bearer Token (cached with TTL). Fetching and Processing hierarchical data into a structured format, Running inside Docker for easy setup.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published