# DuniterPy
Most complete client oriented Python library for [Duniter](https://git.duniter.org/nodes/typescript/duniter)/Ğ1 ecosystem.
This library was originally developed for [Sakia](https://git.duniter.org/clients/python/sakia) desktop client which is now discontinued.
It is currently used by following programs:
- [Tikka](https://git.duniter.org/clients/python/tikka), the desktop client.
- [Silkaj](https://silkaj.duniter.org/), command line client.
- [Jaklis](https://git.p2p.legal/axiom-team/jaklis), command line client for Cs+/Gchange pods.
- [Ğ1Dons](https://git.duniter.org/matograine/g1pourboire), Ğ1Dons, paper-wallet generator aimed at giving tips in Ğ1.
## Features
### Network
- APIs support: BMA, GVA, WS2P, and CS+:
- [Basic Merkle API](https://git.duniter.org/nodes/typescript/duniter/-/blob/dev/doc/HTTP_API.md), first Duniter API to be deprecated
- GraphQL Verification API, Duniter API in developement meant to replace BMA. Based on GraphQL.
- Websocket to Peer, Duniter inter-nodes (servers) API
- Cesium+, non-Duniter API, used to store profile data related to the blockchain as well as ads for Cesium and Ğchange.
- Non-threaded asynchronous/synchronous connections
- Support HTTP, HTTPS, and WebSocket transport for the APIs
- Endpoints management
### Blockchain
- Support [Duniter blockchain protocol](https://git.duniter.org/documents/rfcs#duniter-blockchain-protocol-dubp)
- Duniter documents management: transaction, block and WoT documents
- Multiple authentication methods
- Duniter signing key
- Sign/verify and encrypt/decrypt messages with Duniter credentials
## Requirements
- Python >= 3.9.0
- [graphql-core](https://pypi.org/project/graphql-core)
- [websocket-client](https://pypi.org/project/websocket-client)
- [jsonschema](https://pypi.org/project/jsonschema)
- [pyPEG2](https://pypi.org/project/pyPEG2)
- [base58](https://pypi.org/project/base58)
- [libnacl](https://pypi.org/project/libnacl)
- [pyaes](https://pypi.org/project/pyaes)
- [mnemonic](https://pypi.org/project/mnemonic)
## Installation
You will require following dependencies:
```bash
sudo apt install python3-pip python3-dev python3-wheel libsodium23
```
You can install DuniterPy and its dependencies with following command:
```sh
pip install --user duniterpy
```
Once you want to add DuniterPy to your Python project, you can add it as a dependency to your Python development environment: `pyproject.toml`, `requirements.txt`, `setup.py`.
We recommend [Poetry](https://python-poetry.org) usage.
## Documentation
[Online official automaticaly generated documentation](https://clients.pages.duniter.org/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
python examples/request_data.py
```
Or from Python interpreter:
```bash
python
>>> import examples
# To list available examples
>>> help(examples)
# Run example
>>> 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())
```
## Contributing
- Checkout the [contributing guide](CONTRIBUTING.md).
## Packaging status
[](https://repology.org/project/python:duniterpy/versions)
Raw data
{
"_id": null,
"home_page": null,
"name": "duniterpy",
"maintainer": "vit, Vincent Texier",
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": "vit@free.fr",
"keywords": "g1, duniter, cryptocurrency, librecurrency, library",
"author": "inso",
"author_email": "insomniak.fr@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ac/58/89a322f33ea54adb5c4c9eafab23692762680a500d5c3d498c9746689881/duniterpy-1.2.1.tar.gz",
"platform": null,
"description": "# DuniterPy\n\nMost complete client oriented Python library for [Duniter](https://git.duniter.org/nodes/typescript/duniter)/\u011e1 ecosystem.\n\nThis library was originally developed for [Sakia](https://git.duniter.org/clients/python/sakia) desktop client which is now discontinued.\nIt is currently used by following programs:\n\n- [Tikka](https://git.duniter.org/clients/python/tikka), the desktop client.\n- [Silkaj](https://silkaj.duniter.org/), command line client.\n- [Jaklis](https://git.p2p.legal/axiom-team/jaklis), command line client for Cs+/Gchange pods.\n- [\u011e1Dons](https://git.duniter.org/matograine/g1pourboire), \u011e1Dons, paper-wallet generator aimed at giving tips in \u011e1.\n\n## Features\n\n### Network\n\n- APIs support: BMA, GVA, WS2P, and CS+:\n - [Basic Merkle API](https://git.duniter.org/nodes/typescript/duniter/-/blob/dev/doc/HTTP_API.md), first Duniter API to be deprecated\n - GraphQL Verification API, Duniter API in developement meant to replace BMA. Based on GraphQL.\n - Websocket to Peer, Duniter inter-nodes (servers) API\n - Cesium+, non-Duniter API, used to store profile data related to the blockchain as well as ads for Cesium and \u011echange.\n- Non-threaded asynchronous/synchronous connections\n- Support HTTP, HTTPS, and WebSocket transport for the APIs\n- Endpoints management\n\n### Blockchain\n\n- Support [Duniter blockchain protocol](https://git.duniter.org/documents/rfcs#duniter-blockchain-protocol-dubp)\n- Duniter documents management: transaction, block and WoT documents\n- Multiple authentication methods\n- Duniter signing key\n- Sign/verify and encrypt/decrypt messages with Duniter credentials\n\n## Requirements\n\n- Python >= 3.9.0\n- [graphql-core](https://pypi.org/project/graphql-core)\n- [websocket-client](https://pypi.org/project/websocket-client)\n- [jsonschema](https://pypi.org/project/jsonschema)\n- [pyPEG2](https://pypi.org/project/pyPEG2)\n- [base58](https://pypi.org/project/base58)\n- [libnacl](https://pypi.org/project/libnacl)\n- [pyaes](https://pypi.org/project/pyaes)\n- [mnemonic](https://pypi.org/project/mnemonic)\n\n## Installation\n\nYou will require following dependencies:\n\n```bash\nsudo apt install python3-pip python3-dev python3-wheel libsodium23\n```\n\nYou can install DuniterPy and its dependencies with following command:\n\n```sh\npip install --user duniterpy\n```\n\nOnce you want to add DuniterPy to your Python project, you can add it as a dependency to your Python development environment: `pyproject.toml`, `requirements.txt`, `setup.py`.\nWe recommend [Poetry](https://python-poetry.org) usage.\n\n## Documentation\n\n[Online official automaticaly generated documentation](https://clients.pages.duniter.org/python/duniterpy/index.html)\n\n## Examples\n\nThe [examples folder](https://git.duniter.org/clients/python/duniterpy/tree/master/examples) contains scripts to help you!\n\n- Have a look at the `examples` folder\n- Run examples from parent folder directly\n\n```bash\npython examples/request_data.py\n```\n\nOr from Python interpreter:\n\n```bash\npython\n>>> import examples\n# To list available examples\n>>> help(examples)\n# Run example\n>>> examples.create_public_key()\n```\n\n`request_data_async` example requires to be run with `asyncio`:\n\n```bash\n>>> import examples, asyncio\n>>> asyncio.get_event_loop().run_until_complete(examples.request_data_async())\n```\n\n## Contributing\n\n- Checkout the [contributing guide](CONTRIBUTING.md).\n\n## Packaging status\n\n[](https://repology.org/project/python:duniterpy/versions)\n",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "Python library for developers of Duniter clients",
"version": "1.2.1",
"project_urls": null,
"split_keywords": [
"g1",
" duniter",
" cryptocurrency",
" librecurrency",
" library"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f805ba9dbe1069f7364f88ce17f0d002b2e3a5aca8f97320766d36df56e09f7b",
"md5": "4ea92bd03c772f0129fc8b93d890d492",
"sha256": "c741d3d4af6342670aefba18d92e493c688edef4b9032e5714fa6f85e05a3e5b"
},
"downloads": -1,
"filename": "duniterpy-1.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4ea92bd03c772f0129fc8b93d890d492",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 136236,
"upload_time": "2025-03-26T15:12:42",
"upload_time_iso_8601": "2025-03-26T15:12:42.227471Z",
"url": "https://files.pythonhosted.org/packages/f8/05/ba9dbe1069f7364f88ce17f0d002b2e3a5aca8f97320766d36df56e09f7b/duniterpy-1.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ac5889a322f33ea54adb5c4c9eafab23692762680a500d5c3d498c9746689881",
"md5": "33539844795d626020288ecc5a8be6e3",
"sha256": "a4394ac17a79cf509446d8227a226378db26e823b29c8295d222977fe79363a0"
},
"downloads": -1,
"filename": "duniterpy-1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "33539844795d626020288ecc5a8be6e3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 70248,
"upload_time": "2025-03-26T15:12:43",
"upload_time_iso_8601": "2025-03-26T15:12:43.644016Z",
"url": "https://files.pythonhosted.org/packages/ac/58/89a322f33ea54adb5c4c9eafab23692762680a500d5c3d498c9746689881/duniterpy-1.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-03-26 15:12:43",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "duniterpy"
}