Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DuniterPy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
DuniterPy
Commits
62c52c3d
Commit
62c52c3d
authored
4 years ago
by
Moul
Browse files
Options
Downloads
Patches
Plain Diff
[doc]
#160
: Document examples usage from Python interpreter
parent
de1b8329
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!157
v1.0.0rc0: merge dev into master
,
!134
#160: Include examples into Python package
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+21
-6
21 additions, 6 deletions
README.md
with
21 additions
and
6 deletions
README.md
+
21
−
6
View file @
62c52c3d
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment