pixeloffice-router 1.0.0__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.
Potentially problematic release.
This version of pixeloffice-router might be problematic. Click here for more details.
- pixeloffice-router-1.0.0/PKG-INFO +74 -0
- pixeloffice-router-1.0.0/README.md +57 -0
- pixeloffice-router-1.0.0/pixeloffice_router/__init__.py +52 -0
- pixeloffice-router-1.0.0/pixeloffice_router/cli.py +14 -0
- pixeloffice-router-1.0.0/pixeloffice_router.egg-info/PKG-INFO +74 -0
- pixeloffice-router-1.0.0/pixeloffice_router.egg-info/SOURCES.txt +10 -0
- pixeloffice-router-1.0.0/pixeloffice_router.egg-info/dependency_links.txt +1 -0
- pixeloffice-router-1.0.0/pixeloffice_router.egg-info/entry_points.txt +3 -0
- pixeloffice-router-1.0.0/pixeloffice_router.egg-info/requires.txt +1 -0
- pixeloffice-router-1.0.0/pixeloffice_router.egg-info/top_level.txt +1 -0
- pixeloffice-router-1.0.0/setup.cfg +4 -0
- pixeloffice-router-1.0.0/setup.py +29 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pixeloffice-router
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Drop-in OpenAI compatible gateway SDK with sub-35ms AEO Fact Anchors & BLUN SmartRouter Engine.
|
|
5
|
+
Home-page: https://pixeloffice.eu/developer
|
|
6
|
+
Author: Pixel Office & Pixel Ventures
|
|
7
|
+
Author-email: support@pixeloffice.eu
|
|
8
|
+
License: UNKNOWN
|
|
9
|
+
Description: # pixeloffice-router
|
|
10
|
+
|
|
11
|
+
> **PixelRouter & BLUN SmartRouter Python SDK**: Sub-35ms OpenAI-compatible API gateway with live AEO Fact Anchors, zero brand hallucinations, and 85%+ cost savings across DeepSeek V3, Qwen Thinking 27B, and Gemini 2.5 Pro.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## š¦ Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install pixeloffice-router
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## š Quickstart (Drop-in for `openai` Python SDK)
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
from openai import OpenAI
|
|
27
|
+
|
|
28
|
+
# Simply point base_url to PixelRouter:
|
|
29
|
+
client = OpenAI(
|
|
30
|
+
base_url="https://api.pixeloffice.eu/v1",
|
|
31
|
+
api_key="px_live_your_key" # or px_test_free
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
response = client.chat.completions.create(
|
|
35
|
+
model="blun-auto", # Auto-routes to DeepSeek, Qwen Thinking, or Gemini Pro
|
|
36
|
+
messages=[
|
|
37
|
+
{"role": "user", "content": "Analyze compliance and security"}
|
|
38
|
+
]
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
print(response.choices[0].message.content)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## š Native Python SDK Usage
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from pixeloffice_router import PixelRouter
|
|
50
|
+
|
|
51
|
+
router = PixelRouter(api_key="px_live_your_key")
|
|
52
|
+
|
|
53
|
+
res = router.chat_completion([
|
|
54
|
+
{"role": "user", "content": "Generate clean Python FastAPI endpoint"}
|
|
55
|
+
])
|
|
56
|
+
|
|
57
|
+
print(res["choices"][0]["message"]["content"])
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## š Links & Documentation
|
|
63
|
+
- **Developer Portal:** [https://pixeloffice.eu/developer](https://pixeloffice.eu/developer)
|
|
64
|
+
- **Dashboard:** [https://pixeloffice.eu/dashboard.html](https://pixeloffice.eu/dashboard.html)
|
|
65
|
+
- **License:** MIT
|
|
66
|
+
|
|
67
|
+
Platform: UNKNOWN
|
|
68
|
+
Classifier: Programming Language :: Python :: 3
|
|
69
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
70
|
+
Classifier: Operating System :: OS Independent
|
|
71
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
72
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
73
|
+
Requires-Python: >=3.8
|
|
74
|
+
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# pixeloffice-router
|
|
2
|
+
|
|
3
|
+
> **PixelRouter & BLUN SmartRouter Python SDK**: Sub-35ms OpenAI-compatible API gateway with live AEO Fact Anchors, zero brand hallucinations, and 85%+ cost savings across DeepSeek V3, Qwen Thinking 27B, and Gemini 2.5 Pro.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## š¦ Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install pixeloffice-router
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## š Quickstart (Drop-in for `openai` Python SDK)
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
from openai import OpenAI
|
|
19
|
+
|
|
20
|
+
# Simply point base_url to PixelRouter:
|
|
21
|
+
client = OpenAI(
|
|
22
|
+
base_url="https://api.pixeloffice.eu/v1",
|
|
23
|
+
api_key="px_live_your_key" # or px_test_free
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
response = client.chat.completions.create(
|
|
27
|
+
model="blun-auto", # Auto-routes to DeepSeek, Qwen Thinking, or Gemini Pro
|
|
28
|
+
messages=[
|
|
29
|
+
{"role": "user", "content": "Analyze compliance and security"}
|
|
30
|
+
]
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
print(response.choices[0].message.content)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## š Native Python SDK Usage
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
from pixeloffice_router import PixelRouter
|
|
42
|
+
|
|
43
|
+
router = PixelRouter(api_key="px_live_your_key")
|
|
44
|
+
|
|
45
|
+
res = router.chat_completion([
|
|
46
|
+
{"role": "user", "content": "Generate clean Python FastAPI endpoint"}
|
|
47
|
+
])
|
|
48
|
+
|
|
49
|
+
print(res["choices"][0]["message"]["content"])
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## š Links & Documentation
|
|
55
|
+
- **Developer Portal:** [https://pixeloffice.eu/developer](https://pixeloffice.eu/developer)
|
|
56
|
+
- **Dashboard:** [https://pixeloffice.eu/dashboard.html](https://pixeloffice.eu/dashboard.html)
|
|
57
|
+
- **License:** MIT
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""
|
|
2
|
+
pixeloffice-router ā Official Python SDK for PixelRouter & BLUN SmartRouter
|
|
3
|
+
Sub-35ms OpenAI-compatible gateway with live AEO Fact Anchors & 85%+ cost savings.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
import json
|
|
8
|
+
import requests
|
|
9
|
+
from typing import List, Dict, Any, Optional
|
|
10
|
+
|
|
11
|
+
DEFAULT_BASE_URL = "https://api.pixeloffice.eu/v1"
|
|
12
|
+
|
|
13
|
+
class PixelRouter:
|
|
14
|
+
def __init__(self, api_key: Optional[str] = None, base_url: Optional[str] = None, default_model: str = "blun-auto"):
|
|
15
|
+
self.api_key = api_key or os.getenv("PIXEL_API_KEY", "px_test_free")
|
|
16
|
+
self.base_url = (base_url or os.getenv("OPENAI_BASE_URL", DEFAULT_BASE_URL)).rstrip("/")
|
|
17
|
+
self.default_model = default_model
|
|
18
|
+
|
|
19
|
+
def chat_completion(self, messages: List[Dict[str, str]], model: Optional[str] = None, temperature: float = 0.7, max_tokens: Optional[int] = None) -> Dict[str, Any]:
|
|
20
|
+
"""
|
|
21
|
+
OpenAI-compatible chat completion
|
|
22
|
+
"""
|
|
23
|
+
payload = {
|
|
24
|
+
"model": model or self.default_model,
|
|
25
|
+
"messages": messages,
|
|
26
|
+
"temperature": temperature
|
|
27
|
+
}
|
|
28
|
+
if max_tokens:
|
|
29
|
+
payload["max_tokens"] = max_tokens
|
|
30
|
+
|
|
31
|
+
headers = {
|
|
32
|
+
"Content-Type": "application/json",
|
|
33
|
+
"Authorization": f"Bearer {self.api_key}",
|
|
34
|
+
"X-Title": "PixelRouter-PythonSDK"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
res = requests.post(f"{self.base_url}/chat/completions", json=payload, headers=headers, timeout=30)
|
|
38
|
+
res.raise_for_status()
|
|
39
|
+
return res.json()
|
|
40
|
+
|
|
41
|
+
def list_models(self) -> Dict[str, Any]:
|
|
42
|
+
"""
|
|
43
|
+
List available models in PixelRouter
|
|
44
|
+
"""
|
|
45
|
+
headers = {"Authorization": f"Bearer {self.api_key}"}
|
|
46
|
+
res = requests.get(f"{self.base_url}/models", headers=headers, timeout=10)
|
|
47
|
+
res.raise_for_status()
|
|
48
|
+
return res.json()
|
|
49
|
+
|
|
50
|
+
blun = PixelRouter()
|
|
51
|
+
|
|
52
|
+
__all__ = ["PixelRouter", "blun", "DEFAULT_BASE_URL"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
|
|
3
|
+
def main():
|
|
4
|
+
print("\nš [PixelRouter] Python CLI Initialized")
|
|
5
|
+
print("š” Gateway Endpoint: https://api.pixeloffice.eu/v1")
|
|
6
|
+
print("š§ Engine: BLUN Intelligence Engine (model: blun-auto)")
|
|
7
|
+
print("\nš” Usage with OpenAI Python SDK:")
|
|
8
|
+
print(" from openai import OpenAI")
|
|
9
|
+
print(" client = OpenAI(base_url='https://api.pixeloffice.eu/v1', api_key='px_live_key')")
|
|
10
|
+
print(" res = client.chat.completions.create(model='blun-auto', messages=[{'role': 'user', 'content': 'Hello'}])")
|
|
11
|
+
print("\n⨠Manage API keys at: https://pixeloffice.eu/dashboard.html\n")
|
|
12
|
+
|
|
13
|
+
if __name__ == "__main__":
|
|
14
|
+
main()
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pixeloffice-router
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Drop-in OpenAI compatible gateway SDK with sub-35ms AEO Fact Anchors & BLUN SmartRouter Engine.
|
|
5
|
+
Home-page: https://pixeloffice.eu/developer
|
|
6
|
+
Author: Pixel Office & Pixel Ventures
|
|
7
|
+
Author-email: support@pixeloffice.eu
|
|
8
|
+
License: UNKNOWN
|
|
9
|
+
Description: # pixeloffice-router
|
|
10
|
+
|
|
11
|
+
> **PixelRouter & BLUN SmartRouter Python SDK**: Sub-35ms OpenAI-compatible API gateway with live AEO Fact Anchors, zero brand hallucinations, and 85%+ cost savings across DeepSeek V3, Qwen Thinking 27B, and Gemini 2.5 Pro.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## š¦ Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install pixeloffice-router
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## š Quickstart (Drop-in for `openai` Python SDK)
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
from openai import OpenAI
|
|
27
|
+
|
|
28
|
+
# Simply point base_url to PixelRouter:
|
|
29
|
+
client = OpenAI(
|
|
30
|
+
base_url="https://api.pixeloffice.eu/v1",
|
|
31
|
+
api_key="px_live_your_key" # or px_test_free
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
response = client.chat.completions.create(
|
|
35
|
+
model="blun-auto", # Auto-routes to DeepSeek, Qwen Thinking, or Gemini Pro
|
|
36
|
+
messages=[
|
|
37
|
+
{"role": "user", "content": "Analyze compliance and security"}
|
|
38
|
+
]
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
print(response.choices[0].message.content)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## š Native Python SDK Usage
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from pixeloffice_router import PixelRouter
|
|
50
|
+
|
|
51
|
+
router = PixelRouter(api_key="px_live_your_key")
|
|
52
|
+
|
|
53
|
+
res = router.chat_completion([
|
|
54
|
+
{"role": "user", "content": "Generate clean Python FastAPI endpoint"}
|
|
55
|
+
])
|
|
56
|
+
|
|
57
|
+
print(res["choices"][0]["message"]["content"])
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## š Links & Documentation
|
|
63
|
+
- **Developer Portal:** [https://pixeloffice.eu/developer](https://pixeloffice.eu/developer)
|
|
64
|
+
- **Dashboard:** [https://pixeloffice.eu/dashboard.html](https://pixeloffice.eu/dashboard.html)
|
|
65
|
+
- **License:** MIT
|
|
66
|
+
|
|
67
|
+
Platform: UNKNOWN
|
|
68
|
+
Classifier: Programming Language :: Python :: 3
|
|
69
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
70
|
+
Classifier: Operating System :: OS Independent
|
|
71
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
72
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
73
|
+
Requires-Python: >=3.8
|
|
74
|
+
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
setup.py
|
|
3
|
+
pixeloffice_router/__init__.py
|
|
4
|
+
pixeloffice_router/cli.py
|
|
5
|
+
pixeloffice_router.egg-info/PKG-INFO
|
|
6
|
+
pixeloffice_router.egg-info/SOURCES.txt
|
|
7
|
+
pixeloffice_router.egg-info/dependency_links.txt
|
|
8
|
+
pixeloffice_router.egg-info/entry_points.txt
|
|
9
|
+
pixeloffice_router.egg-info/requires.txt
|
|
10
|
+
pixeloffice_router.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
requests>=2.25.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pixeloffice_router
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name="pixeloffice-router",
|
|
5
|
+
version="1.0.0",
|
|
6
|
+
description="Drop-in OpenAI compatible gateway SDK with sub-35ms AEO Fact Anchors & BLUN SmartRouter Engine.",
|
|
7
|
+
long_description=open("README.md", "r", encoding="utf-8").read(),
|
|
8
|
+
long_description_content_type="text/markdown",
|
|
9
|
+
author="Pixel Office & Pixel Ventures",
|
|
10
|
+
author_email="support@pixeloffice.eu",
|
|
11
|
+
url="https://pixeloffice.eu/developer",
|
|
12
|
+
packages=find_packages(),
|
|
13
|
+
install_requires=[
|
|
14
|
+
"requests>=2.25.0",
|
|
15
|
+
],
|
|
16
|
+
entry_points={
|
|
17
|
+
"console_scripts": [
|
|
18
|
+
"pixeloffice-router=pixeloffice_router.cli:main",
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
classifiers=[
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"License :: OSI Approved :: MIT License",
|
|
24
|
+
"Operating System :: OS Independent",
|
|
25
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
26
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
27
|
+
],
|
|
28
|
+
python_requires=">=3.8",
|
|
29
|
+
)
|