• Stars
    star
    503
  • Rank 87,705 (Top 2 %)
  • Language
    Python
  • License
    Other
  • Created over 6 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Python Matrix client library, designed according to sans I/O (http://sans-io.readthedocs.io/) principles

nio

Build Status codecov license Documentation Status #nio

nio is a multilayered Matrix client library. The underlying base layer doesn't do any network IO on its own, but on top of that is a full fledged batteries-included asyncio layer using aiohttp. File IO is only done if you enable end-to-end encryption (E2EE).

Documentation

The full API documentation for nio can be found at https://matrix-nio.readthedocs.io

Features

nio has most of the features you'd expect in a Matrix library, but it's still a work in progress.

  • βœ… transparent end-to-end encryption (EE2E)
  • βœ… encrypted file uploads & downloads
  • βœ… manual and emoji verification
  • βœ… custom authentication types
  • βœ… well-integrated type system
  • βœ… kick, ban and unban
  • βœ… typing notifications
  • βœ… message redaction
  • βœ… token based login
  • βœ… user registration
  • βœ… read receipts
  • βœ… live syncing
  • βœ… m.tags
  • ❌ python 2.7 support
  • ❌ cross-signing support
  • ❌ server-side key backups (room key backup, "Secure Backup")
  • ❌ user deactivation (#112)
  • ❌ in-room emoji verification
  • ❌ room upgrades and m.room.tombstone events (#47)

Installation

To install nio, simply use pip:

$ pip install matrix-nio

Note that this installs nio without end-to-end encryption support. For e2ee support, python-olm is needed which requires the libolm C library (version 3.x). On Debian and Ubuntu one can use apt-get to install package libolm-dev. On Fedora one can use dnf to install package libolm-devel. On MacOS one can use brew to install package libolm. Make sure version 3 is installed.

After libolm has been installed, the e2ee enabled version of nio can be installed using pip:

$ pip install "matrix-nio[e2e]"

Additionally, a docker image with the e2ee enabled version of nio is provided in the docker/ directory.

Examples

For examples of how to use nio, and how others are using it, read the docs