Parameter Groups
albert.collections.parameter_groups.ParameterGroupCollection
Bases: BaseCollection
ParameterGroupCollection is a collection class for managing ParameterGroup entities in the Albert platform.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session
|
AlbertSession
|
The Albert session to use for making requests. |
required |
Methods:
Name | Description |
---|---|
get_by_id |
Get a parameter group by its ID. |
get_by_ids |
|
search |
Search for Parameter Groups matching the given criteria. |
get_all |
Search and hydrate all Parameter Groups matching the given criteria. |
delete |
Delete a parameter group by its ID. |
create |
Create a new parameter group. |
get_by_name |
Get a parameter group by its name. |
update |
Update a parameter group. |
Attributes:
Name | Type | Description |
---|---|---|
base_path |
|
Source code in src/albert/collections/parameter_groups.py
get_by_id
get_by_id(*, id: ParameterGroupId) -> ParameterGroup
Get a parameter group by its ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The ID of the parameter group to retrieve. |
required |
Returns:
Type | Description |
---|---|
ParameterGroup
|
The parameter group with the given ID. |
Source code in src/albert/collections/parameter_groups.py
get_by_ids
get_by_ids(
*, ids: list[ParameterGroupId]
) -> list[ParameterGroup]
Source code in src/albert/collections/parameter_groups.py
search
search(
*,
text: str | None = None,
types: PGType | list[PGType] | None = None,
order_by: OrderBy = DESCENDING,
offset: int | None = None,
max_items: int | None = None,
) -> Iterator[ParameterGroupSearchItem]
Search for Parameter Groups matching the given criteria.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text
|
str
|
Text to search for. |
None
|
types
|
PGType or list of PGType
|
Filter by Parameter Group types. |
None
|
order_by
|
OrderBy
|
Order of results. Default is DESCENDING. |
DESCENDING
|
offset
|
int
|
Offset to begin results from. |
None
|
max_items
|
int
|
Maximum number of items to return in total. If None, fetches all available items. |
None
|
Yields:
Type | Description |
---|---|
Iterator[ParameterGroupSearchItem]
|
Iterator of ParameterGroupSearchItem entities, which are partial representations of Parameter Groups. |
Source code in src/albert/collections/parameter_groups.py
get_all
get_all(
*,
text: str | None = None,
types: PGType | list[PGType] | None = None,
order_by: OrderBy = DESCENDING,
offset: int | None = None,
max_items: int | None = None,
) -> Iterator[ParameterGroup]
Search and hydrate all Parameter Groups matching the given criteria.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text
|
str
|
Text to search for. |
None
|
types
|
PGType or list of PGType
|
Filter by Parameter Group types. |
None
|
order_by
|
OrderBy
|
Order of results. Default is DESCENDING. |
DESCENDING
|
offset
|
int
|
Offset to begin results from. |
None
|
max_items
|
int
|
Maximum number of items to return in total. If None, fetches all available items. |
None
|
Yields:
Type | Description |
---|---|
Iterator[ParameterGroup]
|
Iterator over Parameter Group entities. |
Source code in src/albert/collections/parameter_groups.py
delete
delete(*, id: ParameterGroupId) -> None
Delete a parameter group by its ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The ID of the parameter group to delete |
required |
Source code in src/albert/collections/parameter_groups.py
create
create(
*, parameter_group: ParameterGroup
) -> ParameterGroup
Create a new parameter group.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameter_group
|
ParameterGroup
|
The parameter group to create. |
required |
Returns:
Type | Description |
---|---|
ParameterGroup
|
The created parameter group. |
Source code in src/albert/collections/parameter_groups.py
get_by_name
get_by_name(*, name: str) -> ParameterGroup | None
Get a parameter group by its name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the parameter group to retrieve. |
required |
Returns:
Type | Description |
---|---|
ParameterGroup | None
|
The parameter group with the given name, or None if not found. |
Source code in src/albert/collections/parameter_groups.py
update
update(
*, parameter_group: ParameterGroup
) -> ParameterGroup
Update a parameter group.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameter_group
|
ParameterGroup
|
The updated ParameterGroup. The ParameterGroup must have an ID. |
required |
Returns:
Type | Description |
---|---|
ParameterGroup
|
The updated ParameterGroup as returned by the server. |