DNotifier Python SDK
DNotifier is a real-time notification and messaging SDK for Python 3.9+. It supports WebSocket and HTTP transports, binary streaming, framed packets, an AI pipeline, knowledge-base (RAG) APIs, optional session logging, and multi-step workflows with agents and observability.
Features
- WebSocket and HTTP transport
- Secure authentication handshake
- Real-time messaging (text and binary)
- Large payloads with automatic chunking and reassembly
- AI:
send_ai,fetch_ai_history, semanticsearch - Knowledge base: add, update, get, list, delete, and search documents
- Chat history fetch and delete
- Optional SDK session logging (
logs=True) - Workflows: named agents, sequential pipelines, dashboard observability
- Plan limits from auth (
get_plan_limits)
Installation
pip install dnotifier
Quick start
import asyncio
from dnotifier import DNotifier
async def main():
notifier = DNotifier(
app_id="your-app-id",
secret="your-app-secret",
transport="ws", # or "http"
user_id="user-123",
on_connected=lambda: print("Connected"),
on_message=lambda msg: print(msg.payload.to_json()),
on_disconnected=lambda **kw: print("Disconnected", kw),
)
await notifier.connect()
await notifier.send(
sender_id="user-123",
receiver_id="user-456",
data={"type": "text", "text": "Hello from DNotifier"},
)
await notifier.disconnect()
asyncio.run(main())
Connection options
| Parameter | Type | Description |
|---|---|---|
app_id |
str |
Your DNotifier application id |
secret |
str |
Application secret |
transport |
"ws" | "http" |
WebSocket for realtime; HTTP for RPC-style AI/RAG |
user_id |
str |
End-user or agent id for auth and routing |
logs |
bool |
Enable SDK session logging (default False) |
url |
str |
WebSocket URL override (default production wss://api.dnotifier.com/ecs/ws) |
on_connected |
callable |
Called after successful connect |
on_message |
callable |
Called for each incoming message |
on_disconnected |
callable |
Called on disconnect (code, reason) |
API overview
| Method | Description |
|---|---|
connect() |
Authenticate and open transport |
disconnect() |
Close WebSocket connection |
send(...) |
Send realtime message |
send_binary(...) |
Send binary payload (WebSocket) |
send_ai(...) |
Send to AI pipeline |
fetch_ai_history(...) |
Fetch AI conversation history |
delete_ai_history_message(...) |
Delete one AI history entry |
fetch_chat_history(...) |
Request chat history |
delete_chat_history_message(...) |
Delete one chat message |
search(...) |
Semantic / vector search |
add_document(...) |
Add RAG document |
update_document(...) |
Update RAG document |
delete_document(...) |
Delete RAG document |
list_documents(...) |
List RAG documents |
get_document(...) |
Get RAG document + chunks |
get_plan_limits() |
Plan limits from last auth |
run_workflow(...) |
Run a registered workflow |
Workflows
from dnotifier import DNotifier, Workflow, define_agent
researcher = define_agent(
name="researcher",
run=lambda ctx: ctx.send_ai(message=ctx.input, label="Research"),
)
workflow = Workflow(
name="qa-pipeline",
observability=True,
entry=lambda ctx: ctx.run_agent("researcher"),
)
workflow.register_agent("researcher", researcher)
async def main():
notifier = DNotifier(...)
await notifier.connect()
result = await notifier.run_workflow(workflow=workflow, input_data="What is RAG?")
print(result)
License
Proprietary — see LICENSE.
Metadata
Release files for dnotifier 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dnotifier-1.0.4.tar.gz | 30.5 kB | Without provenance | Details for dnotifier-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dnotifier-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for dnotifier-1.0.4-py3-none-any.whl |
Total release size: 76.5 kB
Release files / dnotifier-1.0.4.tar.gz
| Download URL | dnotifier-1.0.4.tar.gz |
|---|---|
| Size | 30.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e669b3b05ec8a6d9f56961b804c0cac400cddf67d1bb5b7932d8586f3f15fba6
|
|
BLAKE2b-256 checksum How to use checksums |
dd989e72e1eb57bd5e6930827f7bdd4296db750c888696ba491202832ad33df5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / dnotifier-1.0.4-py3-none-any.whl
| Download URL | dnotifier-1.0.4-py3-none-any.whl |
|---|---|
| Size | 46.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e075c5cc80f51c4d94a1cbc89f7e8c75797360383b1c043d1385e438c36ec14
|
|
BLAKE2b-256 checksum How to use checksums |
cb93e2a050a61687effa4f684ca6198589e09c5a4ab8be2f52fe0a540b62661b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for dnotifier 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.