Metadata-Version: 2.4
Name: nexacon-sdk
Version: 1.1.1
Summary: Nexacon Python SDK - External Integration with nx_token Authentication
Home-page: https://github.com/nexacon/nexacon-python-sdk
Author: Nexacon
Author-email: support@nexacon.tech
License: MIT
Project-URL: Bug Reports, https://github.com/nexacon/nexacon-python-sdk/issues
Project-URL: Source, https://github.com/nexacon/nexacon-python-sdk
Project-URL: Documentation, https://nexacon-python-sdk.readthedocs.io/
Keywords: nexacon sdk api messaging calls devices rooms presence
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Nexacon Python SDK

Python SDK for Nexacon API - Auto Token Generation with nx_token Authentication

## Installation

```bash
pip install nexacon-sdk
```

## Quick Start

Initialize client with API keys and username. The SDK automatically generates the nx_token when needed:

```python
from nexacon import NexaconClient

# Initialize client with API keys and username
client = NexaconClient(
    api_key="your_api_key",
    secret_key="your_secret_key",
    username="+255788811191",  # Phone number or email - used for auto token generation
    base_url="https://nxservice.quantumvision-tech.com/api/v1.0"
)

# Send message - token is auto-generated automatically
client.messaging.send(to="+255788811191", message="Hello!")

# Initiate call
call_url = client.calls.initiate_call(
    to="+255788811191",
    call_type="video",
    room="my-room"
)

# Register device for push notifications
client.devices.register(
    fcm_token="device_fcm_token",
    platform="android"
)

# Manage rooms (group chats)
rooms = client.rooms.list()
new_room = client.rooms.create(title="My Group", description="Group chat")
client.rooms.add_member(new_room["name"], nxid="user_nxid")

# Check user presence
presence = client.presence.get(user="user_nxid")
```

**No need to call auth separately** - the SDK handles token generation automatically on first API call!

## Documentation

Full documentation is available at https://nexacon-python-sdk.readthedocs.io/

## Features

- **External Authentication**: nx_token-based authentication (no username/password)
- **Messaging**: Send/receive messages, manage contacts
- **Calls**: Initiate audio/video calls, group calls
- **Devices**: Register devices for push notifications
- **Rooms**: Create and manage group chat rooms
- **Presence**: Check user online status

## License

MIT License - see LICENSE file for details.
