mindroom-nio 0.25.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mindroom_nio-0.25.2/LICENSE.md +16 -0
- mindroom_nio-0.25.2/MANIFEST.in +1 -0
- mindroom_nio-0.25.2/Makefile +28 -0
- mindroom_nio-0.25.2/PKG-INFO +145 -0
- mindroom_nio-0.25.2/README.md +80 -0
- mindroom_nio-0.25.2/pyproject.toml +140 -0
- mindroom_nio-0.25.2/setup.cfg +11 -0
- mindroom_nio-0.25.2/src/mindroom_nio.egg-info/PKG-INFO +145 -0
- mindroom_nio-0.25.2/src/mindroom_nio.egg-info/SOURCES.txt +53 -0
- mindroom_nio-0.25.2/src/mindroom_nio.egg-info/dependency_links.txt +1 -0
- mindroom_nio-0.25.2/src/mindroom_nio.egg-info/requires.txt +39 -0
- mindroom_nio-0.25.2/src/mindroom_nio.egg-info/top_level.txt +1 -0
- mindroom_nio-0.25.2/src/nio/__init__.py +15 -0
- mindroom_nio-0.25.2/src/nio/_compat.py +23 -0
- mindroom_nio-0.25.2/src/nio/api.py +2262 -0
- mindroom_nio-0.25.2/src/nio/client/__init__.py +5 -0
- mindroom_nio-0.25.2/src/nio/client/async_client.py +4190 -0
- mindroom_nio-0.25.2/src/nio/client/base_client.py +1558 -0
- mindroom_nio-0.25.2/src/nio/client/http_client.py +1215 -0
- mindroom_nio-0.25.2/src/nio/crypto/__init__.py +44 -0
- mindroom_nio-0.25.2/src/nio/crypto/async_attachments.py +140 -0
- mindroom_nio-0.25.2/src/nio/crypto/attachments.py +155 -0
- mindroom_nio-0.25.2/src/nio/crypto/device.py +206 -0
- mindroom_nio-0.25.2/src/nio/crypto/key_export.py +137 -0
- mindroom_nio-0.25.2/src/nio/crypto/key_request.py +65 -0
- mindroom_nio-0.25.2/src/nio/crypto/log.py +17 -0
- mindroom_nio-0.25.2/src/nio/crypto/memorystores.py +82 -0
- mindroom_nio-0.25.2/src/nio/crypto/olm_machine.py +2195 -0
- mindroom_nio-0.25.2/src/nio/crypto/sas.py +742 -0
- mindroom_nio-0.25.2/src/nio/crypto/sessions.py +423 -0
- mindroom_nio-0.25.2/src/nio/event_builders/__init__.py +11 -0
- mindroom_nio-0.25.2/src/nio/event_builders/direct_messages.py +72 -0
- mindroom_nio-0.25.2/src/nio/event_builders/event_builder.py +23 -0
- mindroom_nio-0.25.2/src/nio/event_builders/state_events.py +183 -0
- mindroom_nio-0.25.2/src/nio/events/__init__.py +16 -0
- mindroom_nio-0.25.2/src/nio/events/account_data.py +619 -0
- mindroom_nio-0.25.2/src/nio/events/common.py +139 -0
- mindroom_nio-0.25.2/src/nio/events/ephemeral.py +148 -0
- mindroom_nio-0.25.2/src/nio/events/invite_events.py +199 -0
- mindroom_nio-0.25.2/src/nio/events/misc.py +214 -0
- mindroom_nio-0.25.2/src/nio/events/presence.py +57 -0
- mindroom_nio-0.25.2/src/nio/events/room_events.py +1615 -0
- mindroom_nio-0.25.2/src/nio/events/to_device.py +540 -0
- mindroom_nio-0.25.2/src/nio/exceptions.py +67 -0
- mindroom_nio-0.25.2/src/nio/http.py +541 -0
- mindroom_nio-0.25.2/src/nio/monitors.py +179 -0
- mindroom_nio-0.25.2/src/nio/responses.py +2280 -0
- mindroom_nio-0.25.2/src/nio/rooms.py +591 -0
- mindroom_nio-0.25.2/src/nio/schemas.py +2118 -0
- mindroom_nio-0.25.2/src/nio/store/__init__.py +43 -0
- mindroom_nio-0.25.2/src/nio/store/database.py +1030 -0
- mindroom_nio-0.25.2/src/nio/store/file_trustdb.py +163 -0
- mindroom_nio-0.25.2/src/nio/store/log.py +18 -0
- mindroom_nio-0.25.2/src/nio/store/models.py +226 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Internet Systems Consortium license
|
|
2
|
+
===================================
|
|
3
|
+
|
|
4
|
+
Copyright (c) `2018`, `Damir Jelić <poljar@termina.org.uk>`
|
|
5
|
+
|
|
6
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
7
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
8
|
+
and this permission notice appear in all copies.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
11
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
12
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
13
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
14
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
15
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
16
|
+
THIS SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include Makefile
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
PYTHON ?= python
|
|
2
|
+
|
|
3
|
+
all:
|
|
4
|
+
|
|
5
|
+
init:
|
|
6
|
+
pre-commit install --install-hooks
|
|
7
|
+
|
|
8
|
+
test:
|
|
9
|
+
python3 -m pytest --benchmark-disable
|
|
10
|
+
|
|
11
|
+
typecheck:
|
|
12
|
+
mypy -p nio --warn-redundant-casts
|
|
13
|
+
|
|
14
|
+
coverage:
|
|
15
|
+
python3 -m pytest --cov nio --benchmark-disable
|
|
16
|
+
|
|
17
|
+
clean:
|
|
18
|
+
-rm -r dist/ __pycache__/
|
|
19
|
+
-rm -r packages/
|
|
20
|
+
|
|
21
|
+
arch-git-pkg:
|
|
22
|
+
-rm -r packages/
|
|
23
|
+
umask 0022 && poetry build --format sdist
|
|
24
|
+
cp contrib/archlinux/pkgbuild/PKGBUILD.git dist/PKGBUILD
|
|
25
|
+
cd dist && makepkg -ci
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
.PHONY: all clean init test typecheck coverage
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mindroom-nio
|
|
3
|
+
Version: 0.25.2
|
|
4
|
+
Summary: A Python Matrix client library, designed according to sans I/O principles.
|
|
5
|
+
Author-email: Damir Jelić <poljar@termina.org.uk>, Paarth Shah <mail@shahpaarth.com>
|
|
6
|
+
License: Internet Systems Consortium license
|
|
7
|
+
===================================
|
|
8
|
+
|
|
9
|
+
Copyright (c) `2018`, `Damir Jelić <poljar@termina.org.uk>`
|
|
10
|
+
|
|
11
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
12
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
13
|
+
and this permission notice appear in all copies.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
16
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
17
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
18
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
19
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
20
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
21
|
+
THIS SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Project-URL: Source, https://github.com/mindroom-ai/mindroom-nio
|
|
24
|
+
Project-URL: Documentation, https://matrix-nio.readthedocs.io/en/latest/
|
|
25
|
+
Requires-Python: >=3.10.0
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE.md
|
|
28
|
+
Requires-Dist: aiohttp~=3.10
|
|
29
|
+
Requires-Dist: aiofiles~=24.1
|
|
30
|
+
Requires-Dist: h11~=0.14
|
|
31
|
+
Requires-Dist: h2~=4.0
|
|
32
|
+
Requires-Dist: jsonschema~=4.14
|
|
33
|
+
Requires-Dist: unpaddedbase64~=2.1
|
|
34
|
+
Requires-Dist: pycryptodome~=3.10
|
|
35
|
+
Requires-Dist: aiohttp-socks~=0.8
|
|
36
|
+
Provides-Extra: e2e
|
|
37
|
+
Requires-Dist: atomicwrites~=1.4; extra == "e2e"
|
|
38
|
+
Requires-Dist: cachetools~=5.3; extra == "e2e"
|
|
39
|
+
Requires-Dist: peewee~=3.14; extra == "e2e"
|
|
40
|
+
Requires-Dist: vodozemac~=0.9; extra == "e2e"
|
|
41
|
+
Provides-Extra: dev
|
|
42
|
+
Requires-Dist: mindroom-nio[e2e]; extra == "dev"
|
|
43
|
+
Requires-Dist: aioresponses~=0.7; extra == "dev"
|
|
44
|
+
Requires-Dist: hpack~=4.0; extra == "dev"
|
|
45
|
+
Requires-Dist: hyperframe~=6.0; extra == "dev"
|
|
46
|
+
Requires-Dist: hypothesis~=6.8; extra == "dev"
|
|
47
|
+
Requires-Dist: faker~=8.0; extra == "dev"
|
|
48
|
+
Requires-Dist: mypy~=1.11; extra == "dev"
|
|
49
|
+
Requires-Dist: mypy_extensions~=1.0; extra == "dev"
|
|
50
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
51
|
+
Requires-Dist: pytest~=8.2; extra == "dev"
|
|
52
|
+
Requires-Dist: pytest-asyncio~=0.24; extra == "dev"
|
|
53
|
+
Requires-Dist: pytest-aiohttp~=0.3; extra == "dev"
|
|
54
|
+
Requires-Dist: pytest-benchmark~=4.0; extra == "dev"
|
|
55
|
+
Requires-Dist: pytest-cov~=2.11; extra == "dev"
|
|
56
|
+
Requires-Dist: pytest-flake8~=1.2; extra == "dev"
|
|
57
|
+
Provides-Extra: docs
|
|
58
|
+
Requires-Dist: mindroom-nio[dev]; extra == "docs"
|
|
59
|
+
Requires-Dist: setuptools>=61.0; extra == "docs"
|
|
60
|
+
Requires-Dist: sphinx~=7.4; extra == "docs"
|
|
61
|
+
Requires-Dist: sphinx-autodoc-typehints~=2.1; extra == "docs"
|
|
62
|
+
Requires-Dist: sphinx_mdinclude>=0.5; extra == "docs"
|
|
63
|
+
Requires-Dist: sphinx_rtd_theme~=2.0; extra == "docs"
|
|
64
|
+
Dynamic: license-file
|
|
65
|
+
|
|
66
|
+
nio
|
|
67
|
+
===
|
|
68
|
+
|
|
69
|
+
[](https://github.com/matrix-nio/matrix-nio/actions)
|
|
70
|
+
[](https://pypi.org/project/matrix-nio/)
|
|
71
|
+
[](https://codecov.io/gh/matrix-nio/matrix-nio)
|
|
72
|
+
[](https://github.com/matrix-nio/matrix-nio/blob/master/LICENSE.md)
|
|
73
|
+
[](https://matrix-nio.readthedocs.io/en/latest/?badge=latest)
|
|
74
|
+
[](https://matrix.to/#/!JiiOHXrIUCtcOJsZCa:matrix.org?via=matrix.org&via=maunium.net&via=t2l.io)
|
|
75
|
+
|
|
76
|
+
nio is a multilayered [Matrix](https://matrix.org/) client library. The
|
|
77
|
+
underlying base layer doesn't do any network IO on its own, but on top of that
|
|
78
|
+
is a full-fledged batteries-included asyncio layer using
|
|
79
|
+
[aiohttp](https://github.com/aio-libs/aiohttp/). File IO is only done if you
|
|
80
|
+
enable end-to-end encryption (E2EE).
|
|
81
|
+
|
|
82
|
+
Documentation
|
|
83
|
+
-------------
|
|
84
|
+
|
|
85
|
+
The full API documentation for nio can be found at
|
|
86
|
+
[https://matrix-nio.readthedocs.io](https://matrix-nio.readthedocs.io/en/latest/#api-documentation)
|
|
87
|
+
|
|
88
|
+
Features
|
|
89
|
+
--------
|
|
90
|
+
|
|
91
|
+
nio has most of the features you'd expect in a Matrix library, but it's still a work in progress.
|
|
92
|
+
|
|
93
|
+
- ✅ transparent end-to-end encryption (EE2E)
|
|
94
|
+
- ✅ encrypted file uploads & downloads
|
|
95
|
+
- ✅ space parents/children
|
|
96
|
+
- ✅ manual and emoji verification
|
|
97
|
+
- ✅ custom [authentication types](https://matrix.org/docs/spec/client_server/r0.6.0#id183)
|
|
98
|
+
- ✅ threading support
|
|
99
|
+
- ✅ well-integrated type system
|
|
100
|
+
- ✅ knocking, kick, ban and unban
|
|
101
|
+
- ✅ typing notifications
|
|
102
|
+
- ✅ message redaction
|
|
103
|
+
- ✅ token based login
|
|
104
|
+
- ✅ user registration
|
|
105
|
+
- ✅ read receipts
|
|
106
|
+
- ✅ live syncing
|
|
107
|
+
- ✅ `m.reaction`s
|
|
108
|
+
- ✅ `m.tag`s
|
|
109
|
+
- ❌ cross-signing support
|
|
110
|
+
- ❌ server-side key backups (room key backup, "Secure Backup")
|
|
111
|
+
- ❌ user deactivation ([#112](https://github.com/matrix-nio/matrix-nio/issues/112))
|
|
112
|
+
- ❌ in-room emoji verification
|
|
113
|
+
|
|
114
|
+
Installation
|
|
115
|
+
------------
|
|
116
|
+
|
|
117
|
+
To install nio, simply use pip:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
$ pip install matrix-nio
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Note that this installs nio without end-to-end encryption support. For e2ee
|
|
124
|
+
support, python-olm is needed which requires the
|
|
125
|
+
[libolm](https://gitlab.matrix.org/matrix-org/olm) C library (version 3.x).
|
|
126
|
+
On Debian and Ubuntu one can use `apt-get` to install package `libolm-dev`.
|
|
127
|
+
On Fedora one can use `dnf` to install package `libolm-devel`.
|
|
128
|
+
On MacOS one can use [brew](https://brew.sh/) to install package `libolm`.
|
|
129
|
+
Make sure version 3 is installed.
|
|
130
|
+
|
|
131
|
+
After libolm has been installed, the e2ee enabled version of nio can be
|
|
132
|
+
installed using pip:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
$ pip install matrix-nio[e2e]
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Additionally, a docker image with the e2ee enabled version of nio is provided in
|
|
139
|
+
the `docker/` directory.
|
|
140
|
+
|
|
141
|
+
Examples
|
|
142
|
+
--------
|
|
143
|
+
|
|
144
|
+
For examples of how to use nio, and how others are using it,
|
|
145
|
+
[read the docs](https://matrix-nio.readthedocs.io/en/latest/examples.html)
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
nio
|
|
2
|
+
===
|
|
3
|
+
|
|
4
|
+
[](https://github.com/matrix-nio/matrix-nio/actions)
|
|
5
|
+
[](https://pypi.org/project/matrix-nio/)
|
|
6
|
+
[](https://codecov.io/gh/matrix-nio/matrix-nio)
|
|
7
|
+
[](https://github.com/matrix-nio/matrix-nio/blob/master/LICENSE.md)
|
|
8
|
+
[](https://matrix-nio.readthedocs.io/en/latest/?badge=latest)
|
|
9
|
+
[](https://matrix.to/#/!JiiOHXrIUCtcOJsZCa:matrix.org?via=matrix.org&via=maunium.net&via=t2l.io)
|
|
10
|
+
|
|
11
|
+
nio is a multilayered [Matrix](https://matrix.org/) client library. The
|
|
12
|
+
underlying base layer doesn't do any network IO on its own, but on top of that
|
|
13
|
+
is a full-fledged batteries-included asyncio layer using
|
|
14
|
+
[aiohttp](https://github.com/aio-libs/aiohttp/). File IO is only done if you
|
|
15
|
+
enable end-to-end encryption (E2EE).
|
|
16
|
+
|
|
17
|
+
Documentation
|
|
18
|
+
-------------
|
|
19
|
+
|
|
20
|
+
The full API documentation for nio can be found at
|
|
21
|
+
[https://matrix-nio.readthedocs.io](https://matrix-nio.readthedocs.io/en/latest/#api-documentation)
|
|
22
|
+
|
|
23
|
+
Features
|
|
24
|
+
--------
|
|
25
|
+
|
|
26
|
+
nio has most of the features you'd expect in a Matrix library, but it's still a work in progress.
|
|
27
|
+
|
|
28
|
+
- ✅ transparent end-to-end encryption (EE2E)
|
|
29
|
+
- ✅ encrypted file uploads & downloads
|
|
30
|
+
- ✅ space parents/children
|
|
31
|
+
- ✅ manual and emoji verification
|
|
32
|
+
- ✅ custom [authentication types](https://matrix.org/docs/spec/client_server/r0.6.0#id183)
|
|
33
|
+
- ✅ threading support
|
|
34
|
+
- ✅ well-integrated type system
|
|
35
|
+
- ✅ knocking, kick, ban and unban
|
|
36
|
+
- ✅ typing notifications
|
|
37
|
+
- ✅ message redaction
|
|
38
|
+
- ✅ token based login
|
|
39
|
+
- ✅ user registration
|
|
40
|
+
- ✅ read receipts
|
|
41
|
+
- ✅ live syncing
|
|
42
|
+
- ✅ `m.reaction`s
|
|
43
|
+
- ✅ `m.tag`s
|
|
44
|
+
- ❌ cross-signing support
|
|
45
|
+
- ❌ server-side key backups (room key backup, "Secure Backup")
|
|
46
|
+
- ❌ user deactivation ([#112](https://github.com/matrix-nio/matrix-nio/issues/112))
|
|
47
|
+
- ❌ in-room emoji verification
|
|
48
|
+
|
|
49
|
+
Installation
|
|
50
|
+
------------
|
|
51
|
+
|
|
52
|
+
To install nio, simply use pip:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
$ pip install matrix-nio
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Note that this installs nio without end-to-end encryption support. For e2ee
|
|
59
|
+
support, python-olm is needed which requires the
|
|
60
|
+
[libolm](https://gitlab.matrix.org/matrix-org/olm) C library (version 3.x).
|
|
61
|
+
On Debian and Ubuntu one can use `apt-get` to install package `libolm-dev`.
|
|
62
|
+
On Fedora one can use `dnf` to install package `libolm-devel`.
|
|
63
|
+
On MacOS one can use [brew](https://brew.sh/) to install package `libolm`.
|
|
64
|
+
Make sure version 3 is installed.
|
|
65
|
+
|
|
66
|
+
After libolm has been installed, the e2ee enabled version of nio can be
|
|
67
|
+
installed using pip:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
$ pip install matrix-nio[e2e]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Additionally, a docker image with the e2ee enabled version of nio is provided in
|
|
74
|
+
the `docker/` directory.
|
|
75
|
+
|
|
76
|
+
Examples
|
|
77
|
+
--------
|
|
78
|
+
|
|
79
|
+
For examples of how to use nio, and how others are using it,
|
|
80
|
+
[read the docs](https://matrix-nio.readthedocs.io/en/latest/examples.html)
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools >= 61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "mindroom-nio"
|
|
7
|
+
version = "0.25.2"
|
|
8
|
+
description = "A Python Matrix client library, designed according to sans I/O principles."
|
|
9
|
+
authors = [
|
|
10
|
+
{ name = "Damir Jelić", email = "poljar@termina.org.uk" },
|
|
11
|
+
{ name = "Paarth Shah", email = "mail@shahpaarth.com" }
|
|
12
|
+
]
|
|
13
|
+
license = { file = "LICENSE.md" }
|
|
14
|
+
readme = "README.md"
|
|
15
|
+
requires-python = ">=3.10.0"
|
|
16
|
+
dependencies = [
|
|
17
|
+
"aiohttp~=3.10",
|
|
18
|
+
"aiofiles~=24.1",
|
|
19
|
+
"h11~=0.14",
|
|
20
|
+
"h2~=4.0",
|
|
21
|
+
"jsonschema~=4.14",
|
|
22
|
+
"unpaddedbase64~=2.1",
|
|
23
|
+
"pycryptodome~=3.10",
|
|
24
|
+
"aiohttp-socks~=0.8"
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.optional-dependencies]
|
|
28
|
+
e2e = [
|
|
29
|
+
"atomicwrites~=1.4",
|
|
30
|
+
"cachetools~=5.3",
|
|
31
|
+
"peewee~=3.14",
|
|
32
|
+
"vodozemac~=0.9",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
dev = [
|
|
36
|
+
"mindroom-nio[e2e]",
|
|
37
|
+
"aioresponses~=0.7",
|
|
38
|
+
"hpack~=4.0",
|
|
39
|
+
"hyperframe~=6.0",
|
|
40
|
+
"hypothesis~=6.8",
|
|
41
|
+
"faker~=8.0",
|
|
42
|
+
"mypy~=1.11",
|
|
43
|
+
"mypy_extensions~=1.0",
|
|
44
|
+
"pre-commit",
|
|
45
|
+
"pytest~=8.2",
|
|
46
|
+
"pytest-asyncio~=0.24",
|
|
47
|
+
"pytest-aiohttp~=0.3",
|
|
48
|
+
"pytest-benchmark~=4.0",
|
|
49
|
+
"pytest-cov~=2.11",
|
|
50
|
+
"pytest-flake8~=1.2",
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
# Read the docs specific requirements.
|
|
54
|
+
docs = [
|
|
55
|
+
"mindroom-nio[dev]",
|
|
56
|
+
"setuptools>=61.0",
|
|
57
|
+
"sphinx~=7.4",
|
|
58
|
+
"sphinx-autodoc-typehints~=2.1",
|
|
59
|
+
"sphinx_mdinclude>=0.5",
|
|
60
|
+
"sphinx_rtd_theme~=2.0",
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
[project.urls]
|
|
64
|
+
Source = "https://github.com/mindroom-ai/mindroom-nio"
|
|
65
|
+
Documentation = "https://matrix-nio.readthedocs.io/en/latest/"
|
|
66
|
+
|
|
67
|
+
[tool.ruff]
|
|
68
|
+
# Assume Python 3.8 for now to avoid mass errors.
|
|
69
|
+
target-version = "py38"
|
|
70
|
+
|
|
71
|
+
fix = true
|
|
72
|
+
show-fixes = true
|
|
73
|
+
preview = true
|
|
74
|
+
|
|
75
|
+
[tool.ruff.lint]
|
|
76
|
+
select = [
|
|
77
|
+
"E", # pycodestyle
|
|
78
|
+
"F", # Pyflakes
|
|
79
|
+
"I001", # isort
|
|
80
|
+
"UP", # pyupgrade
|
|
81
|
+
"ASYNC", # flake8-async
|
|
82
|
+
"C4", # flake8-comprehensions
|
|
83
|
+
"T10", # flake8-debugger
|
|
84
|
+
"FA", # flake8-future-annotations
|
|
85
|
+
"PT", # flake8-pytest-style
|
|
86
|
+
"RSE", # flake8-raise
|
|
87
|
+
"PERF", # Perflint
|
|
88
|
+
"FURB", # refurb
|
|
89
|
+
]
|
|
90
|
+
ignore = [
|
|
91
|
+
"E501", # https://www.flake8rules.com/rules/E501.html - Let `black` handle this.
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
# Allow autofix for all enabled rules (when `--fix`) is provided.
|
|
95
|
+
fixable = ["ALL"]
|
|
96
|
+
unfixable = []
|
|
97
|
+
|
|
98
|
+
# Exclude a variety of commonly ignored directories.
|
|
99
|
+
exclude = [
|
|
100
|
+
".bzr",
|
|
101
|
+
".direnv",
|
|
102
|
+
".eggs",
|
|
103
|
+
".git",
|
|
104
|
+
".git-rewrite",
|
|
105
|
+
".hg",
|
|
106
|
+
".mypy_cache",
|
|
107
|
+
".nox",
|
|
108
|
+
".pants.d",
|
|
109
|
+
".pytype",
|
|
110
|
+
".ruff_cache",
|
|
111
|
+
".svn",
|
|
112
|
+
".tox",
|
|
113
|
+
".venv",
|
|
114
|
+
"__pypackages__",
|
|
115
|
+
"_build",
|
|
116
|
+
"buck-out",
|
|
117
|
+
"build",
|
|
118
|
+
"dist",
|
|
119
|
+
"node_modules",
|
|
120
|
+
"venv",
|
|
121
|
+
"venv*",
|
|
122
|
+
"tests"
|
|
123
|
+
]
|
|
124
|
+
|
|
125
|
+
[tool.ruff.lint.pyupgrade]
|
|
126
|
+
# Preserve types, even if a file imports `from __future__ import annotations`.
|
|
127
|
+
# Needed for python < 3.10, should be removed afterward.
|
|
128
|
+
keep-runtime-typing = true
|
|
129
|
+
|
|
130
|
+
[tool.ruff.lint.per-file-ignores]
|
|
131
|
+
"__init__.py" = [
|
|
132
|
+
"F401",
|
|
133
|
+
"F403",
|
|
134
|
+
"I001",
|
|
135
|
+
]
|
|
136
|
+
[tool.ruff.lint.flake8-pytest-style]
|
|
137
|
+
fixture-parentheses = false
|
|
138
|
+
|
|
139
|
+
[tool.pytest.ini_options]
|
|
140
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mindroom-nio
|
|
3
|
+
Version: 0.25.2
|
|
4
|
+
Summary: A Python Matrix client library, designed according to sans I/O principles.
|
|
5
|
+
Author-email: Damir Jelić <poljar@termina.org.uk>, Paarth Shah <mail@shahpaarth.com>
|
|
6
|
+
License: Internet Systems Consortium license
|
|
7
|
+
===================================
|
|
8
|
+
|
|
9
|
+
Copyright (c) `2018`, `Damir Jelić <poljar@termina.org.uk>`
|
|
10
|
+
|
|
11
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
12
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
13
|
+
and this permission notice appear in all copies.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
16
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
17
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
18
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
19
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
20
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
21
|
+
THIS SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Project-URL: Source, https://github.com/mindroom-ai/mindroom-nio
|
|
24
|
+
Project-URL: Documentation, https://matrix-nio.readthedocs.io/en/latest/
|
|
25
|
+
Requires-Python: >=3.10.0
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE.md
|
|
28
|
+
Requires-Dist: aiohttp~=3.10
|
|
29
|
+
Requires-Dist: aiofiles~=24.1
|
|
30
|
+
Requires-Dist: h11~=0.14
|
|
31
|
+
Requires-Dist: h2~=4.0
|
|
32
|
+
Requires-Dist: jsonschema~=4.14
|
|
33
|
+
Requires-Dist: unpaddedbase64~=2.1
|
|
34
|
+
Requires-Dist: pycryptodome~=3.10
|
|
35
|
+
Requires-Dist: aiohttp-socks~=0.8
|
|
36
|
+
Provides-Extra: e2e
|
|
37
|
+
Requires-Dist: atomicwrites~=1.4; extra == "e2e"
|
|
38
|
+
Requires-Dist: cachetools~=5.3; extra == "e2e"
|
|
39
|
+
Requires-Dist: peewee~=3.14; extra == "e2e"
|
|
40
|
+
Requires-Dist: vodozemac~=0.9; extra == "e2e"
|
|
41
|
+
Provides-Extra: dev
|
|
42
|
+
Requires-Dist: mindroom-nio[e2e]; extra == "dev"
|
|
43
|
+
Requires-Dist: aioresponses~=0.7; extra == "dev"
|
|
44
|
+
Requires-Dist: hpack~=4.0; extra == "dev"
|
|
45
|
+
Requires-Dist: hyperframe~=6.0; extra == "dev"
|
|
46
|
+
Requires-Dist: hypothesis~=6.8; extra == "dev"
|
|
47
|
+
Requires-Dist: faker~=8.0; extra == "dev"
|
|
48
|
+
Requires-Dist: mypy~=1.11; extra == "dev"
|
|
49
|
+
Requires-Dist: mypy_extensions~=1.0; extra == "dev"
|
|
50
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
51
|
+
Requires-Dist: pytest~=8.2; extra == "dev"
|
|
52
|
+
Requires-Dist: pytest-asyncio~=0.24; extra == "dev"
|
|
53
|
+
Requires-Dist: pytest-aiohttp~=0.3; extra == "dev"
|
|
54
|
+
Requires-Dist: pytest-benchmark~=4.0; extra == "dev"
|
|
55
|
+
Requires-Dist: pytest-cov~=2.11; extra == "dev"
|
|
56
|
+
Requires-Dist: pytest-flake8~=1.2; extra == "dev"
|
|
57
|
+
Provides-Extra: docs
|
|
58
|
+
Requires-Dist: mindroom-nio[dev]; extra == "docs"
|
|
59
|
+
Requires-Dist: setuptools>=61.0; extra == "docs"
|
|
60
|
+
Requires-Dist: sphinx~=7.4; extra == "docs"
|
|
61
|
+
Requires-Dist: sphinx-autodoc-typehints~=2.1; extra == "docs"
|
|
62
|
+
Requires-Dist: sphinx_mdinclude>=0.5; extra == "docs"
|
|
63
|
+
Requires-Dist: sphinx_rtd_theme~=2.0; extra == "docs"
|
|
64
|
+
Dynamic: license-file
|
|
65
|
+
|
|
66
|
+
nio
|
|
67
|
+
===
|
|
68
|
+
|
|
69
|
+
[](https://github.com/matrix-nio/matrix-nio/actions)
|
|
70
|
+
[](https://pypi.org/project/matrix-nio/)
|
|
71
|
+
[](https://codecov.io/gh/matrix-nio/matrix-nio)
|
|
72
|
+
[](https://github.com/matrix-nio/matrix-nio/blob/master/LICENSE.md)
|
|
73
|
+
[](https://matrix-nio.readthedocs.io/en/latest/?badge=latest)
|
|
74
|
+
[](https://matrix.to/#/!JiiOHXrIUCtcOJsZCa:matrix.org?via=matrix.org&via=maunium.net&via=t2l.io)
|
|
75
|
+
|
|
76
|
+
nio is a multilayered [Matrix](https://matrix.org/) client library. The
|
|
77
|
+
underlying base layer doesn't do any network IO on its own, but on top of that
|
|
78
|
+
is a full-fledged batteries-included asyncio layer using
|
|
79
|
+
[aiohttp](https://github.com/aio-libs/aiohttp/). File IO is only done if you
|
|
80
|
+
enable end-to-end encryption (E2EE).
|
|
81
|
+
|
|
82
|
+
Documentation
|
|
83
|
+
-------------
|
|
84
|
+
|
|
85
|
+
The full API documentation for nio can be found at
|
|
86
|
+
[https://matrix-nio.readthedocs.io](https://matrix-nio.readthedocs.io/en/latest/#api-documentation)
|
|
87
|
+
|
|
88
|
+
Features
|
|
89
|
+
--------
|
|
90
|
+
|
|
91
|
+
nio has most of the features you'd expect in a Matrix library, but it's still a work in progress.
|
|
92
|
+
|
|
93
|
+
- ✅ transparent end-to-end encryption (EE2E)
|
|
94
|
+
- ✅ encrypted file uploads & downloads
|
|
95
|
+
- ✅ space parents/children
|
|
96
|
+
- ✅ manual and emoji verification
|
|
97
|
+
- ✅ custom [authentication types](https://matrix.org/docs/spec/client_server/r0.6.0#id183)
|
|
98
|
+
- ✅ threading support
|
|
99
|
+
- ✅ well-integrated type system
|
|
100
|
+
- ✅ knocking, kick, ban and unban
|
|
101
|
+
- ✅ typing notifications
|
|
102
|
+
- ✅ message redaction
|
|
103
|
+
- ✅ token based login
|
|
104
|
+
- ✅ user registration
|
|
105
|
+
- ✅ read receipts
|
|
106
|
+
- ✅ live syncing
|
|
107
|
+
- ✅ `m.reaction`s
|
|
108
|
+
- ✅ `m.tag`s
|
|
109
|
+
- ❌ cross-signing support
|
|
110
|
+
- ❌ server-side key backups (room key backup, "Secure Backup")
|
|
111
|
+
- ❌ user deactivation ([#112](https://github.com/matrix-nio/matrix-nio/issues/112))
|
|
112
|
+
- ❌ in-room emoji verification
|
|
113
|
+
|
|
114
|
+
Installation
|
|
115
|
+
------------
|
|
116
|
+
|
|
117
|
+
To install nio, simply use pip:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
$ pip install matrix-nio
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Note that this installs nio without end-to-end encryption support. For e2ee
|
|
124
|
+
support, python-olm is needed which requires the
|
|
125
|
+
[libolm](https://gitlab.matrix.org/matrix-org/olm) C library (version 3.x).
|
|
126
|
+
On Debian and Ubuntu one can use `apt-get` to install package `libolm-dev`.
|
|
127
|
+
On Fedora one can use `dnf` to install package `libolm-devel`.
|
|
128
|
+
On MacOS one can use [brew](https://brew.sh/) to install package `libolm`.
|
|
129
|
+
Make sure version 3 is installed.
|
|
130
|
+
|
|
131
|
+
After libolm has been installed, the e2ee enabled version of nio can be
|
|
132
|
+
installed using pip:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
$ pip install matrix-nio[e2e]
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Additionally, a docker image with the e2ee enabled version of nio is provided in
|
|
139
|
+
the `docker/` directory.
|
|
140
|
+
|
|
141
|
+
Examples
|
|
142
|
+
--------
|
|
143
|
+
|
|
144
|
+
For examples of how to use nio, and how others are using it,
|
|
145
|
+
[read the docs](https://matrix-nio.readthedocs.io/en/latest/examples.html)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
LICENSE.md
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
Makefile
|
|
4
|
+
README.md
|
|
5
|
+
pyproject.toml
|
|
6
|
+
setup.cfg
|
|
7
|
+
src/mindroom_nio.egg-info/PKG-INFO
|
|
8
|
+
src/mindroom_nio.egg-info/SOURCES.txt
|
|
9
|
+
src/mindroom_nio.egg-info/dependency_links.txt
|
|
10
|
+
src/mindroom_nio.egg-info/requires.txt
|
|
11
|
+
src/mindroom_nio.egg-info/top_level.txt
|
|
12
|
+
src/nio/__init__.py
|
|
13
|
+
src/nio/_compat.py
|
|
14
|
+
src/nio/api.py
|
|
15
|
+
src/nio/exceptions.py
|
|
16
|
+
src/nio/http.py
|
|
17
|
+
src/nio/monitors.py
|
|
18
|
+
src/nio/responses.py
|
|
19
|
+
src/nio/rooms.py
|
|
20
|
+
src/nio/schemas.py
|
|
21
|
+
src/nio/client/__init__.py
|
|
22
|
+
src/nio/client/async_client.py
|
|
23
|
+
src/nio/client/base_client.py
|
|
24
|
+
src/nio/client/http_client.py
|
|
25
|
+
src/nio/crypto/__init__.py
|
|
26
|
+
src/nio/crypto/async_attachments.py
|
|
27
|
+
src/nio/crypto/attachments.py
|
|
28
|
+
src/nio/crypto/device.py
|
|
29
|
+
src/nio/crypto/key_export.py
|
|
30
|
+
src/nio/crypto/key_request.py
|
|
31
|
+
src/nio/crypto/log.py
|
|
32
|
+
src/nio/crypto/memorystores.py
|
|
33
|
+
src/nio/crypto/olm_machine.py
|
|
34
|
+
src/nio/crypto/sas.py
|
|
35
|
+
src/nio/crypto/sessions.py
|
|
36
|
+
src/nio/event_builders/__init__.py
|
|
37
|
+
src/nio/event_builders/direct_messages.py
|
|
38
|
+
src/nio/event_builders/event_builder.py
|
|
39
|
+
src/nio/event_builders/state_events.py
|
|
40
|
+
src/nio/events/__init__.py
|
|
41
|
+
src/nio/events/account_data.py
|
|
42
|
+
src/nio/events/common.py
|
|
43
|
+
src/nio/events/ephemeral.py
|
|
44
|
+
src/nio/events/invite_events.py
|
|
45
|
+
src/nio/events/misc.py
|
|
46
|
+
src/nio/events/presence.py
|
|
47
|
+
src/nio/events/room_events.py
|
|
48
|
+
src/nio/events/to_device.py
|
|
49
|
+
src/nio/store/__init__.py
|
|
50
|
+
src/nio/store/database.py
|
|
51
|
+
src/nio/store/file_trustdb.py
|
|
52
|
+
src/nio/store/log.py
|
|
53
|
+
src/nio/store/models.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
aiohttp~=3.10
|
|
2
|
+
aiofiles~=24.1
|
|
3
|
+
h11~=0.14
|
|
4
|
+
h2~=4.0
|
|
5
|
+
jsonschema~=4.14
|
|
6
|
+
unpaddedbase64~=2.1
|
|
7
|
+
pycryptodome~=3.10
|
|
8
|
+
aiohttp-socks~=0.8
|
|
9
|
+
|
|
10
|
+
[dev]
|
|
11
|
+
mindroom-nio[e2e]
|
|
12
|
+
aioresponses~=0.7
|
|
13
|
+
hpack~=4.0
|
|
14
|
+
hyperframe~=6.0
|
|
15
|
+
hypothesis~=6.8
|
|
16
|
+
faker~=8.0
|
|
17
|
+
mypy~=1.11
|
|
18
|
+
mypy_extensions~=1.0
|
|
19
|
+
pre-commit
|
|
20
|
+
pytest~=8.2
|
|
21
|
+
pytest-asyncio~=0.24
|
|
22
|
+
pytest-aiohttp~=0.3
|
|
23
|
+
pytest-benchmark~=4.0
|
|
24
|
+
pytest-cov~=2.11
|
|
25
|
+
pytest-flake8~=1.2
|
|
26
|
+
|
|
27
|
+
[docs]
|
|
28
|
+
mindroom-nio[dev]
|
|
29
|
+
setuptools>=61.0
|
|
30
|
+
sphinx~=7.4
|
|
31
|
+
sphinx-autodoc-typehints~=2.1
|
|
32
|
+
sphinx_mdinclude>=0.5
|
|
33
|
+
sphinx_rtd_theme~=2.0
|
|
34
|
+
|
|
35
|
+
[e2e]
|
|
36
|
+
atomicwrites~=1.4
|
|
37
|
+
cachetools~=5.3
|
|
38
|
+
peewee~=3.14
|
|
39
|
+
vodozemac~=0.9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nio
|