caosadvancedtools.bloxberg package

Submodules

caosadvancedtools.bloxberg.bloxberg module

Interaction with the Bloxberg blockchain.

class caosadvancedtools.bloxberg.bloxberg.Bloxberg(connection=None)

Bases: object

A Bloxberg instance can be used to obtain or verify certificates.

certify(entity)

Attempt to certify the given entity and return a certificate Record.

Parameters
  • entity (caosdb.Entity) –

  • entity to be certified (The) –

Returns

  • out (caosdb.Record)

  • A BloxbergCertificate Record with all the necessary Properties.

static json_from_certificate(certificate, filename=None)

Generate a qa.certify.bloxberg.org JSON string, optionally writing it to a file.

Parameters
  • certificate (caosdb.Record) –

  • BloxbergCertificate Record for which the JSON is generated. (The) –

  • filename (str) –

  • the JSON to this file. (Write) –

verify(certificate)

Attempt to verify the certificate.

A certificate passes verification if the Bloxberg instance says it is good. Typical use cases may also include the validate step to make sure that the certificate’s original data exists and contains what it claimed to contain when the certificate was created.

This method does nothing if the verification passes, else it raises an exception.

Parameters
  • certificate (caosdb.Record) –

  • BloxbergCertificate Record which shall be verified. (The) –

caosadvancedtools.bloxberg.bloxberg.certify_entity(entity, json_filename=None)

Certify the given entity and store the result in the CaosDB.

Parameters
  • entity (caosdb.Entity) – The Entity to be certified.

  • json_filename (str) – If given, store the JSON here.

caosadvancedtools.bloxberg.bloxberg.demo_run()

Run the core functions for demonstration purposes.

caosadvancedtools.bloxberg.bloxberg.ensure_data_model(force=False)

Make sure that the data model fits our needs.

Most importantly, this means that a suitable RecordType “BoxbergCertificate” must exist.

Module contents

Integration with the Bloxberg proof-of-existence blockchain.