VCSP
vericlient.vcsp.client.VcspClient
¶
Bases: Client
Class to interact with the VCSP API.
Source code in src/vericlient/vcsp/client.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 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 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 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 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 | |
alive
¶
Check if the service is alive.
Returns bool: True if the service is alive, False otherwise
Source code in src/vericlient/vcsp/client.py
list_credentials
¶
List credentials across the whole system, optionally filtered.
Unlike get_all_subject_credentials, this is not scoped to one account. Deployments
hold a lot of credentials, so filter and page rather than walking everything.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
ListCredentialsInput | None
|
The filters to apply. Omit it to list without filtering |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ListCredentialsOutput |
ListCredentialsOutput
|
A page of credentials |
Source code in src/vericlient/vcsp/client.py
delete_credentials
¶
Delete every credential in a group.
Irreversible. The credentials are removed from any other group they belong to, and
with delete_empty_accounts the accounts left holding nothing go too.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
DeleteCredentialsInput
|
The group to empty, and whether to remove the accounts left behind |
required |
Raises:
| Type | Description |
|---|---|
GroupNotFoundError
|
If no group exists with that name |
Source code in src/vericlient/vcsp/client.py
get_credential_sample
¶
Get the sample a credential was created from.
The service answers with the raw bytes rather than JSON, so the media type comes from the response header.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
GetCredentialSampleInput
|
The subject and credential to retrieve the sample of |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetCredentialSampleOutput |
GetCredentialSampleOutput
|
The sample and its media type |
Raises:
| Type | Description |
|---|---|
AccountNotFoundError
|
If the account is not found |
CredentialNotFoundError
|
If the credential is not found |
Source code in src/vericlient/vcsp/client.py
get_credential_configuration
¶
Get one credential configuration, including the schema its claims must satisfy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
CredentialConfigurationInput
|
The urn of the credential configuration |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CredentialConfigurationOutput |
CredentialConfigurationOutput
|
The configuration and its claims schema |
Raises:
| Type | Description |
|---|---|
InvalidCredentialConfigurationUrnError
|
If no configuration exists with that urn |
Source code in src/vericlient/vcsp/client.py
enroll_batch
¶
Enrol several applicants at once.
The work happens asynchronously. Follow it with get_task, or block on
wait_for_task, and collect the outcome with get_task_result.
Pass applicants and the client builds the archive the service expects. Neither the
applicants.json name nor the file:// reference its entries use is documented;
both were found by reading the service's errors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
BatchEnrollmentInput
|
The enrolments to perform, or a prepared TAR archive |
required |
Returns:
| Name | Type | Description |
|---|---|---|
BatchEnrollmentOutput |
BatchEnrollmentOutput
|
The task the enrolments run under |
Raises:
| Type | Description |
|---|---|
InvalidBatchFileError
|
If the archive is malformed or a sample is missing |
Source code in src/vericlient/vcsp/client.py
get_tasks
¶
List the asynchronous tasks the service is still holding.
Returns:
| Name | Type | Description |
|---|---|---|
GetTasksOutput |
GetTasksOutput
|
The active tasks, paginated |
Source code in src/vericlient/vcsp/client.py
get_task
¶
Get the state of one asynchronous task.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
TaskInput
|
The task to look up |
required |
Returns:
| Name | Type | Description |
|---|---|---|
TaskOutput |
TaskOutput
|
Its status and progress |
Raises:
| Type | Description |
|---|---|
TaskNotFoundError
|
If no task exists with that identifier |
Source code in src/vericlient/vcsp/client.py
delete_task
¶
Delete a task and its result.
Tasks expire on their own, but a long-running caller is better off tidying up.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
TaskInput
|
The task to delete |
required |
Raises:
| Type | Description |
|---|---|
TaskNotFoundError
|
If no task exists with that identifier |
Source code in src/vericlient/vcsp/client.py
get_task_result
¶
Get the outcome of a finished task.
The shape depends on what created the task, so it comes back as a dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
TaskInput
|
The task to collect |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetTaskResultOutput |
GetTaskResultOutput
|
The outcome, as the service returned it |
Raises:
| Type | Description |
|---|---|
TaskNotFoundError
|
If no task exists with that identifier |
Source code in src/vericlient/vcsp/client.py
wait_for_task
¶
Block until a task finishes, and return its final state.
Saves every caller writing the same polling loop. It returns on failure as well as on
success, so check succeeded on the result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
TaskInput
|
The task to wait for |
required |
timeout
|
float
|
How long to wait, in seconds, before giving up |
300
|
poll_interval
|
float
|
How long to sleep between checks, in seconds |
2
|
Returns:
| Name | Type | Description |
|---|---|---|
TaskOutput |
TaskOutput
|
The task in its final state |
Raises:
| Type | Description |
|---|---|
TaskNotFoundError
|
If no task exists with that identifier |
TimeoutError
|
If the task has not finished within |
Source code in src/vericlient/vcsp/client.py
match
¶
Match a sample against one subject or against a whole group.
Pass a SubjectClaimant for 1:1 or a GroupClaimant for 1:N. Small operations
answer straight away with a MatchingOutput; a large one is accepted and run
asynchronously, answering with a TaskCreatedOutput to follow with wait_for_task.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
MatchingInput
|
The sample and what to match it against |
required |
Returns:
| Type | Description |
|---|---|
MatchingOutput | TaskCreatedOutput
|
MatchingOutput when the service answered directly, TaskCreatedOutput when it |
MatchingOutput | TaskCreatedOutput
|
queued the work |
Raises:
| Type | Description |
|---|---|
AccountNotFoundError
|
If the subject does not exist |
GroupNotFoundError
|
If the group does not exist |
InvalidAssuranceError
|
If the assurance does not satisfy its method's schema |
Source code in src/vericlient/vcsp/client.py
modify_group
¶
Add credentials to a group, remove them, or change the group's own details.
A small change answers directly with the group; a large population is accepted and run asynchronously.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
ModifyGroupInput
|
The group, the action, and what it applies to |
required |
Returns:
| Type | Description |
|---|---|
GetGroupOutput | TaskCreatedOutput
|
GetGroupOutput when the service answered directly, TaskCreatedOutput when it |
GetGroupOutput | TaskCreatedOutput
|
queued the work |
Raises:
| Type | Description |
|---|---|
GroupNotFoundError
|
If the group does not exist |
AccountNotFoundError
|
If one of the subjects does not exist |
Source code in src/vericlient/vcsp/client.py
modify_credential_tags
¶
Add or remove tags on one credential.
The tags have to exist already: create them with create_tags first.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
ModifyCredentialTagsInput
|
The credential, the action, and the tags |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetCredentialOutput |
GetCredentialOutput
|
The credential as it now stands |
Raises:
| Type | Description |
|---|---|
CredentialNotFoundError
|
If the credential is not found |
AccountNotFoundError
|
If the account is not found |
InvalidTagsError
|
If one of the tags does not exist |
Source code in src/vericlient/vcsp/client.py
start_clustering
¶
Start a clustering task over a group.
Only groups of face credentials can be clustered; a voice group is rejected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
ClusteringInput
|
The group and the clustering assurance method to apply |
required |
Returns:
| Name | Type | Description |
|---|---|---|
TaskCreatedOutput |
TaskCreatedOutput
|
The task the clustering runs under |
Raises:
| Type | Description |
|---|---|
GroupNotFoundError
|
If the group does not exist |
ClusteringNotSupportedError
|
If the group does not hold face credentials |
Source code in src/vericlient/vcsp/client.py
get_credential_configurations
¶
Get all credential configurations.
Returns:
| Name | Type | Description |
|---|---|---|
CredentialConfigurationsOutput |
CredentialConfigurationsOutput
|
The output of the credential configurations |
Source code in src/vericlient/vcsp/client.py
get_assurance_methods
¶
Get all assurance methods.
Returns:
| Name | Type | Description |
|---|---|---|
AssuranceMethodsOutput |
AssuranceMethodsOutput
|
The output of the assurance methods |
Source code in src/vericlient/vcsp/client.py
get_assurance_method_info
¶
Get an assurance method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
AssuranceMethodInput
|
The input to get the assurance method |
required |
Returns:
| Name | Type | Description |
|---|---|---|
AssuranceMethodOutput |
AssuranceMethodOutput
|
The output of the assurance method |
Source code in src/vericlient/vcsp/client.py
enroll_subject
¶
Enroll a subject.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
EnrollmentInput
|
The input to enroll the subject |
required |
Returns:
| Name | Type | Description |
|---|---|---|
EnrollmentOutput |
EnrollmentOutput
|
The output of the enrollment |
Raises:
| Type | Description |
|---|---|
EmptyFileError
|
If the file is empty |
InvalidClaimsError
|
If the claims are invalid |
InvalidAssuranceError
|
If the assurance is invalid |
InvalidTagsError
|
If the tags are invalid |
InvalidCredentialConfigurationUrnError
|
If the credential configuration urn is invalid |
InvalidAssuranceMethodUrnError
|
If the assurance method urn is invalid |
CredentialConfigurationUrnAlreadyAssignedError
|
If the credential configuration urn is already assigned |
InvalidAudioFormatError
|
If the audio format is invalid |
InvalidSnrError
|
If the signal noise ratio is invalid |
VoiceDurationIsNotEnoughError
|
If the voice duration is not enough |
InsufficientQualityError
|
If the quality is insufficient |
FaceAlignmentError
|
If the face is not aligned |
FaceNotFoundError
|
If the face is not found |
FaceTooSmallError
|
If the face is too small |
MoreThanOneFaceError
|
If there is more than one face |
AssuranceValidationError
|
If the assurance is invalid |
RequestValidationError
|
If the request is invalid |
UnsupportedMediaTypeError
|
If the media type is not supported |
Source code in src/vericlient/vcsp/client.py
get_account
¶
Get an account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
GetAccountInput
|
The input to get the account |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetAccountOutput |
GetAccountOutput
|
The output of the account |
Raises:
| Type | Description |
|---|---|
AccountNotFoundError
|
If the account is not found |
Source code in src/vericlient/vcsp/client.py
delete_account
¶
Delete an account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
DeleteAccountInput
|
The input to delete the account |
required |
Raises:
| Type | Description |
|---|---|
AccountNotFoundError
|
If the account is not found |
Source code in src/vericlient/vcsp/client.py
get_all_subject_credentials
¶
Get all credentials for a subject.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
GetCredentialsInput
|
The input to get all credentials for the subject |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetCredentialsOutput |
GetCredentialsOutput
|
The output of the credentials |
Raises:
| Type | Description |
|---|---|
AccountNotFoundError
|
If the account is not found |
Source code in src/vericlient/vcsp/client.py
get_credential
¶
Get a credential.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
GetCredentialInput
|
The input to get the credential |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetCredentialOutput |
GetCredentialOutput
|
The output of the credential |
Raises:
| Type | Description |
|---|---|
CredentialNotFoundError
|
If the credential is not found |
AccountNotFoundError
|
If the account is not found |
Source code in src/vericlient/vcsp/client.py
delete_credential
¶
Delete a credential.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
DeleteCredentialInput
|
The input to delete the credential |
required |
Source code in src/vericlient/vcsp/client.py
create_tags
¶
Create tags.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
CreateTagsInput
|
The input to create the tags |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateTagsOutput |
CreateTagsOutput
|
The output of the tags creation |
Raises:
| Type | Description |
|---|---|
TagsLimitExceededError
|
If the tag limit is exceeded |
TagAlreadyExistsError
|
If the tag already exists |
TagListEmptyError
|
If the tag list is empty |
Source code in src/vericlient/vcsp/client.py
get_tags
¶
Get every tag created in the system.
Returns:
| Name | Type | Description |
|---|---|---|
GetTagsOutput |
GetTagsOutput
|
The tags, paginated |
Source code in src/vericlient/vcsp/client.py
delete_tag
¶
Delete a tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
DeleteTagInput
|
The input to delete the tag |
required |
Raises:
| Type | Description |
|---|---|
InvalidTagsError
|
If the tag is invalid |
Source code in src/vericlient/vcsp/client.py
create_group
¶
Create a group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
CreateGroupInput
|
The input to create the group |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateGroupOutput |
CreateGroupOutput
|
The output of the group creation |
Raises:
| Type | Description |
|---|---|
GroupsLimitExceededError
|
If the group limit is exceeded |
GroupAlreadyExistsError
|
If the group already exists |
InvalidCredentialConfigurationUrnError
|
If the credential configuration urn is invalid |
Source code in src/vericlient/vcsp/client.py
get_groups
¶
Get all groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
GetGroupsInput
|
The input to get the groups |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetGroupsOutput |
GetGroupsOutput
|
The output of the groups |
Source code in src/vericlient/vcsp/client.py
get_group
¶
Get a group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
GetGroupInput
|
The input to get the group |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetGroupOutput |
GetGroupOutput
|
The output of the group |
Raises:
| Type | Description |
|---|---|
GroupNotFoundError
|
If the group is not found |
Source code in src/vericlient/vcsp/client.py
delete_group
¶
Delete a group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
DeleteGroupInput
|
The input to delete the group |
required |
Raises:
| Type | Description |
|---|---|
GroupNotFoundError
|
If the group is not found |
Source code in src/vericlient/vcsp/client.py
get_group_members
¶
Get the members of a group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_model
|
GetGroupMembersInput
|
The input to get the members of the group |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetGroupMembersOutput |
GetGroupMembersOutput
|
The output of the group members |
Raises:
| Type | Description |
|---|---|
GroupNotFoundError
|
If the group is not found |
Source code in src/vericlient/vcsp/client.py
vericlient.vcsp.models
¶
Module to define the models for the VCSP API.
VcspResponse
¶
Bases: BaseModel
Base class for the VCSP API responses.
Carries no fields of its own: it exists so every VCSP response shares a type, and so anything the API starts returning across the board has somewhere to go.
CredentialConfigurationsOutput
¶
Bases: VcspResponse
Output class for the credential configurations endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
credential_configurations |
list[str]
|
The credential configurations |
Source code in src/vericlient/vcsp/models.py
AssuranceMethodsOutput
¶
Bases: VcspResponse
Output class for the assurance methods endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
assurance_methods |
list[str]
|
The assurance methods |
Source code in src/vericlient/vcsp/models.py
AssuranceMethodSchema
¶
Bases: BaseModel
Schema class for the assurance method.
Attributes:
| Name | Type | Description |
|---|---|---|
json_schema |
str
|
The JSON schema of the assurance method, serialised as |
title |
str
|
The title of the assurance method |
type |
str
|
The type of the assurance method |
properties |
dict
|
The properties of the assurance method |
required |
list[str] | None
|
The required properties of the assurance method |
additionalProperties |
bool
|
Whether additional properties are allowed |
Source code in src/vericlient/vcsp/models.py
AssuranceMethodInput
¶
Bases: BaseModel
Input class for the assurance method endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
urn |
str
|
The urn of the assurance method |
Source code in src/vericlient/vcsp/models.py
AssuranceMethodOutput
¶
Bases: VcspResponse
Output class for the assurance method endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
urn |
str
|
The urn of the assurance method |
json_schema |
AssuranceMethodSchema
|
The schema of the assurance method, serialised as |
Source code in src/vericlient/vcsp/models.py
Sample
¶
Bases: BaseModel
Base class for the Sample.
Attributes:
| Name | Type | Description |
|---|---|---|
valid_from |
str
|
The date from which the sample is valid |
valid_until |
str
|
The date until which the sample is valid |
type |
str
|
The type of the sample, e.g. "voice", "face" |
content_type |
str
|
The content type of the sample, e.g. "audio/wav", "image/jpeg" |
analysis |
dict
|
The analysis of the sample |
Source code in src/vericlient/vcsp/models.py
Applicant
¶
Bases: BaseModel
Base class for the Applicant.
Attributes:
| Name | Type | Description |
|---|---|---|
subject_id |
str | None
|
The subject_id of the applicant (optional). If not provided, it will be generated by the system and returned in the response |
credential_configuration_urn |
str
|
The credential configuration urn |
tags |
list[str] | None
|
The tags of the applicant |
claims |
dict | None
|
The claims of the applicant |
assurance_method_urn |
str
|
The assurance method urn |
assurance |
dict
|
The assurance of the applicant |
Source code in src/vericlient/vcsp/models.py
EnrollmentInput
¶
Bases: BaseModel
Input class for the enrollment endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
sample |
str | bytes
|
The sample to generate the credential with. It can be a path to a file or a bytes object with the audio content |
applicant |
Applicant
|
The applicant to enroll |
content_type |
str | None
|
The media type to declare for the sample, such as |
Source code in src/vericlient/vcsp/models.py
EnrollmentOutput
¶
Bases: BaseModel
Output class for the enrollment endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
credential_id |
str
|
The credential_id of the applicant |
subject_id |
str
|
The subject_id of the applicant |
Source code in src/vericlient/vcsp/models.py
SubjectInput
¶
Bases: BaseModel
Input class to define a subject.
Attributes:
| Name | Type | Description |
|---|---|---|
subject_id |
str
|
The subject_id of the applicant |
Source code in src/vericlient/vcsp/models.py
CredentialInput
¶
Bases: BaseModel
Input class to define a credential.
Attributes:
| Name | Type | Description |
|---|---|---|
credential_id |
str
|
The credential_id of the applicant |
Source code in src/vericlient/vcsp/models.py
DeleteSubjectInput
¶
Bases: SubjectInput
Input class for the delete account endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
subject_id |
str
|
The account_id to delete |
Source code in src/vericlient/vcsp/models.py
DeleteCredentialInput
¶
Bases: SubjectInput, CredentialInput
Input class for the delete credential endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
credential_id |
str
|
The credential_id to delete |
subject_id |
str
|
The subject from which the credential will be deleted |
Source code in src/vericlient/vcsp/models.py
GetAccountInput
¶
Bases: SubjectInput
Input class for the get account endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
subject_id |
str
|
The account_id to get |
Source code in src/vericlient/vcsp/models.py
GetCredentialInput
¶
Bases: SubjectInput, CredentialInput
Input class for the get a specific credential endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
subject_id |
str
|
The subject_id to get the credential from |
credential_id |
str
|
The credential_id to get |
Source code in src/vericlient/vcsp/models.py
GetCredentialOutput
¶
Bases: BaseModel
Output class for the get credential endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
sample |
Sample
|
The sample of the applicant |
groups |
list[str]
|
The groups of the applicant |
issuer |
str
|
The issuer |
id |
str
|
The id of the applicant |
updated_at |
str
|
The updated_at date |
created_at |
str
|
The created_at date |
valid_from |
str
|
The valid_from date |
valid_until |
str
|
The valid_until date |
credential_configuration_urn |
str
|
The credential_configuration_urn |
tags |
list[str]
|
The tags of the applicant |
claims |
dict
|
The claims of the applicant |
Source code in src/vericlient/vcsp/models.py
GetAccountOutput
¶
Bases: VcspResponse
Output class for the get account endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
credentials |
list[str]
|
The credentials of the applicant |
updated_at |
str
|
The updated_at date |
created_at |
str
|
The created_at date |
subject_id |
str
|
The subject_id of the applicant |
Source code in src/vericlient/vcsp/models.py
DeleteAccountInput
¶
Bases: SubjectInput
Input class for the delete account endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
subject_id |
str
|
The account_id to delete |
Source code in src/vericlient/vcsp/models.py
GetCredentialsInput
¶
Bases: SubjectInput
Input class for the get all credentials from a subject endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
subject_id |
str
|
The account_id to get the credentials from |
Source code in src/vericlient/vcsp/models.py
GetCredentialsOutput
¶
Bases: VcspResponse
Output class for the get all credentials from a subject endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
credentials |
list[GetCredentialOutput]
|
The credentials of the applicant |
Source code in src/vericlient/vcsp/models.py
TagInput
¶
Bases: BaseModel
Input class for the tag endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the tag |
Source code in src/vericlient/vcsp/models.py
TagOutput
¶
Bases: TagInput
Output class for the tag endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the tag |
created_at |
str
|
The created_at date |
Source code in src/vericlient/vcsp/models.py
CreateTagsInput
¶
Bases: BaseModel
Input class for the create tag endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
tags |
list[str]
|
The tags to create |
Source code in src/vericlient/vcsp/models.py
CreateTagsOutput
¶
Bases: VcspResponse
Output class for the create tag endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
tags |
list[str]
|
The tags created |
created_at |
str
|
The created_at date |
Source code in src/vericlient/vcsp/models.py
GetTagsOutput
¶
Bases: VcspResponse
Output class for the get tags endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
items |
list[TagOutput]
|
The tags |
total |
int
|
The total number of tags |
page |
int
|
The page number |
size |
int
|
The size of the tags |
pages |
int
|
The total number of pages |
Source code in src/vericlient/vcsp/models.py
DeleteTagInput
¶
Bases: TagInput
Input class for the delete tag endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the tag |
Source code in src/vericlient/vcsp/models.py
GroupInput
¶
Bases: BaseModel
Input class for the group endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the group |
Source code in src/vericlient/vcsp/models.py
CreateGroupInput
¶
Bases: GroupInput
Input class for the create group endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the group. Must match |
credential_configuration_urn |
str
|
The credential configuration the group holds |
description |
str | None
|
A free-text description. Defaults to empty on the service |
expired_at |
str | None
|
How long credentials are retained in the group, as an ISO 8601
duration such as |
Source code in src/vericlient/vcsp/models.py
CreateGroupOutput
¶
Bases: VcspResponse
Output class for the create group endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
size |
int
|
The number of credentials in the group |
created_at |
str
|
The created_at date |
updated_at |
str
|
The updated_at date |
credential_configuration_urn |
str
|
The credential configuration the group holds |
name |
str
|
The name of the group |
description |
str
|
The description of the group |
expired_at |
str
|
The date the credentials expire. Note the asymmetry with the input, which takes a duration rather than a date |
Source code in src/vericlient/vcsp/models.py
GetGroupsInput
¶
Bases: BaseModel
Input class for the get groups endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
size |
int | None
|
The size of the groups (optional), default is 100 |
page |
int | None
|
The page number (optional), default is 1 |
Source code in src/vericlient/vcsp/models.py
GetGroupsOutput
¶
Bases: VcspResponse
Output class for the get groups endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
items |
list[CreateGroupOutput]
|
The items of the groups |
total |
int
|
The total number of groups |
page |
int
|
The page number |
size |
int
|
The size of the groups |
pages |
int
|
The total number of pages |
Source code in src/vericlient/vcsp/models.py
GetGroupInput
¶
Bases: GroupInput
Input class for the get a specific group endpoint.
Source code in src/vericlient/vcsp/models.py
GetGroupOutput
¶
Bases: CreateGroupOutput
Output class for the get a specific group endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
size |
int
|
The size of the group |
created_at |
str
|
The created_at date |
updated_at |
str
|
The updated_at date |
credential_configuration_urn |
str
|
The credential configuration urn |
name |
str
|
The name of the group |
description |
str
|
The description of the group |
expired_at |
str
|
The expired_at date |
Source code in src/vericlient/vcsp/models.py
DeleteGroupInput
¶
Bases: GroupInput
Input class for the delete group endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the group |
Source code in src/vericlient/vcsp/models.py
GetGroupMembersInput
¶
Bases: GroupInput
Input class for the get group members endpoint.
Source code in src/vericlient/vcsp/models.py
GroupMember
¶
Bases: BaseModel
Base class for the group member.
Attributes:
| Name | Type | Description |
|---|---|---|
subject_id |
str
|
The subject_id of the group member |
credential_id |
str
|
The credential_id of the group member |
expired_in_group |
str
|
The expired_in_group of the group member |
claims |
dict
|
The claims of the group member |
tags |
list[str]
|
The tags of the group member |
Source code in src/vericlient/vcsp/models.py
GetGroupMembersOutput
¶
Bases: VcspResponse
Output class for the get group members endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
items |
list[GroupMember]
|
The items of the group members |
total |
int
|
The total number of group members |
page |
int
|
The page number |
size |
int
|
The size of the group members |
pages |
int
|
The total number of pages |
Source code in src/vericlient/vcsp/models.py
ListedCredential
¶
Bases: GetCredentialOutput
A credential as it appears in the system-wide credential listing.
Attributes:
| Name | Type | Description |
|---|---|---|
subject_id |
str
|
The account the credential belongs to |
Source code in src/vericlient/vcsp/models.py
ListCredentialsInput
¶
Bases: BaseModel
Input class for the system-wide credential listing.
Every field is a filter, and all of them are optional. Listing without one walks the whole system, which on a busy deployment is a lot of pages.
Attributes:
| Name | Type | Description |
|---|---|---|
credential_configuration_urn |
str | None
|
Only credentials created with this configuration |
tags |
list[str] | None
|
Only credentials carrying these tags |
page |
int | None
|
The page to retrieve, starting at 1 |
size |
int | None
|
How many credentials per page |
Source code in src/vericlient/vcsp/models.py
ListCredentialsOutput
¶
Bases: VcspResponse
Output class for the system-wide credential listing.
Attributes:
| Name | Type | Description |
|---|---|---|
items |
list[ListedCredential]
|
The credentials on this page |
total |
int
|
The number of credentials matching the filters |
page |
int
|
The page returned |
size |
int
|
The page size |
pages |
int
|
The number of pages |
Source code in src/vericlient/vcsp/models.py
DeleteCredentialsInput
¶
Bases: BaseModel
Input class for bulk credential deletion.
A group is the only filter the service accepts, and the operation is irreversible. Credentials in the group are deleted and removed from any other group they belong to.
Attributes:
| Name | Type | Description |
|---|---|---|
group_name |
str
|
The group whose credentials are deleted |
delete_empty_accounts |
bool
|
Whether to delete an account left with no credentials |
Source code in src/vericlient/vcsp/models.py
GetCredentialSampleInput
¶
Bases: SubjectInput, CredentialInput
Input class for retrieving the sample behind a credential.
Attributes:
| Name | Type | Description |
|---|---|---|
subject_id |
str
|
The subject the credential belongs to |
credential_id |
str
|
The credential whose sample to retrieve |
Source code in src/vericlient/vcsp/models.py
GetCredentialSampleOutput
¶
Bases: VcspResponse
Output class for retrieving the sample behind a credential.
The service answers with the raw bytes it was enrolled with, not with JSON.
Attributes:
| Name | Type | Description |
|---|---|---|
content |
bytes
|
The sample itself |
content_type |
str
|
Its media type, such as |
Source code in src/vericlient/vcsp/models.py
CredentialConfigurationInput
¶
Bases: BaseModel
Input class for retrieving one credential configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
urn |
str
|
The urn of the credential configuration |
Source code in src/vericlient/vcsp/models.py
CredentialConfigurationOutput
¶
Bases: VcspResponse
Output class for retrieving one credential configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
urn |
str
|
The urn of the credential configuration |
claims_schema |
dict
|
The JSON schema the |
Source code in src/vericlient/vcsp/models.py
TaskStatus
¶
Bases: StrEnum
The states an asynchronous task moves through.
TaskOutput.status is a plain string rather than this enum, so a state the service adds
later does not break deserialisation. Compare against these members.
Source code in src/vericlient/vcsp/models.py
TaskInput
¶
Bases: BaseModel
Input class for the task endpoints.
Attributes:
| Name | Type | Description |
|---|---|---|
task_id |
str
|
The identifier the service returned when the task was created |
Source code in src/vericlient/vcsp/models.py
TaskOutput
¶
Bases: VcspResponse
Output class describing one asynchronous task.
Attributes:
| Name | Type | Description |
|---|---|---|
task_id |
str
|
The identifier of the task |
status |
str
|
One of the |
progress |
float
|
How far along the task is, from 0 to 100 |
created_at |
str | None
|
When the task was accepted |
started_at |
str | None
|
When the task started, if it has |
finished_at |
str | None
|
When the task finished, if it has |
expired_at |
str | None
|
When the service will drop the task and its result |
Source code in src/vericlient/vcsp/models.py
GetTasksOutput
¶
Bases: VcspResponse
Output class for the task listing.
Attributes:
| Name | Type | Description |
|---|---|---|
items |
list[TaskOutput]
|
The tasks on this page |
total |
int
|
The number of active tasks |
page |
int
|
The page returned |
size |
int
|
The page size |
pages |
int
|
The number of pages |
Source code in src/vericlient/vcsp/models.py
GetTaskResultOutput
¶
Bases: VcspResponse
Output class for the outcome of a finished task.
The shape depends on what created the task — a batch enrolment, a matching or a clustering all answer differently — so it is handed back as-is rather than forced into one model.
Attributes:
| Name | Type | Description |
|---|---|---|
result |
dict
|
The outcome, as the service returned it |
Source code in src/vericlient/vcsp/models.py
BatchApplicant
¶
Bases: BaseModel
One enrolment inside a batch.
Attributes:
| Name | Type | Description |
|---|---|---|
sample |
str | bytes
|
The biometric sample, as a path or as bytes |
applicant |
Applicant
|
The applicant to enrol, exactly as for a single enrolment |
filename |
str | None
|
The name the sample takes inside the archive. Derived from the path, or generated for bytes, when omitted. It only has to be unique within the batch |
Source code in src/vericlient/vcsp/models.py
BatchEnrollmentInput
¶
Bases: BaseModel
Input class for batch enrolment.
The service takes a TAR archive holding the samples and an applicants.json that points
at them. Pass applicants and the client builds it; pass batch_file if you have one
already, which avoids holding a large batch in memory twice.
Attributes:
| Name | Type | Description |
|---|---|---|
applicants |
list[BatchApplicant] | None
|
The enrolments to perform |
batch_file |
str | bytes | None
|
A prepared TAR archive, as a path or as bytes |
Source code in src/vericlient/vcsp/models.py
TaskCreatedOutput
¶
Bases: VcspResponse
Output class for any operation the service accepts and runs asynchronously.
Batch enrolment, clustering, and a large group population all answer this way. Follow the
work with get_task or wait_for_task, and collect it with get_task_result.
Attributes:
| Name | Type | Description |
|---|---|---|
task_id |
str
|
The task the work runs under |
created_at |
str
|
When the task was accepted |
Source code in src/vericlient/vcsp/models.py
SubjectClaimant
¶
Bases: BaseModel
The reference for a 1:1 matching: one subject's credential.
Attributes:
| Name | Type | Description |
|---|---|---|
subject_id |
str
|
The subject to match against |
credential_configuration_urn |
str
|
Which of the subject's credentials to use |
assurance_method_urn |
str
|
The assurance method to apply |
assurance |
dict
|
The values that method requires, such as |
Source code in src/vericlient/vcsp/models.py
GroupClaimant
¶
Bases: BaseModel
The reference for a 1:N matching: every credential in a group.
Attributes:
| Name | Type | Description |
|---|---|---|
group_name |
str
|
The group to match against |
assurance_method_urn |
str
|
The assurance method to apply |
assurance |
dict
|
The values that method requires |
limit |
int | None
|
How many results to return, best first |
filter |
dict | None
|
A JsonLogic expression narrowing the group, such as
|
Source code in src/vericlient/vcsp/models.py
MatchingInput
¶
Bases: BaseModel
Input class for a matching operation.
Attributes:
| Name | Type | Description |
|---|---|---|
sample |
str | bytes
|
The biometric sample to match, as a path or as bytes |
claimant |
SubjectClaimant | GroupClaimant
|
What to match it against — a |
sample_processing |
dict | None
|
Options for reading the sample, such as |
content_type |
str | None
|
The media type to declare for the sample. Inferred when omitted |
Source code in src/vericlient/vcsp/models.py
MatchingResult
¶
Bases: BaseModel
One candidate a matching operation scored.
Attributes:
| Name | Type | Description |
|---|---|---|
subject_id |
str
|
The subject the matched credential belongs to |
biometrics_score |
float
|
How closely the sample matched, from 0 to 1 |
match_status |
str
|
|
Source code in src/vericlient/vcsp/models.py
MatchedSample
¶
Bases: BaseModel
What the service made of the sample it was given.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
|
content_type |
str
|
The media type it was read as |
analysis |
dict
|
Quality figures, such as net speech duration or an authenticity score |
sample_processing |
dict | None
|
The processing options that were applied |
Source code in src/vericlient/vcsp/models.py
MatchingOutput
¶
Bases: VcspResponse
Output class for a matching operation.
Attributes:
| Name | Type | Description |
|---|---|---|
results |
list[MatchingResult]
|
The candidates, best first |
nhits |
int
|
How many of them are a |
sample |
MatchedSample
|
What the service made of the sample |
Source code in src/vericlient/vcsp/models.py
GroupAction
¶
GroupMembershipSource
¶
Bases: BaseModel
Which credentials a populate or remove applies to.
At least one of the two is required.
Attributes:
| Name | Type | Description |
|---|---|---|
subjects |
list[str] | None
|
Subject ids whose credentials to add or remove |
tags |
list[str] | None
|
Tags whose credentials to add or remove |
Source code in src/vericlient/vcsp/models.py
ModifyGroupInput
¶
Bases: GroupInput
Input class for modifying a group.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The group to modify |
action |
str
|
|
from_ |
GroupMembershipSource | None
|
Which credentials to add or remove. Required for populate and remove, and
serialised as |
credential_ttl |
str | None
|
How long added credentials stay in the group, as an ISO 8601
duration such as |
description |
str | None
|
A new description, for |
expired_at |
str | None
|
A new retention period, for |
Source code in src/vericlient/vcsp/models.py
CredentialTagAction
¶
ModifyCredentialTagsInput
¶
Bases: SubjectInput, CredentialInput
Input class for changing the tags on a credential.
Attributes:
| Name | Type | Description |
|---|---|---|
subject_id |
str
|
The subject the credential belongs to |
credential_id |
str
|
The credential to change |
action |
str
|
|
tags |
list[str]
|
The tags to add or remove. They must already exist in the system |
Source code in src/vericlient/vcsp/models.py
ClusteringInput
¶
Bases: GroupInput
Input class for starting a clustering task on a group.
Clustering is only supported for groups of face credentials; a voice group is rejected
with ClusteringNotSupportedError.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The group to cluster |
assurance_method_urn |
str
|
The clustering assurance method to apply |
properties |
dict
|
The values that method requires, such as
|
Source code in src/vericlient/vcsp/models.py
vericlient.vcsp.exceptions
¶
Module to define the exceptions for the VCSP API.
VcspError
¶
EmptyFileError
¶
RequestValidationError
¶
Bases: VcspError
Exception raised for request validation.
Source code in src/vericlient/vcsp/exceptions.py
UnsupportedMediaTypeError
¶
Bases: VcspError
Exception raised for unsupported media type.
Source code in src/vericlient/vcsp/exceptions.py
InvalidClaimsError
¶
Bases: VcspError
Exception raised for invalid claims.
Source code in src/vericlient/vcsp/exceptions.py
InvalidAssuranceError
¶
Bases: VcspError
Exception raised for invalid assurance.
Source code in src/vericlient/vcsp/exceptions.py
InvalidTagsError
¶
InvalidCredentialConfigurationUrnError
¶
Bases: VcspError
Exception raised for invalid credential configuration urn.
Source code in src/vericlient/vcsp/exceptions.py
InvalidAssuranceMethodUrnError
¶
Bases: VcspError
Exception raised for invalid assurance method.
Source code in src/vericlient/vcsp/exceptions.py
CredentialConfigurationUrnAlreadyAssignedError
¶
Bases: VcspError
Exception raised for already assigned credential configuration urn.
Source code in src/vericlient/vcsp/exceptions.py
InvalidAudioFormatError
¶
Bases: VcspError
Exception raised for invalid audio format.
Source code in src/vericlient/vcsp/exceptions.py
InvalidSnrError
¶
Bases: VcspError
Exception raised for invalid signal noise ratio.
Source code in src/vericlient/vcsp/exceptions.py
VoiceDurationIsNotEnoughError
¶
Bases: VcspError
Exception raised for voice duration not enough.
Source code in src/vericlient/vcsp/exceptions.py
InsufficientQualityError
¶
Bases: VcspError
Exception raised for insufficient quality.
Source code in src/vericlient/vcsp/exceptions.py
FaceNotFoundError
¶
MoreThanOneFaceError
¶
Bases: VcspError
Exception raised for more than one face.
Source code in src/vericlient/vcsp/exceptions.py
FaceTooSmallError
¶
FaceAlignmentError
¶
Bases: VcspError
Exception raised for face alignment error.
Source code in src/vericlient/vcsp/exceptions.py
AssuranceMethodNotFoundError
¶
Bases: VcspError
Exception raised for assurance method not found.
Source code in src/vericlient/vcsp/exceptions.py
AssuranceValidationError
¶
Bases: VcspError
Exception raised for assurance validation error.
Source code in src/vericlient/vcsp/exceptions.py
AccountNotFoundError
¶
CredentialNotFoundError
¶
Bases: VcspError
Exception raised for credential not found.
Source code in src/vericlient/vcsp/exceptions.py
GroupNotFoundError
¶
GroupsLimitExceededError
¶
Bases: VcspError
Exception raised for group limit exceeded.
Source code in src/vericlient/vcsp/exceptions.py
EnrollmentsLimitExceededError
¶
Bases: VcspError
Exception raised for enrollment limit exceeded.
Source code in src/vericlient/vcsp/exceptions.py
GroupAlreadyExistsError
¶
Bases: VcspError
Exception raised for group already exists.
Source code in src/vericlient/vcsp/exceptions.py
TagsLimitExceededError
¶
Bases: VcspError
Exception raised for tags limit exceeded.
Source code in src/vericlient/vcsp/exceptions.py
TagAlreadyExistsError
¶
Bases: VcspError
Exception raised for tag already exists.
Source code in src/vericlient/vcsp/exceptions.py
TagListEmptyError
¶
TaskNotFoundError
¶
Bases: VcspError
Exception raised when no task exists with the given identifier.
Source code in src/vericlient/vcsp/exceptions.py
InvalidBatchFileError
¶
Bases: VcspError
Exception raised when a batch enrolment archive cannot be processed.