shadowob-sdk 0.2.3__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.
- shadowob_sdk-0.2.3/.gitignore +49 -0
- shadowob_sdk-0.2.3/PKG-INFO +48 -0
- shadowob_sdk-0.2.3/README.md +35 -0
- shadowob_sdk-0.2.3/pyproject.toml +21 -0
- shadowob_sdk-0.2.3/shadowob_sdk/__init__.py +4 -0
- shadowob_sdk-0.2.3/shadowob_sdk/client.py +888 -0
- shadowob_sdk-0.2.3/shadowob_sdk/socket.py +142 -0
- shadowob_sdk-0.2.3/shadowob_sdk/types.py +167 -0
- shadowob_sdk-0.2.3/tests/__init__.py +0 -0
- shadowob_sdk-0.2.3/tests/test_client.py +33 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
|
|
4
|
+
# Build outputs
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.output/
|
|
8
|
+
|
|
9
|
+
# Environment variables
|
|
10
|
+
.env
|
|
11
|
+
.env.local
|
|
12
|
+
.env.*.local
|
|
13
|
+
|
|
14
|
+
# IDE
|
|
15
|
+
.vscode/
|
|
16
|
+
!.vscode/settings.json
|
|
17
|
+
!.vscode/extensions.json
|
|
18
|
+
.idea/
|
|
19
|
+
*.swp
|
|
20
|
+
*.swo
|
|
21
|
+
|
|
22
|
+
# OS
|
|
23
|
+
.DS_Store
|
|
24
|
+
Thumbs.db
|
|
25
|
+
|
|
26
|
+
# Test coverage
|
|
27
|
+
coverage/
|
|
28
|
+
|
|
29
|
+
# Drizzle
|
|
30
|
+
drizzle/meta/
|
|
31
|
+
|
|
32
|
+
# Logs
|
|
33
|
+
*.log
|
|
34
|
+
npm-debug.log*
|
|
35
|
+
pnpm-debug.log*
|
|
36
|
+
|
|
37
|
+
# Docker
|
|
38
|
+
docker/data/
|
|
39
|
+
|
|
40
|
+
# MinIO
|
|
41
|
+
.minio/
|
|
42
|
+
|
|
43
|
+
# Misc
|
|
44
|
+
*.tsbuildinfo
|
|
45
|
+
|
|
46
|
+
.research
|
|
47
|
+
|
|
48
|
+
# Expo
|
|
49
|
+
.expo/
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: shadowob-sdk
|
|
3
|
+
Version: 0.2.3
|
|
4
|
+
Summary: Shadow SDK — Python client for Shadow server REST API and Socket.IO real-time events
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Requires-Dist: httpx<1,>=0.27
|
|
8
|
+
Requires-Dist: python-socketio[client]<6,>=5.11
|
|
9
|
+
Provides-Extra: dev
|
|
10
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
11
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# Shadow Python SDK
|
|
15
|
+
|
|
16
|
+
Python client for the Shadow server REST API and Socket.IO real-time events.
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pip install shadowob-sdk
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
from shadowob_sdk import ShadowClient, ShadowSocket
|
|
28
|
+
|
|
29
|
+
# REST API
|
|
30
|
+
client = ShadowClient("https://shadowob.com", token="your-jwt-token")
|
|
31
|
+
me = client.get_me()
|
|
32
|
+
print(f"Logged in as {me['username']}")
|
|
33
|
+
|
|
34
|
+
# Send a message
|
|
35
|
+
msg = client.send_message("channel-id", "Hello from Python!")
|
|
36
|
+
print(f"Sent message: {msg['id']}")
|
|
37
|
+
|
|
38
|
+
# Real-time events
|
|
39
|
+
socket = ShadowSocket("https://shadowob.com", token="your-jwt-token")
|
|
40
|
+
socket.on("message:new", lambda msg: print(f"New message: {msg['content']}"))
|
|
41
|
+
socket.connect()
|
|
42
|
+
socket.join_channel("channel-id")
|
|
43
|
+
socket.wait() # Block until disconnected
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## API Reference
|
|
47
|
+
|
|
48
|
+
See the [full documentation](https://shadow-docs.example.com) for complete API reference.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Shadow Python SDK
|
|
2
|
+
|
|
3
|
+
Python client for the Shadow server REST API and Socket.IO real-time events.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install shadowob-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from shadowob_sdk import ShadowClient, ShadowSocket
|
|
15
|
+
|
|
16
|
+
# REST API
|
|
17
|
+
client = ShadowClient("https://shadowob.com", token="your-jwt-token")
|
|
18
|
+
me = client.get_me()
|
|
19
|
+
print(f"Logged in as {me['username']}")
|
|
20
|
+
|
|
21
|
+
# Send a message
|
|
22
|
+
msg = client.send_message("channel-id", "Hello from Python!")
|
|
23
|
+
print(f"Sent message: {msg['id']}")
|
|
24
|
+
|
|
25
|
+
# Real-time events
|
|
26
|
+
socket = ShadowSocket("https://shadowob.com", token="your-jwt-token")
|
|
27
|
+
socket.on("message:new", lambda msg: print(f"New message: {msg['content']}"))
|
|
28
|
+
socket.connect()
|
|
29
|
+
socket.join_channel("channel-id")
|
|
30
|
+
socket.wait() # Block until disconnected
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## API Reference
|
|
34
|
+
|
|
35
|
+
See the [full documentation](https://shadow-docs.example.com) for complete API reference.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "shadowob-sdk"
|
|
7
|
+
version = "0.2.3"
|
|
8
|
+
description = "Shadow SDK — Python client for Shadow server REST API and Socket.IO real-time events"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
dependencies = [
|
|
13
|
+
"httpx>=0.27,<1",
|
|
14
|
+
"python-socketio[client]>=5.11,<6",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
[project.optional-dependencies]
|
|
18
|
+
dev = [
|
|
19
|
+
"pytest>=8",
|
|
20
|
+
"pytest-asyncio>=0.24",
|
|
21
|
+
]
|