MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / get_project

Function get_project

app/api/agentops/opsboard/views/projects.py:54–70  ·  view source on GitHub ↗

Get a specific project by ID. User must be a member of the project's organization.

(
    *,
    request: Request,
    project_id: str,
    orm: Session = Depends(get_orm_session),
)

Source from the content-addressed store, hash-verified

52
53
54def get_project(
55 *,
56 request: Request,
57 project_id: str,
58 orm: Session = Depends(get_orm_session),
59) -> ProjectResponse:
60 """
61 Get a specific project by ID.
62 User must be a member of the project's organization.
63 """
64 project = ProjectModel.get_by_id(orm, project_id)
65
66 if not project or not project.org.is_user_member(request.state.session.user_id):
67 raise HTTPException(status_code=404, detail="Project not found")
68
69 project.org.set_current_user(request.state.session.user_id)
70 return ProjectResponse.model_validate(project)
71
72
73def create_project(

Callers 3

test_get_projectFunction · 0.90

Calls 3

is_user_memberMethod · 0.80
set_current_userMethod · 0.80
get_by_idMethod · 0.45

Tested by 3

test_get_projectFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…