chariot.projects package

Submodules

chariot.projects.projects module

exception chariot.projects.projects.MultipleOrganizationsError(org_id_name_list)[source]

Bases: Exception

exception chariot.projects.projects.MultipleProjectsError(project_id_name_list)[source]

Bases: Exception

exception chariot.projects.projects.OrganizationDoesNotExistError(organization_name=None)[source]

Bases: Exception

class chariot.projects.projects.ParentProject(*, id: str, name: str, parent_id: str | None = None)[source]

Bases: BaseModel

id: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
parent_id: str | None
class chariot.projects.projects.Project(*, id: str, name: str, description: str | None = None, created_at: datetime, updated_at: datetime, organization_id: str | None = None, visibility: str | None = None, parents: list[ParentProject] | None = None, tags: list[Tag] | None = None)[source]

Bases: BaseModel

created_at: datetime
description: str | None
id: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
organization_id: str | None
parents: list[ParentProject] | None
tags: list[Tag] | None
updated_at: datetime
visibility: str | None
exception chariot.projects.projects.ProjectDoesNotExistError(project_name, subproject_name=None)[source]

Bases: Exception

class chariot.projects.projects.Tag(*, key: str, value: str)[source]

Bases: BaseModel

key: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

value: str
chariot.projects.projects.create_project(name: str, description: str, parent_id: str | None = None, organization_id: str | None = None, visibility: str | None = None)[source]
chariot.projects.projects.get_global_project_id() str[source]

Deprecated - Returns the id of the global project, will error if organizations are enabled

chariot.projects.projects.get_organization_id(organization_name: str | None = None) str[source]
chariot.projects.projects.get_project_id(project_name: str | None = None, subproject_name: str | None = None, organization_id: str | None = None) str[source]

Gets the project id from (sub)project names. If project_name is None then it assumes the project is the global project An organization is required when they are enabled and subproject_name is ignored.

chariot.projects.projects.get_projects(*, limit: int = 10, offset: int = 0, organization_id: str | None = None) list[Project][source]
chariot.projects.projects.organizations_enabled() bool[source]

Returns True if chariot is running with organizations enabled

Module contents