MCPcopy Index your code
hub / github.com/AgentOps-AI/agentops / get_by_id

Method get_by_id

app/api/agentops/deploy/models.py:79–88  ·  view source on GitHub ↗

Get a hosting project by ID with project and org relationships preloaded.

(cls, session: orm.Session, project_id: str | UUID)

Source from the content-addressed store, hash-verified

77
78 @classmethod
79 def get_by_id(cls, session: orm.Session, project_id: str | UUID) -> Optional[HostingProjectModel]:
80 """Get a hosting project by ID with project and org relationships preloaded."""
81 from agentops.opsboard.models import ProjectModel
82
83 return (
84 session.query(cls)
85 .filter(cls.id == normalize_uuid(project_id))
86 .options(joinedload(cls.project).joinedload(ProjectModel.org))
87 .first()
88 )
89
90 @classmethod
91 def get_or_create_by_id(cls, session: orm.Session, project_id: str | UUID) -> HostingProjectModel:

Callers 4

get_or_create_by_idMethod · 0.45
__call__Method · 0.45
__call__Method · 0.45
get_hosting_projectMethod · 0.45

Calls 2

normalize_uuidFunction · 0.70
filterMethod · 0.45

Tested by

no test coverage detected