Projects
albert.collections.projects.ProjectCollection
Bases: BaseCollection
Manage Projects in the Albert platform.
A Project is the top-level container for a piece of R&D work. It groups the formulations designed for that work, the Project's Worksheet (1:1 with the project), the Tasks run against it, and the inventory it references. Projects are the entry point most workflows start from: you create a project, then build formulas and run tasks inside it.
Every project is identified by a Project ID (format PRO..., e.g.
"PRO123"). A project always has a description (which doubles as its
display name) and a ProjectClass
controlling its access level (private, shared, or confidential).
This collection is accessed as client.projects.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
AlbertSession
|
The authenticated Albert session used for API calls. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
base_path |
str
|
The base API route for project requests. |
Methods:
| Name | Description |
|---|---|
create |
Create a new project. |
get_by_id |
Get a single project by its ID. |
update |
Update an existing project. |
delete |
Delete a project by its ID. |
search |
Fast, lightweight search returning partial projects (best for lookups). |
get_all |
Same filters as search, but returns fully populated projects (slower). |
document_search |
Search documents (attachments) linked to a project. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
AlbertSession
|
The authenticated Albert session used for API calls. |
required |
Source code in src/albert/collections/projects.py
create
Create a new project.
Use this to register a new R&D container. Only description is
required; it doubles as the project's display name. Optionally set
locations, project_class (defaults to private), metadata, and
other fields on the Project first.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
Project
|
The project to create. |
required |
Returns:
| Type | Description |
|---|---|
Project
|
The newly created project, populated with its assigned Project ID. |
Source code in src/albert/collections/projects.py
get_by_id
Get a single project by its ID.
To find projects without knowing their IDs, use search or
get_all.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
ProjectId
|
The Project ID (format |
required |
Returns:
| Type | Description |
|---|---|
Project
|
The fully populated project. |
Source code in src/albert/collections/projects.py
update
Update an existing project.
Retrieve the project (e.g. with
get_by_id), modify the updatable fields, then pass it
here. Only the fields listed in Notes are applied.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
Project
|
The project carrying the desired changes. Its |
required |
Returns:
| Type | Description |
|---|---|
Project
|
The updated project. |
Notes
The following fields can be updated: description, grid,
metadata, state, acl.
Source code in src/albert/collections/projects.py
delete
delete(*, id: ProjectId) -> None
Delete a project by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
ProjectId
|
The Project ID (format |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/collections/projects.py
search
search(
*,
text: str | None = None,
status: list[str] | None = None,
market_segment: list[str] | None = None,
application: list[str] | None = None,
technology: list[str] | None = None,
created_by: list[str] | None = None,
location: list[str] | None = None,
program: list[str] | None = None,
technical_lead: list[str] | None = None,
from_created_at: str | None = None,
to_created_at: str | None = None,
updated_by: str | list[str] | None = None,
from_updated_at: str | None = None,
to_updated_at: str | None = None,
facet_field: str | None = None,
facet_text: str | None = None,
contains_field: list[str] | None = None,
contains_text: list[str] | None = None,
linked_to: str | None = None,
my_project: bool | None = None,
my_role: list[str] | None = None,
metadata_filters: dict[str, Any] | None = None,
additional_field: list[str] | None = None,
custom_fields: dict[str, Any] | None = None,
formula_access: list[str] | None = None,
linked_to_grid: str | None = None,
source_field: list[str] | None = None,
order_by: OrderBy = DESCENDING,
sort_by: str | None = None,
offset: int | None = None,
max_items: int | None = None,
) -> Iterator[ProjectSearchItem]
Search for projects matching the given filters.
This is the fast way to find projects: it returns lightweight, partial
(unhydrated) ProjectSearchItem results
and is best for lookups, counts, and pulling IDs. To retrieve fully
detailed Project entities, use
get_all instead (slower, one full fetch per result).
All filters are optional; with no arguments this iterates over all projects you can access.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Full-text search query. |
None
|
status
|
list[str]
|
Filter by project statuses. |
None
|
market_segment
|
list[str]
|
Filter by market segment. |
None
|
application
|
list[str]
|
Filter by application. |
None
|
technology
|
list[str]
|
Filter by technology tags. |
None
|
created_by
|
list[str]
|
Filter by creator. Accepts user display name(s) or UserId(s) (e.g.
|
None
|
location
|
list[str]
|
Filter by location(s). |
None
|
program
|
list[str]
|
Filter by project program (custom field). |
None
|
technical_lead
|
list[str]
|
Filter by technical lead (custom field). |
None
|
from_created_at
|
str
|
Only include projects created on or after this date, formatted as
|
None
|
to_created_at
|
str
|
Only include projects created on or before this date, formatted as
|
None
|
updated_by
|
str or list[str]
|
Filter by user(s) who last updated the project. Accepts UserId(s)
only (e.g. |
None
|
from_updated_at
|
str
|
Only include projects updated on or after this date (ISO 8601). |
None
|
to_updated_at
|
str
|
Only include projects updated on or before this date (ISO 8601). |
None
|
facet_field
|
str
|
Facet field to filter on. |
None
|
facet_text
|
str
|
Facet text to search for. |
None
|
contains_field
|
list[str]
|
Fields to search inside. |
None
|
contains_text
|
list[str]
|
Values to search for within the |
None
|
linked_to
|
str
|
Entity ID the project is linked to. |
None
|
my_project
|
bool
|
If True, return only projects owned by current user. |
None
|
my_role
|
list[str]
|
User roles to filter by. |
None
|
metadata_filters
|
dict[str, Any]
|
Filter by custom field (metadata) values. Warning Do not use this for application, technology, program, technical lead, or market segment. Use their corresponding query parameters instead. |
None
|
additional_field
|
list[str]
|
Request additional columns from the search index. |
None
|
custom_fields
|
dict[str, Any]
|
Filter by custom field values. |
None
|
formula_access
|
list[str]
|
Filter by formula access level. |
None
|
linked_to_grid
|
str
|
Text for linked-to dropdown search in grid/report flows. |
None
|
source_field
|
list[str]
|
Restrict which fields are returned in the response. |
None
|
order_by
|
OrderBy
|
Sort order. Default is DESCENDING. |
DESCENDING
|
sort_by
|
str
|
Field to sort by. |
None
|
max_items
|
int
|
Maximum number of items to return in total. If None, fetches all available items. |
None
|
Returns:
| Type | Description |
|---|---|
Iterator[ProjectSearchItem]
|
An iterator of matching partial (unhydrated) project results. |
Source code in src/albert/collections/projects.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | |
document_search
document_search(
*,
linked_to: SearchProjectId,
text: str | None = None,
source_field: list[str] | None = None,
additional_field: list[str] | None = None,
search_field: list[str] | None = None,
order_by: OrderBy = DESCENDING,
sort_by: str | None = None,
offset: int | None = None,
max_items: int | None = None,
) -> Iterator[DocumentSearchItem]
Search for documents (attachments) linked to a project.
Each result is a lightweight
DocumentSearchItem describing an
attachment (name, MIME type, size, uploader) rather than the file itself.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
linked_to
|
SearchProjectId
|
The project to filter documents by (format |
required |
text
|
str
|
Full-text search query for document names. |
None
|
source_field
|
list[str]
|
Restrict which fields are returned in the response. |
None
|
additional_field
|
list[str]
|
Request additional columns from the search index. |
None
|
search_field
|
list[str]
|
Restrict which fields the |
None
|
order_by
|
OrderBy
|
Sort order. Default is DESCENDING. |
DESCENDING
|
sort_by
|
str
|
Field to sort by (for example |
None
|
max_items
|
int
|
Maximum number of items to return in total. If None, fetches all. |
None
|
Returns:
| Type | Description |
|---|---|
Iterator[DocumentSearchItem]
|
Matching document search results. |
Source code in src/albert/collections/projects.py
get_all
get_all(
*,
text: str | None = None,
status: list[str] | None = None,
market_segment: list[str] | None = None,
application: list[str] | None = None,
technology: list[str] | None = None,
created_by: list[str] | None = None,
location: list[str] | None = None,
program: list[str] | None = None,
technical_lead: list[str] | None = None,
from_created_at: str | None = None,
to_created_at: str | None = None,
updated_by: str | list[str] | None = None,
from_updated_at: str | None = None,
to_updated_at: str | None = None,
facet_field: str | None = None,
facet_text: str | None = None,
contains_field: list[str] | None = None,
contains_text: list[str] | None = None,
linked_to: str | None = None,
my_project: bool | None = None,
my_role: list[str] | None = None,
metadata_filters: dict[str, Any] | None = None,
additional_field: list[str] | None = None,
custom_fields: dict[str, Any] | None = None,
formula_access: list[str] | None = None,
linked_to_grid: str | None = None,
source_field: list[str] | None = None,
order_by: OrderBy = DESCENDING,
sort_by: str | None = None,
offset: int | None = None,
max_items: int | None = None,
) -> Iterator[Project]
Get fully populated projects matching optional filters.
Accepts the same filters as search, but yields complete
Project entities by fetching each
match individually via get_by_id. This is convenient but slower;
prefer search when you only need IDs or a few summary fields.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Full-text search query. |
None
|
status
|
list[str]
|
Filter by project statuses. |
None
|
market_segment
|
list[str]
|
Filter by market segment. |
None
|
application
|
list[str]
|
Filter by application. |
None
|
technology
|
list[str]
|
Filter by technology tags. |
None
|
created_by
|
list[str]
|
Filter by creator. Accepts user display name(s) or UserId(s) (e.g.
|
None
|
location
|
list[str]
|
Filter by location(s). |
None
|
program
|
list[str]
|
Filter by project program (custom field). |
None
|
technical_lead
|
list[str]
|
Filter by technical lead (custom field). |
None
|
from_created_at
|
str
|
Only include projects created on or after this date, formatted as
|
None
|
to_created_at
|
str
|
Only include projects created on or before this date, formatted as
|
None
|
updated_by
|
str or list[str]
|
Filter by user(s) who last updated the project. Accepts UserId(s)
only (e.g. |
None
|
from_updated_at
|
str
|
Only include projects updated on or after this date (ISO 8601). |
None
|
to_updated_at
|
str
|
Only include projects updated on or before this date (ISO 8601). |
None
|
facet_field
|
str
|
Facet field to filter on. |
None
|
facet_text
|
str
|
Facet text to search for. |
None
|
contains_field
|
list[str]
|
Fields to search inside. |
None
|
contains_text
|
list[str]
|
Values to search for within the |
None
|
linked_to
|
str
|
Entity ID the project is linked to. |
None
|
my_project
|
bool
|
If True, return only projects owned by current user. |
None
|
my_role
|
list[str]
|
User roles to filter by. |
None
|
metadata_filters
|
dict[str, Any]
|
Filter by custom field (metadata) values. |
None
|
additional_field
|
list[str]
|
Request additional columns from the search index. |
None
|
custom_fields
|
dict[str, Any]
|
Filter by custom field values. |
None
|
formula_access
|
list[str]
|
Filter by formula access level. |
None
|
linked_to_grid
|
str
|
Text for linked-to dropdown search in grid/report flows. |
None
|
source_field
|
list[str]
|
Restrict which fields are returned in the response. |
None
|
order_by
|
OrderBy
|
Sort order. Default is DESCENDING. |
DESCENDING
|
sort_by
|
str
|
Field to sort by. |
None
|
max_items
|
int
|
Maximum number of items to return in total. If None, fetches all available items. |
None
|
Returns:
| Type | Description |
|---|---|
Iterator[Project]
|
An iterator of fully populated Project entities. Preserves |
Source code in src/albert/collections/projects.py
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 | |