models module

class vdx_helper.models.Certificate(certificate: Claim, revoked_date: Optional[datetime], last_verification: Optional[VerificationReport])

Bases: tuple

Object representing a Certificate returned by the Core API.

Parameters:
  • certificate (Claim) – The details and data of the certificate and respective credential

  • revoked_date (datetime.datetime, optional) – The date of revocation, if applicable

  • last_verification (VerificationReport) – The result of the latest verification of the certificate

property certificate

Alias for field number 0

property last_verification

Alias for field number 2

property revoked_date

Alias for field number 1

class vdx_helper.models.Claim(uid: UUID, partner: Partner, credential: Credential, issued_date: datetime, signature: str)

Bases: tuple

Object representing a Credential returned by the Core API. A Claim has all data directly related to the issued Certificate.

Parameters:
  • uid (uuid.UUID) – The uid of the certificate

  • partner (Partner) – The partner who issued the certificate

  • credential (Credential) – The credential that was issued

  • issued_date (datetime.datetime) – Date of issuing on the Blockchain

  • signature (str) – Signed content of the credential by the partner’s issuing key

property credential

Alias for field number 2

property issued_date

Alias for field number 3

property partner

Alias for field number 1

property signature

Alias for field number 4

property uid

Alias for field number 0

class vdx_helper.models.Credential(uid: UUID, title: str, metadata: Dict[str, Any], files: List[File], credentials: List[Credential], upload_date: datetime, tags: List[str], expiry_date: Optional[datetime])

Bases: tuple

Object representing a Credential returned by the Core API.

Parameters:
  • uid (uuid.UUID) – The uid of the credential

  • title (str) – The credential title

  • metadata (Dict) – Any additional data in the credential

  • files (List[File]) – List of files issued on the credential

  • credentials (List[Credential]) – List of credentials associated to the credential

  • upload_date (datetime.datetime) – The date the credential was uploaded

  • tags (List[str]) – List of tags identifying the credential

  • expiry_date (datetime.datetime, optional) – The date the credential expires, if set

property credentials

Alias for field number 4

property expiry_date

Alias for field number 7

property files

Alias for field number 3

property metadata

Alias for field number 2

property tags

Alias for field number 6

property title

Alias for field number 1

property uid

Alias for field number 0

property upload_date

Alias for field number 5

class vdx_helper.models.File(file_hash: str, file_type: Optional[str])

Bases: tuple

Object representing a File returned by the Core API.

Parameters:
  • file_hash (str) – The file’s hash

  • file_type (str, optional) – The file MIME type <https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types>

property file_hash

Alias for field number 0

property file_type

Alias for field number 1

class vdx_helper.models.Job(uid: UUID, partner: Partner, chain: str, tags: List[str], status: JobStatus, created_date: datetime, scheduled_date: Optional[datetime] = None, start_date: Optional[datetime] = None, issued_date: Optional[datetime] = None, finished_date: Optional[datetime] = None, failed_date: Optional[datetime] = None)

Bases: tuple

Object representing a Certificate returned by the Core API.

Parameters:
  • uid (uuid.UUID) – uid of the Job

  • partner (Partner) – The partner who issued the job

  • chain (str) – The Blockchain engine the job was issued on

  • tags (List[str]) – List of tags identifying the credential

  • status (vdx_helper.JobStatus) – Current status of the job

  • created_date (datetime.datetime) – The date the job was created

  • scheduled_date (datetime.datetime, optional) – The date the job will be issued, if not yet issued

  • start_date (datetime.datetime, optional) – The date the job started issuing

  • issued_date (datetime.datetime, optional) – The date the job was issued

  • finished_date (datetime.datetime, optional) – The date the job issuing was confirmed on the blockchain

  • failed_date (datetime.datetime, optional) – The date the job issuing failed, if applicable

property chain

Alias for field number 2

property created_date

Alias for field number 5

property failed_date

Alias for field number 10

property finished_date

Alias for field number 9

property issued_date

Alias for field number 8

property partner

Alias for field number 1

property scheduled_date

Alias for field number 6

property start_date

Alias for field number 7

property status

Alias for field number 4

property tags

Alias for field number 3

property uid

Alias for field number 0

class vdx_helper.models.PaginatedResponse(page: int, total_pages: int, per_page: int, total_items: int, items: List[Any])

Bases: tuple

Object representing a paginated response from the API. from the API

Parameters:
  • page (int) – The page the items are from

  • total_pages (int) – The total number of pages

  • per_page (int) – The number of items returned per page

  • total_items (int) – The total number of items

  • items (List[Any]) – The list of objects returned by the API

property items

Alias for field number 4

property page

Alias for field number 0

property per_page

Alias for field number 2

property total_items

Alias for field number 3

property total_pages

Alias for field number 1

class vdx_helper.models.Partner(id: str, name: str)

Bases: tuple

A Partner object returned by the Core API.

Parameters:
  • id (str) – The partner ID

  • name (str) – The name of the partner

property id

Alias for field number 0

property name

Alias for field number 1

class vdx_helper.models.VerificationReport(status: VerificationStatus, timestamp: datetime)

Bases: tuple

Object representing the final result of the verification of a certificate, not including the individual result of each step.

Parameters:
property status

Alias for field number 0

property timestamp

Alias for field number 1

class vdx_helper.models.VerificationResponse(verification: Dict[str, VerificationStepResult], result: VerificationReport)

Bases: tuple

Object representing the result of a verification returned from the API, including all steps.

Parameters:
property result

Alias for field number 1

property verification

Alias for field number 0

class vdx_helper.models.VerificationStepResult(name: str, description: Mapping[str, Optional[str]], status: StepStatus)

Bases: tuple

Object representing the result of a step of the verification process.

Parameters:
  • name (str) – The name of the step

  • description (dict) – The result of the verification step, containing several fields and values

  • status (vdx_helper.StepStatus) – The final status of the step

property description

Alias for field number 1

property name

Alias for field number 0

property status

Alias for field number 2