Skip to main content

navo-sdk

Navo IM 的 Python 客户端 SDK。

本仓库是 NavoIM 即时通讯平台的官方 Python SDK,用于通过 HTTP / WebSocket 与 Navo IM 服务端交互,支持登录、消息收发、会话管理、好友与频道等功能。

安装

pip install navo-sdk

或从源码安装:

git clone https://github.com/nichengfuben/navo-sdk.git
cd navo-sdk
pip install -e .

快速开始

from navo import Navo

# 同步登录(默认连接 https://navo.airoe.cn)
im = Navo().login("username", "password")

# 获取会话列表
conversations = im.get_conversations()
print(conversations)

异步用法:

import asyncio
from navo import Navo

async def main():
    im = Navo()
    await im.alogin("username", "password")
    conversations = await im.aget_conversations()
    print(conversations)
    await im.aclose()

asyncio.run(main())

连接自建 Navo IM 实例时,可指定服务端地址:

im = Navo(base_url="https://your-server.example.com", ws_url="wss://your-server.example.com/ws")

要求

  • Python >= 3.10

许可证

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

navo_sdk-2.1.2.tar.gz (37.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

navo_sdk-2.1.2-py3-none-any.whl (43.5 kB view details)

Uploaded Python 3

Release history Release notifications | RSS feed

This release

2.1.2 This release

2 files

2.1.1

2 files

2.1.0

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

2.0.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page