Skip to main content

Python library for Factom DIDs

Project description

Build Status Coverage Status License: MIT Code style: black

py-factom-did

py-factom-did is a Python library, allowing the creation and update of Decentralized Identifiers (DIDs) and the exporting of public metadata for them, which can be recorded on the Factom blockchain. The library enables:

  • creating a new DID
  • adding management key(s) for the DID
  • adding DID key(s) for the DID
  • adding service(s) for the DID
  • exporting public metadata to be recorded on Factom
  • encrypting the newly created keys
  • updating an existing DID: adding/revoking management keys, DID keys and services and producing a signed DID update entry

You can find an example of the library workflow in the examples/ directory. In order to run the example, please note that it is necessary to:

  • have local instances of factomd and factom-walletd running
  • create an environment variable called EC_ADDR, which contains a funded EC address to pay the fees for recording the DID on-chain

Installation

pip install py-factom-did

Build

  • Clone the repo

  • Create the virtual environment and install the dependencies:

pipenv install

or

pipenv install --pre -d

to install both the default and development dependencies

  • Activate the virtual environment:
pipenv shell
  • Execute the tests:
pytest
  • Execute the example:
python -m examples.example

Documentation

API documentation of the library is available here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-factom-did-0.4.0.tar.gz (13.0 kB view hashes)

Uploaded Source

Built Distribution

py_factom_did-0.4.0-py3-none-any.whl (16.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page