Project Models
ProjectConfig, Organization, and ProjectMember — the core project-level data models.
from optixlog.management import ProjectConfig, Organization, ProjectMemberProjectConfig
A frozen snapshot of a project's configuration as stored on the server.
Signature
@dataclass(frozen=True)
class ProjectConfig:
id: str
name: str
description: str | None
category: str | None
icon: str | None
notes: str | None
status: str
created_at: datetime
updated_at: datetime
def to_dict(self) -> dict[str, Any]: ...Fields
Prop
Type
ProjectConfig.to_dict()
Return the config as a plain Python dictionary. Datetime fields are serialised to ISO 8601 strings.
Signature
def to_dict(self) -> dict[str, Any]: ...Returns — dict[str, Any]: keys match the field names above; created_at and updated_at are ISO 8601 strings (from datetime.isoformat()).
Side effects — None (read-only).
Raises — Does not raise.
Example
from optixlog import SDKClient
from optixlog.management import Management
client = SDKClient(base_url="https://optixlog.leidos.com", api_key="sk-opt-...")
config = Management(client).project("proj_grating_7f3a").config.get()
print(config.name) # Grating Coupler Lab
print(config.status) # active
as_dict = config.to_dict()
print(as_dict["created_at"]) # 2024-03-01T12:00:00+00:00Organization
A frozen snapshot of the organization that owns the project.
Signature
@dataclass(frozen=True)
class Organization:
id: str
name: str
description: str | None
logo_url: str | None
company_size: str | None
industry: str | None
website: str | None
contact_name: str | None
contact_email: str | None
contact_phone: str | None
created_at: datetime
updated_at: datetimeFields
Prop
Type
Example
org = Management(client).project("proj_grating_7f3a").organization.get()
print(org.name) # Leidos Photonics Group
print(org.industry) # SemiconductorsProjectMember
Represents a single member of a project. When memberships are included, the memberships list contains one entry per team the user belongs to within this project.
Signature
@dataclass(frozen=True)
class ProjectMember:
user_ref: EntityRef
memberships: list[TeamMembership] | None = NoneFields
Prop
Type
Example
page = Management(client).project("proj_grating_7f3a").get_all_members(
include_memberships=True,
)
for member in page.items:
print(member.user_ref.id, member.user_ref.name)
if member.memberships:
for ms in member.memberships:
print(f" team {ms.team_ref.id}, role={ms.role}")