- DIDKit's Python binaries can be installed directly from
pypi(instructions below); for manual/custom builds, see the sub-repo README.md file.
- For a few clear examples see the Syntax section below.
- The syntax is quite similar to the Rust library, so for a more systematic reference, you can read the Rust documentation.
Make sure you have the latest versions of pip and PyPA’s build installed:
Build DIDKit (latest release):
Build the package
Install the package using the provided setup.cfg file:
To use DIDKit in Python, import the didkit library and manipulate the
object as you would any other. It contains all the same methods and properties
as the didkit object in Rust, so you can refer to the Rust
docs for an overview of the core structure of
DIDKit as a library.
issueCredential, for example, takes all the properties you would
expect, as strings (mind the escape quotes!) and returns a credential as a JSON
object that the user then
.loads. See this example from the Python-Flask example
|Django web framework||example in GitHub|
|Flask web microframework||example in GitHub|