Skip to content
Snippets Groups Projects
Commit 62c52c3d authored by Moul's avatar Moul
Browse files

[doc] #160: Document examples usage from Python interpreter

parent de1b8329
Branches
Tags
2 merge requests!157v1.0.0rc0: merge dev into master,!134#160: Include examples into Python package
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment