# the class is the table ยท the function is the unit
from skaal import App, Store, Topic
from pydantic import BaseModel
class User(BaseModel):
id: str
email: str
class Users(Store[User]): ...
class SignupEvents(Topic[User]): ...
app = App("acme")
@app.expose
async def signup(user: User) -> User:
await Users.put(user.id, user)
await SignupEvents.publish(user)
return user