virgil_sdk.client package¶
Subpackages¶
- virgil_sdk.client.connections package
- Submodules
- virgil_sdk.client.connections.base_connection module
- virgil_sdk.client.connections.base_request module
- virgil_sdk.client.connections.request module
- virgil_sdk.client.connections.service_connection module
- virgil_sdk.client.connections.service_error module
- virgil_sdk.client.connections.urllib module
- Module contents
Submodules¶
virgil_sdk.client.base_card_client module¶
-
class
virgil_sdk.client.base_card_client.
BaseCardClient
[source]¶ Bases:
object
The BaseCardClient defines a list of operations with Virgil Cards service.
-
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.
-
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.
-
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.
-
virgil_sdk.client.client_exception module¶
virgil_sdk.client.raw_signature module¶
virgil_sdk.client.raw_signed_model module¶
-
class
virgil_sdk.client.raw_signed_model.
RawSignedModel
(content_snapshot, signatures=None)[source]¶ Bases:
object
The RawSignedModel provides transitional model of <see cref=”Card”/> and used by CardClient.
-
add_signature
(signature)[source]¶ Add signature to RawSignedModel list.
Parameters: signature – Card signature. Raises: ValueError
– Attempt to add existing signature.
-
content_snapshot
¶ Snapshot of RawCardContent.
-
classmethod
from_json
(raw_signed_model_json)[source]¶ Deserialize RawSignedModel from json representation.
-
classmethod
from_string
(raw_signed_model_string)[source]¶ Deserialize RawSignedModel from base64 encoded string.
-
classmethod
generate
(public_key, identity, created_at, previous_card_id=None)[source]¶ Generate card RawSignedModel.
Parameters: - public_key – Card public key.
- identity – Unique card identity.
- created_at – Creation timestamp.
- previous_card_id – Previous card ID.
Returns: Generate RawSignedModel instance.
-
signatures
¶ A list of signatures.
-