Skip to content

Wealize/alastria-identity-lib-py

Repository files navigation

alastria-identity-lib-py

Python version of the Alastria Identity lib

Installing

pip install alastria-identity

or you could use Poetry

poetry add alastria-identity

Testing

Execute tests

docker-compose run --rm identity poetry run python -m coverage run -m pytest alastria_identity -v .

Create and check test coverage

docker-compose run --rm identity poetry run coverage html
python -m http.server 8000

Open http://localhost:8000 in your browser

How to use the library

You can check the examples in this folder, we'll continue updating the documentation.

Some gooodies

You can check in different files utilities that might be useful to you.

Glossary

  • Provider node url: It's the url (with /rpc endpoint) of the node you want to connect in which the library can interact with the Alastria identity smart contracts.
  • Contracts info: It's the file Alastria members created to be loaded to the identity libraries. You can't change it using the javascript library but you can set it in this one. We generate the configuration the Transaction service uses on the fly.
  • Contract names: The contract names you need to use the library, in this case you can check the Alastria examples in the ContractsInfo file. You can check it better formatted pasting it to codebeautify.org.
  • Contract addresses: As the one above It's self-explanatory, the address of the smart contract deployed you want to use.

TODO

  • This README
  • Add more code examples You can check them here
  • Create the PyPI package and push it to pypi.org
  • Test the connection with the identity Alastria network node
  • Delegate calls is still a WIP, we need to finish that
  • Get address from the ContractInfo data

Contributors

Started with ❤️ by the Wealize Team.