gitea.project.async_project
async_project
Asynchronous Gitea Project resource.
Classes
gitea.project.async_project.AsyncProject
Bases: BaseProject, AsyncResource
Asynchronous Gitea Project resource.
Source code in src/gitea/resource/async_resource.py
Methods:
gitea.project.async_project.AsyncProject.list_projects
async
list_projects(
owner: str,
repository: str | None,
state: Literal["open", "closed", "all"] | None = None,
page: int | None = None,
limit: int | None = None,
**kwargs: Any,
) -> tuple[list[dict[str, Any]], dict[str, Any]]
List projects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
state
|
Literal['open', 'closed', 'all'] | None
|
Filter projects by state. |
None
|
page
|
int | None
|
The page number for pagination. |
None
|
limit
|
int | None
|
The number of projects per page. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[list[dict[str, Any]], dict[str, Any]]
|
A tuple containing a list of projects as dictionaries and a dictionary with metadata. |
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.get_project
async
get_project(
owner: str,
repository: str | None,
project_id: int,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Get a project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the project as a dictionary and a dictionary with metadata. |
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.create_project
async
create_project(
owner: str,
repository: str | None,
title: str,
description: str | None = None,
template_type: str | None = None,
card_type: str | None = None,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Create a project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
title
|
str
|
The title of the project. |
required |
description
|
str | None
|
The description of the project. |
None
|
template_type
|
str | None
|
The template type of the project. |
None
|
card_type
|
str | None
|
The card type of the project. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the created project as a dictionary and a dictionary with metadata. |
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.edit_project
async
edit_project(
owner: str,
repository: str | None,
project_id: int,
title: str | None = None,
description: str | None = None,
card_type: str | None = None,
state: Literal["open", "closed"] | None = None,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Edit a project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
title
|
str | None
|
The title of the project. |
None
|
description
|
str | None
|
The description of the project. |
None
|
card_type
|
str | None
|
The card type of the project. |
None
|
state
|
Literal['open', 'closed'] | None
|
The state of the project. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the edited project as a dictionary and a dictionary with metadata. |
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.delete_project
async
delete_project(
owner: str,
repository: str | None,
project_id: int,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Delete a project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the response as a dictionary and a dictionary with metadata. |
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.list_project_columns
async
list_project_columns(
owner: str,
repository: str | None,
project_id: int,
page: int | None = None,
limit: int | None = None,
**kwargs: Any,
) -> tuple[list[dict[str, Any]], dict[str, Any]]
List a project's columns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
page
|
int | None
|
The page number for pagination. |
None
|
limit
|
int | None
|
The number of columns per page. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
list[dict[str, Any]]
|
A tuple containing a list of columns as dictionaries and a dictionary with metadata. |
dict[str, Any]
|
A column is keyed as the API keys it - |
tuple[list[dict[str, Any]], dict[str, Any]]
|
|
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.create_project_column
async
create_project_column(
owner: str,
repository: str | None,
project_id: int,
title: str,
color: str | None = None,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Create a column in a project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
title
|
str
|
The title of the column. |
required |
color
|
str | None
|
The color of the column in 6-digit hex format. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A tuple containing the created column as a dictionary and a dictionary with metadata. |
dict[str, Any]
|
A column is keyed as the API keys it - |
tuple[dict[str, Any], dict[str, Any]]
|
|
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.get_project_column
async
get_project_column(
owner: str,
repository: str | None,
project_id: int,
column_id: int,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Get a project column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
column_id
|
int
|
The ID of the column. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A tuple containing the column as a dictionary and a dictionary with metadata. |
dict[str, Any]
|
A column is keyed as the API keys it - |
tuple[dict[str, Any], dict[str, Any]]
|
|
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.edit_project_column
async
edit_project_column(
owner: str,
repository: str | None,
project_id: int,
column_id: int,
title: str | None = None,
color: str | None = None,
sorting: int | None = None,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Edit a project column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
column_id
|
int
|
The ID of the column. |
required |
title
|
str | None
|
The title of the column. |
None
|
color
|
str | None
|
The color of the column in 6-digit hex format. |
None
|
sorting
|
int | None
|
The position of the column within the project. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A tuple containing the edited column as a dictionary and a dictionary with metadata. |
dict[str, Any]
|
A column is keyed as the API keys it - |
tuple[dict[str, Any], dict[str, Any]]
|
|
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.delete_project_column
async
delete_project_column(
owner: str,
repository: str | None,
project_id: int,
column_id: int,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Delete a project column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
column_id
|
int
|
The ID of the column. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the response as a dictionary and a dictionary with metadata. |
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.set_default_project_column
async
set_default_project_column(
owner: str,
repository: str | None,
project_id: int,
column_id: int,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Set a project's default column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
column_id
|
int
|
The ID of the column. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the response as a dictionary and a dictionary with metadata. |
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.move_project_columns
async
move_project_columns(
owner: str,
repository: str | None,
project_id: int,
column_ids: list[int],
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Reorder a project's columns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
column_ids
|
list[int]
|
Every column ID of the project, in the desired left-to-right order. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the response as a dictionary and a dictionary with metadata. |
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.list_project_column_issues
async
list_project_column_issues(
owner: str,
repository: str | None,
project_id: int,
column_id: int,
page: int | None = None,
limit: int | None = None,
**kwargs: Any,
) -> tuple[list[dict[str, Any]], dict[str, Any]]
List the issues in a project column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
column_id
|
int
|
The ID of the column. |
required |
page
|
int | None
|
The page number for pagination. |
None
|
limit
|
int | None
|
The number of issues per page. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[list[dict[str, Any]], dict[str, Any]]
|
A tuple containing a list of issues as dictionaries and a dictionary with metadata. |
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.add_issue_to_project_column
async
add_issue_to_project_column(
owner: str,
repository: str | None,
project_id: int,
column_id: int,
issue_id: int,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Add an issue to a project column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
column_id
|
int
|
The ID of the column. |
required |
issue_id
|
int
|
The ID of the issue. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the response as a dictionary and a dictionary with metadata. |
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.remove_issue_from_project_column
async
remove_issue_from_project_column(
owner: str,
repository: str | None,
project_id: int,
column_id: int,
issue_id: int,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Remove an issue from a project column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
column_id
|
int
|
The ID of the column. |
required |
issue_id
|
int
|
The ID of the issue. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the response as a dictionary and a dictionary with metadata. |
Source code in src/gitea/project/async_project.py
gitea.project.async_project.AsyncProject.move_project_issue
async
move_project_issue(
owner: str,
repository: str | None,
project_id: int,
issue_id: int,
column_id: int,
sorting: int | None = None,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Move an issue between a project's columns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str | None
|
The name of the repository, or None for organization projects. |
required |
project_id
|
int
|
The ID of the project. |
required |
issue_id
|
int
|
The ID of the issue. |
required |
column_id
|
int
|
The target column ID. |
required |
sorting
|
int | None
|
The position within the column, ascending. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the response as a dictionary and a dictionary with metadata. |