Trinity-py icon indicating copy to clipboard operation
Trinity-py copied to clipboard

A Flask-based CMS / web application for compatibility and simplicity.

Trinity-py

stability-experimental PEP8

WIP Youtube Demonstration

Recently rewritten for performance

✔ gzip compression (flask-compress)
✔ jinja2 caching
✔ py3.6+ f-strings bench
✔ mysql high concurrency bench
✔ ujson ultra fast json bench

Using least ammount of modules possible

flask, flask-compress, pymysql, passlib, ujson, argon2_cffi (encryption backend)

How to setup

  • Install Python 3.6+ https://www.python.org/

  • Install MySQL Server https://www.apachefriends.org/index.html

  • Configure config.json

  • Import mysqldb.sql into your database. (default user included tr4-admin:password)


Run the command below to install required modules. (pip or pip3)

$ pip install -r requirements.txt

Q: How do i know what python verison pip is using?

$ pip -V

How to run

Trinity was built with compatibility in mind for multiple setups.

Local / development environment

$ python local_server.py
Windows users can simply launch win_launch.bat

Gunicorn production environment

Recommended way (docs: gunicorn docs apache/nginx+gunicorn docs)
$ gunicorn --workers=4 app:app

Passenger production environment

  • See passenger_wsgi.py
(http://griimnak.me/trinity runs on passenger through cpanel)

Windows waitress production environment

Waitress is a gunicorn alternative for windows.
$ pip install waitress
$ waitress-serve --listen=127.0.0.1:80 -w 4 app:app



Screenshots

[4/10/2018] Alt Text

[4/5/2018] Alt Text

[4/4/2018] Alt Text

[4/2/2018] Alt Text