nextcloud-client 0.211.0__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.
- nextcloud_client-0.211.0/PKG-INFO +102 -0
- nextcloud_client-0.211.0/README.md +73 -0
- nextcloud_client-0.211.0/pyproject.toml +53 -0
- nextcloud_client-0.211.0/pyproject.toml.orig +48 -0
- nextcloud_client-0.211.0/src/nextcloud_client/__init__.py +477 -0
- nextcloud_client-0.211.0/src/nextcloud_client/auth.py +34 -0
- nextcloud_client-0.211.0/src/nextcloud_client/availability.py +290 -0
- nextcloud_client-0.211.0/src/nextcloud_client/base.py +443 -0
- nextcloud_client-0.211.0/src/nextcloud_client/calendar.py +3430 -0
- nextcloud_client-0.211.0/src/nextcloud_client/collectives.py +325 -0
- nextcloud_client-0.211.0/src/nextcloud_client/contacts.py +1321 -0
- nextcloud_client-0.211.0/src/nextcloud_client/cookbook.py +244 -0
- nextcloud_client-0.211.0/src/nextcloud_client/dav_errors.py +187 -0
- nextcloud_client-0.211.0/src/nextcloud_client/dav_urls.py +61 -0
- nextcloud_client-0.211.0/src/nextcloud_client/deck.py +930 -0
- nextcloud_client-0.211.0/src/nextcloud_client/groups.py +164 -0
- nextcloud_client-0.211.0/src/nextcloud_client/http.py +69 -0
- nextcloud_client-0.211.0/src/nextcloud_client/instrumentation.py +50 -0
- nextcloud_client-0.211.0/src/nextcloud_client/mail.py +825 -0
- nextcloud_client-0.211.0/src/nextcloud_client/models/__init__.py +1 -0
- nextcloud_client-0.211.0/src/nextcloud_client/models/deck.py +302 -0
- nextcloud_client-0.211.0/src/nextcloud_client/models/sharing.py +24 -0
- nextcloud_client-0.211.0/src/nextcloud_client/models/talk.py +136 -0
- nextcloud_client-0.211.0/src/nextcloud_client/models/users.py +41 -0
- nextcloud_client-0.211.0/src/nextcloud_client/news.py +394 -0
- nextcloud_client-0.211.0/src/nextcloud_client/notes.py +293 -0
- nextcloud_client-0.211.0/src/nextcloud_client/notes_search.py +113 -0
- nextcloud_client-0.211.0/src/nextcloud_client/ocs.py +140 -0
- nextcloud_client-0.211.0/src/nextcloud_client/py.typed +0 -0
- nextcloud_client-0.211.0/src/nextcloud_client/sharing.py +364 -0
- nextcloud_client-0.211.0/src/nextcloud_client/shopping_list.py +150 -0
- nextcloud_client-0.211.0/src/nextcloud_client/tables.py +146 -0
- nextcloud_client-0.211.0/src/nextcloud_client/talk.py +487 -0
- nextcloud_client-0.211.0/src/nextcloud_client/users.py +239 -0
- nextcloud_client-0.211.0/src/nextcloud_client/webdav.py +3046 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: nextcloud-client
|
|
3
|
+
Version: 0.211.0
|
|
4
|
+
Summary: Async Python clients for the Nextcloud APIs: WebDAV, CalDAV, CardDAV, Notes, Deck, Tables, Talk, Mail and more
|
|
5
|
+
Keywords: nextcloud,webdav,caldav,carddav,deck,async,httpx
|
|
6
|
+
Author: Chris Coutinho
|
|
7
|
+
Author-email: Chris Coutinho <chris@coutinho.io>
|
|
8
|
+
License: AGPL-3.0-only
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Framework :: AnyIO
|
|
16
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
17
|
+
Requires-Dist: httpx2>=2.5.0
|
|
18
|
+
Requires-Dist: anyio>=4.0
|
|
19
|
+
Requires-Dist: pydantic>=2.11.4
|
|
20
|
+
Requires-Dist: lxml>=5.0
|
|
21
|
+
Requires-Dist: caldav>=3.0.1,<4.0
|
|
22
|
+
Requires-Dist: icalendar>=7.3.0,<7.4.0
|
|
23
|
+
Requires-Dist: recurring-ical-events>=3.8.0,<4.0
|
|
24
|
+
Requires-Dist: pythonvcard4>=0.2.0
|
|
25
|
+
Requires-Dist: pillow>=10.3.0
|
|
26
|
+
Requires-Python: >=3.11
|
|
27
|
+
Project-URL: Repository, https://github.com/cbcoutinho/nextcloud-mcp-server
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# nextcloud-client
|
|
31
|
+
|
|
32
|
+
Async Python clients for the Nextcloud APIs, built on `httpx2` and `anyio`. Supported:
|
|
33
|
+
|
|
34
|
+
- **Files (WebDAV):** read, write, search, tags, versions, trash, comments
|
|
35
|
+
- **Calendar and tasks (CalDAV)**
|
|
36
|
+
- **Contacts (CardDAV)**
|
|
37
|
+
- Notes, Deck, Tables, Talk, Mail, News, Collectives, Cookbook, Sharing, Users, Groups and Shopping List
|
|
38
|
+
|
|
39
|
+
They are the clients behind
|
|
40
|
+
[nextcloud-mcp-server](https://github.com/cbcoutinho/nextcloud-mcp-server).
|
|
41
|
+
The clients are released with it and share its version number. Installing them
|
|
42
|
+
does **not** pull in the MCP server's dependencies.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install nextcloud-client
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
import anyio
|
|
52
|
+
from httpx2 import BasicAuth
|
|
53
|
+
|
|
54
|
+
from nextcloud_client import NextcloudClient
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
async def main():
|
|
58
|
+
nc = NextcloudClient(
|
|
59
|
+
"https://cloud.example.com",
|
|
60
|
+
"alice",
|
|
61
|
+
BasicAuth("alice", "app-password"),
|
|
62
|
+
password="app-password", # CalDAV builds its own auth from the raw secret
|
|
63
|
+
)
|
|
64
|
+
async for note in nc.notes.get_all_notes():
|
|
65
|
+
print(note["title"])
|
|
66
|
+
print(await nc.webdav.list_directory("/"))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
anyio.run(main)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
For OAuth, use `NextcloudClient.from_token(base_url, token, username)`.
|
|
73
|
+
|
|
74
|
+
### TLS and connection reuse
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
import ssl
|
|
78
|
+
|
|
79
|
+
NextcloudClient(..., verify=ssl.create_default_context(cafile="ca.pem"))
|
|
80
|
+
NextcloudClient(..., verify=False) # self-signed dev instances only
|
|
81
|
+
NextcloudClient(..., keepalive=False) # fresh connection per request
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Metrics and tracing
|
|
85
|
+
|
|
86
|
+
The clients have no dependency on prometheus or OpenTelemetry. To observe them,
|
|
87
|
+
subclass `nextcloud_client.instrumentation.Instrumentation` and install it:
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
from nextcloud_client import instrumentation
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class Hooks(instrumentation.Instrumentation):
|
|
94
|
+
def on_api_call(self, app, method, status_code, duration): ...
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
instrumentation.hooks = Hooks()
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
AGPL-3.0-only.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# nextcloud-client
|
|
2
|
+
|
|
3
|
+
Async Python clients for the Nextcloud APIs, built on `httpx2` and `anyio`. Supported:
|
|
4
|
+
|
|
5
|
+
- **Files (WebDAV):** read, write, search, tags, versions, trash, comments
|
|
6
|
+
- **Calendar and tasks (CalDAV)**
|
|
7
|
+
- **Contacts (CardDAV)**
|
|
8
|
+
- Notes, Deck, Tables, Talk, Mail, News, Collectives, Cookbook, Sharing, Users, Groups and Shopping List
|
|
9
|
+
|
|
10
|
+
They are the clients behind
|
|
11
|
+
[nextcloud-mcp-server](https://github.com/cbcoutinho/nextcloud-mcp-server).
|
|
12
|
+
The clients are released with it and share its version number. Installing them
|
|
13
|
+
does **not** pull in the MCP server's dependencies.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install nextcloud-client
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
import anyio
|
|
23
|
+
from httpx2 import BasicAuth
|
|
24
|
+
|
|
25
|
+
from nextcloud_client import NextcloudClient
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
async def main():
|
|
29
|
+
nc = NextcloudClient(
|
|
30
|
+
"https://cloud.example.com",
|
|
31
|
+
"alice",
|
|
32
|
+
BasicAuth("alice", "app-password"),
|
|
33
|
+
password="app-password", # CalDAV builds its own auth from the raw secret
|
|
34
|
+
)
|
|
35
|
+
async for note in nc.notes.get_all_notes():
|
|
36
|
+
print(note["title"])
|
|
37
|
+
print(await nc.webdav.list_directory("/"))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
anyio.run(main)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
For OAuth, use `NextcloudClient.from_token(base_url, token, username)`.
|
|
44
|
+
|
|
45
|
+
### TLS and connection reuse
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
import ssl
|
|
49
|
+
|
|
50
|
+
NextcloudClient(..., verify=ssl.create_default_context(cafile="ca.pem"))
|
|
51
|
+
NextcloudClient(..., verify=False) # self-signed dev instances only
|
|
52
|
+
NextcloudClient(..., keepalive=False) # fresh connection per request
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Metrics and tracing
|
|
56
|
+
|
|
57
|
+
The clients have no dependency on prometheus or OpenTelemetry. To observe them,
|
|
58
|
+
subclass `nextcloud_client.instrumentation.Instrumentation` and install it:
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
from nextcloud_client import instrumentation
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class Hooks(instrumentation.Instrumentation):
|
|
65
|
+
def on_api_call(self, app, method, status_code, duration): ...
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
instrumentation.hooks = Hooks()
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
AGPL-3.0-only.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "nextcloud-client"
|
|
3
|
+
version = "0.211.0"
|
|
4
|
+
description = "Async Python clients for the Nextcloud APIs: WebDAV, CalDAV, CardDAV, Notes, Deck, Tables, Talk, Mail and more"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.11"
|
|
7
|
+
keywords = [
|
|
8
|
+
"nextcloud",
|
|
9
|
+
"webdav",
|
|
10
|
+
"caldav",
|
|
11
|
+
"carddav",
|
|
12
|
+
"deck",
|
|
13
|
+
"async",
|
|
14
|
+
"httpx",
|
|
15
|
+
]
|
|
16
|
+
dependencies = [
|
|
17
|
+
"httpx2>=2.5.0",
|
|
18
|
+
"anyio>=4.0",
|
|
19
|
+
"pydantic>=2.11.4",
|
|
20
|
+
"lxml>=5.0",
|
|
21
|
+
"caldav>=3.0.1,<4.0",
|
|
22
|
+
"icalendar (>=7.3.0,<7.4.0)",
|
|
23
|
+
"recurring-ical-events>=3.8.0,<4.0",
|
|
24
|
+
"pythonvcard4>=0.2.0",
|
|
25
|
+
"pillow>=10.3.0",
|
|
26
|
+
]
|
|
27
|
+
classifiers = [
|
|
28
|
+
"Development Status :: 4 - Beta",
|
|
29
|
+
"Intended Audience :: Developers",
|
|
30
|
+
"License :: OSI Approved :: GNU Affero General Public License v3",
|
|
31
|
+
"Programming Language :: Python :: 3",
|
|
32
|
+
"Programming Language :: Python :: 3.11",
|
|
33
|
+
"Programming Language :: Python :: 3.12",
|
|
34
|
+
"Framework :: AnyIO",
|
|
35
|
+
"Topic :: Internet :: WWW/HTTP",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[[project.authors]]
|
|
39
|
+
name = "Chris Coutinho"
|
|
40
|
+
email = "chris@coutinho.io"
|
|
41
|
+
|
|
42
|
+
[project.license]
|
|
43
|
+
text = "AGPL-3.0-only"
|
|
44
|
+
|
|
45
|
+
[project.urls]
|
|
46
|
+
Repository = "https://github.com/cbcoutinho/nextcloud-mcp-server"
|
|
47
|
+
|
|
48
|
+
[tool.deptry.per_rule_ignores]
|
|
49
|
+
DEP002 = ["pillow"]
|
|
50
|
+
|
|
51
|
+
[build-system]
|
|
52
|
+
requires = ["uv_build>=0.13.3,<0.14.0"]
|
|
53
|
+
build-backend = "uv_build"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "nextcloud-client"
|
|
3
|
+
# Released in lockstep with nextcloud-mcp-server: commitizen bumps this line
|
|
4
|
+
# (version_files in the root pyproject.toml), never edit it by hand.
|
|
5
|
+
version = "0.211.0"
|
|
6
|
+
description = "Async Python clients for the Nextcloud APIs: WebDAV, CalDAV, CardDAV, Notes, Deck, Tables, Talk, Mail and more"
|
|
7
|
+
authors = [
|
|
8
|
+
{name = "Chris Coutinho", email = "chris@coutinho.io"}
|
|
9
|
+
]
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = {text = "AGPL-3.0-only"}
|
|
12
|
+
requires-python = ">=3.11"
|
|
13
|
+
keywords = ["nextcloud", "webdav", "caldav", "carddav", "deck", "async", "httpx"]
|
|
14
|
+
dependencies = [
|
|
15
|
+
"httpx2>=2.5.0",
|
|
16
|
+
"anyio>=4.0",
|
|
17
|
+
"pydantic>=2.11.4",
|
|
18
|
+
"lxml>=5.0", # calendar.py CalDAV XML parsing
|
|
19
|
+
"caldav>=3.0.1,<4.0",
|
|
20
|
+
"icalendar (>=7.3.0,<7.4.0)",
|
|
21
|
+
"recurring-ical-events>=3.8.0,<4.0", # Client-side recurrence expansion (preserves TZID/floating semantics)
|
|
22
|
+
"pythonvcard4>=0.2.0", # contacts.py _parse_vcard works around sharf-shawon/pythonvCard4#2 (GH #1551)
|
|
23
|
+
# pythonvcard4 imports PIL at module level. No upper bound here: the server
|
|
24
|
+
# caps it (<12) for its fastembed extra, which a library user need not inherit.
|
|
25
|
+
"pillow>=10.3.0",
|
|
26
|
+
]
|
|
27
|
+
classifiers = [
|
|
28
|
+
"Development Status :: 4 - Beta",
|
|
29
|
+
"Intended Audience :: Developers",
|
|
30
|
+
"License :: OSI Approved :: GNU Affero General Public License v3",
|
|
31
|
+
"Programming Language :: Python :: 3",
|
|
32
|
+
"Programming Language :: Python :: 3.11",
|
|
33
|
+
"Programming Language :: Python :: 3.12",
|
|
34
|
+
"Framework :: AnyIO",
|
|
35
|
+
"Topic :: Internet :: WWW/HTTP",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.urls]
|
|
39
|
+
Repository = "https://github.com/cbcoutinho/nextcloud-mcp-server"
|
|
40
|
+
|
|
41
|
+
[tool.deptry.per_rule_ignores]
|
|
42
|
+
# Declared for pythonvcard4, which imports PIL at module level without
|
|
43
|
+
# depending on it; nothing here imports it directly.
|
|
44
|
+
DEP002 = ["pillow"]
|
|
45
|
+
|
|
46
|
+
[build-system]
|
|
47
|
+
requires = ["uv_build>=0.13.3,<0.14.0"]
|
|
48
|
+
build-backend = "uv_build"
|