Skip to content
Snippets Groups Projects
Select Git revision
  • 920564ed8b9df3673fa597056a009784927dbaed
  • main default protected
  • release/1.1
  • encrypt_comments
  • mnemonic_dewif
  • authors_rules
  • 0.14
  • rtd
  • 1.2.1 protected
  • 1.2.0 protected
  • 1.1.1 protected
  • 1.1.0 protected
  • 1.0.0 protected
  • 1.0.0rc1 protected
  • 1.0.0rc0 protected
  • 1.0.0-rc protected
  • 0.62.0 protected
  • 0.61.0 protected
  • 0.60.1 protected
  • 0.58.1 protected
  • 0.60.0 protected
  • 0.58.0 protected
  • 0.57.0 protected
  • 0.56.0 protected
  • 0.55.1 protected
  • 0.55.0 protected
  • 0.54.3 protected
  • 0.54.2 protected
28 results

duniterpy

Vincent Texier's avatar
issue #52 refactor api.client.API class and grammars.ouput module to pass mypy check
Vincent Texier authored
API class parameter module is removed
API class optional parameter headers is added
920564ed
History

Duniter Python API

https://coveralls.io/repos/duniter/duniter-python-api/badge.svg?branch=master&service=github

Python implementation of Duniter BMA API

Features

Requirements

Installation

You can install duniter-python-api and all its dependencies via the following pip install:

pip3 install duniterpy

Please take a look at the document HTTP API to learn about the API.

Development

  • Create a python environment with pyenv

    curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash`
  • Install dependencies:

    pip install -r requirements.txt
  • Add PYTHONPATH env var to your shell containing the path to this repository

  • Take a look at examples folder

  • Run examples from parent folder:

    python examples/request_data.py
  • Before submit a merge requests, please check the static typing and tests.

  • Check static typing with mypy:

    make check
  • Run unit tests with:

    make tests

Documentation

  • Install Sphinx:

    pip install -r requirements_dev.txt
  • Generate documentation:

    make docs
  • HTML Documentation is generated in docs/_build/html folder.

  • Examples

Packaging and deploy

Pypi

In the development pyenv environment, install the following tools:

pip install --upgrade pip setuptools wheel

pip install twine

Change the version number (semantic version number):

./release.sh 0.42.3

Build the Pypi package in the dist folder:

python setup.py sdist bdist_wheel

Deploy the package on the Pypi repository:

twine upload dist/*