Skip to main content

Python bindings to libxeddsa.

Project description

PyPI PyPI - Python Version Build Status Documentation Status

python-xeddsa

Python bindings to libxeddsa.

Installation

python-xeddsa depends on two system libraries, libxeddsa>=2,<3 and libsodium.

Install the latest release using pip (pip install XEdDSA), from the wheels available in the artifacts of the Test & Publish workflow, or manually from source by running pip install . in the cloned repository. The installation from source requires libxeddsa, libsodium and the Python development headers to be installed.

Testing, Type Checks and Linting

python-xeddsa uses pytest as its testing framework, mypy for static type checks and both pylint and Flake8 for linting. All tests/checks can be run locally with the following commands:

$ pip install --upgrade pytest pytest-cov mypy pylint flake8
$ export MYPYPATH=stubs/
$ mypy --strict xeddsa/ setup.py libxeddsa/ tests/
$ pylint xeddsa/ setup.py libxeddsa/ tests/
$ flake8 xeddsa/ setup.py libxeddsa/ tests/
$ pytest --cov=xeddsa --cov-report term-missing:skip-covered

Usage with Brython

python-xeddsa can be used in the browser with Brython, thanks to the Emscripten build of libxeddsa. Refer to tests/test_brython.html for the setup routine required to load the Emscripten build for usage with Brython. In summary, Brython's initialization is deferred until after the libxeddsa WebAssembly module and wrapper have been loaded. Other than that, python-xeddsa can be used as usual and handled with Brython like a pure Python package.

The tests can be run with Brython by running the following commands from the root of this repository:

$ # You need brython-cli in the version fitting your local Python installation
$ pip install brython==$YOUR_PYTHON_VERSION
$ cd xeddsa/
$ # Older versions of brython-cli use `--make_package` instead of just `make_package`
$ brython-cli --make_package xeddsa
$ cd ../
$ python3 -m http.server 8080
$ xdg-open http://localhost:8080/tests/test_brython.html

You'll find the output in the browser's dev console.

Documentation

View the documentation on readthedocs.io or build it locally, which requires the Python packages listed in docs/requirements.txt. With all dependencies installed, run make html in the docs/ directory. You can find the generated documentation in docs/_build/html/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

XEdDSA-1.0.2.tar.gz (7.7 kB view hashes)

Uploaded Source

Built Distributions

XEdDSA-1.0.2-pp39-pypy39_pp73-win_amd64.whl (143.4 kB view hashes)

Uploaded PyPy Windows x86-64

XEdDSA-1.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (223.1 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

XEdDSA-1.0.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (208.3 kB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

XEdDSA-1.0.2-pp38-pypy38_pp73-win_amd64.whl (143.4 kB view hashes)

Uploaded PyPy Windows x86-64

XEdDSA-1.0.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (223.1 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

XEdDSA-1.0.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (208.3 kB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

XEdDSA-1.0.2-pp37-pypy37_pp73-win_amd64.whl (143.4 kB view hashes)

Uploaded PyPy Windows x86-64

XEdDSA-1.0.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (223.6 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

XEdDSA-1.0.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl (208.3 kB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

XEdDSA-1.0.2-cp311-cp311-win_amd64.whl (146.0 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

XEdDSA-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (243.0 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

XEdDSA-1.0.2-cp311-cp311-macosx_11_0_arm64.whl (161.7 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

XEdDSA-1.0.2-cp311-cp311-macosx_10_9_x86_64.whl (212.3 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

XEdDSA-1.0.2-cp310-cp310-win_amd64.whl (146.0 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

XEdDSA-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (243.0 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

XEdDSA-1.0.2-cp310-cp310-macosx_11_0_arm64.whl (161.7 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

XEdDSA-1.0.2-cp310-cp310-macosx_10_9_x86_64.whl (212.3 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

XEdDSA-1.0.2-cp39-cp39-win_amd64.whl (146.0 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

XEdDSA-1.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (243.0 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

XEdDSA-1.0.2-cp39-cp39-macosx_11_0_arm64.whl (161.7 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

XEdDSA-1.0.2-cp39-cp39-macosx_10_9_x86_64.whl (212.3 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

XEdDSA-1.0.2-cp38-cp38-win_amd64.whl (146.0 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

XEdDSA-1.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (243.2 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

XEdDSA-1.0.2-cp38-cp38-macosx_11_0_arm64.whl (161.7 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

XEdDSA-1.0.2-cp38-cp38-macosx_10_9_x86_64.whl (212.3 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

XEdDSA-1.0.2-cp37-cp37m-win_amd64.whl (146.0 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

XEdDSA-1.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (242.8 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

XEdDSA-1.0.2-cp37-cp37m-macosx_10_9_x86_64.whl (212.3 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page