luplo.core.projects¶
CRUD operations for the projects table.
Projects are the top-level scope for all luplo data. Every item, system, work unit, and glossary group belongs to exactly one project.
Functions¶
|
Create a new project. |
|
Fetch a project by ID. Returns |
|
List all projects ordered by creation date (newest first). |
Module Contents¶
- async luplo.core.projects.create_project(conn: psycopg.AsyncConnection[Any], *, name: str, description: str | None = None, id: str | None = None) luplo.core.models.Project¶
Create a new project.
- Parameters:
conn – Async psycopg connection.
name – Unique project name.
description – Optional description.
id – Optional ID override; auto-generated UUID4 if omitted.
- Returns:
The newly created
Project.- Raises:
psycopg.errors.UniqueViolation – If name already exists.
- async luplo.core.projects.get_project(conn: psycopg.AsyncConnection[Any], project_id: str) luplo.core.models.Project | None¶
Fetch a project by ID. Returns
Noneif not found.
- async luplo.core.projects.list_projects(conn: psycopg.AsyncConnection[Any]) list[luplo.core.models.Project]¶
List all projects ordered by creation date (newest first).