diff --git a/README.md b/README.md index 3e70265dd53b3052ad4b482f8734f68275a21933..1b3be0e10130758b98944cdc117146a533687b65 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,29 @@ pip3 install duniterpy --user ## Documentation [Online official automaticaly generated documentation](https://clients.duniter.io/python/duniterpy/index.html) +## Examples The [examples folder](https://git.duniter.org/clients/python/duniterpy/tree/master/examples) contains scripts to help you! +- Have a look at the `examples` folder +- Run examples from parent folder directly +```bash +poetry run python examples/request_data.py +``` + +Or from Python interpreter: +```bash +poetry run python +>>> import examples +>>> help(examples) +>>> examples.create_public_key() +``` + +`request_data_async` example requires to be run with `asyncio`: +```bash +>>> import examples, asyncio +>>> asyncio.get_event_loop().run_until_complete(examples.request_data_async()) +``` + ### How to generate and read locally the autodoc - Install Sphinx, included into the development dependencies: @@ -78,12 +99,6 @@ poetry run make docs poetry install --no-dev ``` -* Have a look at the examples folder -* Run examples from parent folder -```bash -poetry run python examples/request_data.py -``` - * Before submitting a merge requests, please check the static typing and tests. * Install dev dependencies