virgil_sdk.client.card_client module

class virgil_sdk.client.card_client.CardClient(api_url='https://api.virgilsecurity.com', connection=None)[source]

Bases: virgil_sdk.client.base_card_client.BaseCardClient

The CardClient class provides operations with Virgil Cards service.

property api_url

Get service url.

get_card(card_id, token)[source]

Gets a card from Virgil Services by specified card ID.

Parameters
  • card_id – The Card ID.

  • token – The string representation of Jwt token.

Returns

An instance of RawSignedModel class and flag, which determines whether or not this raw card is superseded.

Raises

ValueError – Missed argument.

publish_card(raw_card, token)[source]

Publishes card in Virgil Cards service.

Parameters
  • raw_card – An instance of RawSignedModel class.

  • token – The string representation of Jwt token.

Returns

Published raw card.

search_card(identity, token)[source]

Searches a cards on Virgil Services by specified identity.

Parameters
  • identity – The identity (or list of identity).

  • token – The string representation of Jwt token.

Returns

A list of found cards in raw form.