repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | from models import AppModel |
| #2 | from sqlalchemy.orm import Session |
| #3 | |
| #4 | |
| #5 | def get_app(db: Session, app_id: str): |
| #6 | return db.query(AppModel).filter(AppModel.app_id == app_id).first() |
| #7 | |
| #8 | |
| #9 | def get_apps(db: Session, skip: int = 0, limit: int = 100): |
| #10 | return db.query(AppModel).offset(skip).limit(limit).all() |
| #11 | |
| #12 | |
| #13 | def save_app(db: Session, app_id: str, config: str): |
| #14 | db_app = AppModel(app_id=app_id, config=config) |
| #15 | db.add(db_app) |
| #16 | db.commit() |
| #17 | db.refresh(db_app) |
| #18 | return db_app |
| #19 | |
| #20 | |
| #21 | def remove_app(db: Session, app_id: str): |
| #22 | db_app = db.query(AppModel).filter(AppModel.app_id == app_id).first() |
| #23 | db.delete(db_app) |
| #24 | db.commit() |
| #25 | return db_app |
| #26 |