Management system for student clubs. https://flaschengeist.dev
Go to file
Ferdinand Thiessen 1011360694 fix(core) Fix entry point name 2021-11-28 22:24:49 +01:00
flaschengeist fix(core) Fix entry point name 2021-11-28 22:24:49 +01:00
tests [cleanup] PEP8 cleanup 2021-11-18 12:56:02 +01:00
.git-blame-ignore-revs [Plugin] balance: Enhanced the model by adding serialization members 2020-11-01 18:38:53 +01:00
.gitignore gitignore 2021-11-18 12:57:18 +01:00
LICENSE [core] Added license and added setup information 2021-04-02 06:58:47 +02:00
flaschengeist.wsgi [Plugin] Fixed return values in auth and users routes 2020-10-31 15:20:28 +01:00
readme.md [db] Fix warnings and fix readme 2021-11-12 11:34:42 +01:00
run_flaschengeist feat(cli) Allow assigning all permissions to one group from cli 2021-11-28 22:23:34 +01:00
setup.cfg [core] Added license and added setup information 2021-04-02 06:58:47 +02:00
setup.py fix(core) Fix entry point name 2021-11-28 22:24:49 +01:00

readme.md

Flaschengeist

This is the backend of the Flaschengeist.

Installation

Requirements

  • mysql or mariadb
    • maybe libmariadb development files[1]
  • python 3.7+

[1] By default Flaschengeist uses mysql as database backend, if you are on Windows Flaschengeist uses PyMySQL, but on Linux / Mac the faster mysqlclient is used, if it is not already installed installing from pypi requires the development files for libmariadb to be present on your system.

Install python files

pip3 install --user .

or with ldap support

pip3 install --user ".[ldap]"

or if you want to also run the tests:

pip3 install --user ".[ldap,test]"

You will also need a MySQL driver, recommended drivers are

  • mysqlclient
  • PyMySQL

setup.py will try to install a matching driver.

Windows

Same as above, but if you want to use mysqlclient instead of PyMySQL (performance?) you have to follow this guide:

https://www.radishlogic.com/coding/python-3/installing-mysqldb-for-python-3-in-windows/

Configuration

Configuration is done within the a flaschengeist.tomlfile, you can copy the one located inside the module path (where flaschegeist is installed) or create an empty one and place it inside either:

  1. ~/.config/
  2. A custom path and set environment variable FLASCHENGEIST_CONF

Uncomment and change at least all the database parameters!

Database installation

The user needs to have full permissions to the database. If not you need to create user and database manually do (or similar on Windows):

(
    echo "CREATE DATABASE flaschengeist;"
    echo "CREATE USER 'flaschengeist'@'localhost' IDENTIFIED BY 'flaschengeist';"
    echo "GRANT ALL PRIVILEGES ON flaschengeist.* TO 'flaschengeist'@'localhost';"
    echo "FLUSH PRIVILEGES;"
) | sudo mysql

Then you can install the database tables and initial entries:

run_flaschengeist install

Run

run_flaschengeist run

or with debug messages:

run_flaschengeist run --debug

This will run the backend on http://localhost:5000

Tests

$ pip install '.[test]'
$ pytest

Run with coverage report:

$ coverage run -m pytest
$ coverage report

Or with html output (open htmlcov/index.html in a browser):

$ coverage html

Development

Please refer to our development wiki.