Agama
No description available
Install / Use
/learn @hudolejev/AgamaREADME
AGAMA: A (very) Generic App to Manage Anything
Simple (and mostly pointless) list management app in Python, Flask and SQLAlchemy.

Purpose
This app is written mainly for demo purposes. It is used to illustrate various aspects of app deployment (not development) and system administration.
Do not treat this code as an example how to write Flask apps -- you can surely find some better ones.
Requirements
- Python 3 (known to work on v3.12.3)
- Flask (known to work on v3.0.2)
- Flask-SQLAlchemy (known to work on v3.0.3)
Optional for closer-to-production setups:
- MySQL or any other database that SQLAlchemy supports
- uWSGI or any other app server that can run Flask apps
- Nginx or any other web server that can 'talk' to your app server of choice
Installation
Install dependencies; recommended way is to use OS package manager, example for Debian/Ubuntu:
apt install python3-flask-sqlalchemy
Alternative way is to use pip -- but deploying to Python Virtualenv is
strongly recommended in this case:
/path/to/pip install Flask-SQLAlchemy
Note: do not use both pip and apt! Choose one method only.
Download the agama.py to the desired location.
That's it -- you're ready to go.
Configuration
AGAMA is configured with environment variables. Currently the only supported
parameter is AGAMA_DATABASE_URI which uses the same format as
SQLAlchemy database URLs,
example for SQLite:
AGAMA_DATABASE_URI=sqlite:////path/to/db.sqlite3
Running
Running manually -- only for development and/or testing purposes, example with SQLite:
export AGAMA_DATABASE_URI=sqlite:////path/to/db.sqlite3
/path/to/python3 /path/to/agama.py
Running with uWSGI -- example with MySQL;
database, database user and local system user agama should be created first:
[uwsgi]
chdir = /path/to/agama/dir
module = agama:app
env = AGAMA_DATABASE_URI=mysql://<username>:<password>@<db-host>/<db-name>
plugins = python3
socket = localhost:5000
uid = agama
You can also run it manually with MySQL backend, or with uWSGI and SQLite backend if you want.
Example Nginx configuration for uWSGI setup:
server {
listen 80 default_server;
server_name _;
location / {
uwsgi_pass localhost:5000;
include uwsgi_params;
}
}
Contributing
Issue reports and pull requests are warmly welcome.
Author
Juri Hudolejev -- initial design and implementation.
Special thanks to
- Roman Kuchin for testing
- Margus Laanem for Docker file improvements
License
MIT
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
