integrate/app/consumer/baseConsumer.py
Philipp Rothmann 73c5440454 uff
2022-04-29 14:56:51 +02:00

26 lines
No EOL
467 B
Python

from abc import ABC, abstractclassmethod, abstractproperty
from pydantic import BaseModel
class BaseUser(BaseModel):
email: str
name: str
username: str
class BaseGroup(BaseModel):
name: str
class Consumer(ABC):
@abstractproperty
def api(self):
pass
@abstractclassmethod
def create_user(user: BaseUser) -> BaseUser:
pass
@abstractclassmethod
def create_group(group: BaseGroup) -> BaseGroup:
pass