Python backend for a Slack's kudos plugin.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add manager

+33 -1
+1 -1
kefi/routers/helpers.py
··· 92 92 session=self.session, 93 93 ) 94 94 except ValueError: 95 - return SimpleResponse("¡No tienes suficientes kefis! :money_with_wings:") 95 + return SimpleResponse("¡No tienes suficientes kefis! 💸") 96 96 # Notify receiver in private chat 97 97 notify_receiver_user_chat_action( 98 98 action=action,
+32
manage.py
··· 1 + #!/usr/bin/env python 2 + from typing import Dict 3 + 4 + from IPython import start_ipython 5 + 6 + 7 + def kefi_namespace() -> Dict: 8 + """Defines a dict with the scope to use in the shell. By default we add: 9 + - Models 10 + - Session 11 + - Settings 12 + """ 13 + from sqlmodel import Session, select 14 + 15 + from kefi.config import settings 16 + from kefi.models.database import Action, Transaction, User, engine 17 + 18 + session = Session(engine) 19 + return { 20 + "Action": Action, 21 + "Transaction": Transaction, 22 + "User": User, 23 + "settings": settings, 24 + "engine": engine, 25 + "session": session, 26 + "select": select, 27 + } 28 + 29 + 30 + if __name__ == "__main__": 31 + # Starts ipython with the gave namespace 32 + start_ipython(user_ns=kefi_namespace())