A basic Flask backend API server with hello world endpoints.
- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
# Copy the example environment file
cp env.example .env
# Edit .env file with your desired values
# FLASK_HOST=0.0.0.0
# FLASK_PORT=5000- Run the server:
python app.pyThe server will start on http://localhost:8000 by default.
- Build the Docker image:
docker build -t pysv .- Run the container:
docker run -d \
--name pysv-app \
-p 8000:8000 \
-v $(pwd)/data:/app/data \
-e GEMINI_API_KEY=your_api_key_here \
pysv- Create a
.envfile with your environment variables:
cp env.example .env
# Edit .env file with your values, especially GEMINI_API_KEY- Run with Docker Compose:
docker-compose -f docker-compose.prod.yml up -d- Check logs:
docker-compose -f docker-compose.prod.yml logs -f- Stop the service:
docker-compose -f docker-compose.prod.yml downThe application will be available at http://localhost:8000.
The app loads environment variables from a .env file. You can customize the host and port by editing the .env file:
# Copy the example file
cp env.example .env
# Edit .env file
FLASK_HOST=127.0.0.1
FLASK_PORT=8000
DATA_PATH=./data
CONFIG_FILE_PATH=./data/config.json./data/config.json
{
"dee_token": "",
"dee_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36"
}
./google-service-key.json
- GET /api/tasks
- POST /api/tasks
- GET /api/tasks/<task_id>/result
- GET /api/tasks/<task_id>/thumbnail