Metadata-Version: 2.4
Name: nextcloud-talk-core
Version: 1.0.1
Summary: Reusable, MCP-free OCS client for the Nextcloud Talk (Spreed) API
Author: Patrick Leiverkus
License-Expression: MIT
Project-URL: Homepage, https://github.com/leiverkus/nextcloud-talk-mcp
Project-URL: Repository, https://github.com/leiverkus/nextcloud-talk-mcp
Keywords: nextcloud,talk,spreed,ocs,client
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Chat
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.27
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-cov>=5.0; extra == "dev"
Requires-Dist: ruff>=0.9; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Dynamic: license-file

# nextcloud-talk-core

A reusable, **MCP-free** Python client for the Nextcloud Talk (Spreed) OCS API.

This is the shared core extracted from
[`nextcloud-talk-mcp`](../nextcloud-talk-mcp): the HTTP/OCS layer, typed models,
config, and errors, with no dependency on any MCP framework — so other projects
(e.g. a polling bridge) can depend on it directly.

## Install

```bash
pip install nextcloud-talk-core
```

Or pin to a Git tag without PyPI:

```bash
pip install "git+https://github.com/leiverkus/nextcloud-talk-mcp.git@core-v1.0.1#subdirectory=packages/nextcloud-talk-core"
```

## Use

```python
from nextcloud_talk_core import TalkClient

# Reads NC_URL / NC_USER / NC_APP_PASSWORD (use an app password, not your login).
with TalkClient.from_env() as talk:
    for c in talk.list_conversations():
        print(c.token, c.name, c.unread)

    msg = talk.send_message("<token>", "Hello from nextcloud-talk-core")
    print(msg.id)
```

## Public API

`TalkClient` (one method per Talk operation, returning typed models),
`OCSClient` (low-level OCS HTTP), `Settings`, the models (`Conversation`,
`Message`, `Attachment`, `Participant`, `Mention`, `Reaction`), the error
hierarchy (`NextcloudTalkError` and subclasses), and `permissions_from_flags`.
All re-exported from the package root.

This surface is a **SemVer-stable contract**: breaking changes require a major
version (and a new `core-vX.Y.Z` tag). See [CHANGELOG.md](CHANGELOG.md).

## License

[MIT](LICENSE) © Patrick Leiverkus
