pixbridge 0.1.0__py3-none-any.whl
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.
- pixbridge/__init__.py +24 -0
- pixbridge/_usage_log.py +14 -0
- pixbridge/cli.py +697 -0
- pixbridge/client.py +420 -0
- pixbridge/config.py +54 -0
- pixbridge/consistency_check.py +153 -0
- pixbridge/integrity_check.py +110 -0
- pixbridge/models.py +34 -0
- pixbridge/providers/__init__.py +103 -0
- pixbridge/providers/base.py +352 -0
- pixbridge/providers/gemini.py +304 -0
- pixbridge/providers/openai.py +584 -0
- pixbridge/providers/vertex.py +47 -0
- pixbridge/providers/xai.py +155 -0
- pixbridge/size_resolver.py +65 -0
- pixbridge-0.1.0.dist-info/METADATA +144 -0
- pixbridge-0.1.0.dist-info/RECORD +21 -0
- pixbridge-0.1.0.dist-info/WHEEL +4 -0
- pixbridge-0.1.0.dist-info/entry_points.txt +2 -0
- pixbridge-0.1.0.dist-info/licenses/LICENSE +202 -0
- pixbridge-0.1.0.dist-info/licenses/NOTICE +10 -0
pixbridge/__init__.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""Multi-provider image generation tool for presentation slides."""
|
|
2
|
+
|
|
3
|
+
from .client import GeminiImageClient, ImageClient
|
|
4
|
+
from .models import GenerationNotes, ImagePrompt, ImagePromptSections
|
|
5
|
+
from .providers import (
|
|
6
|
+
GenerationResult,
|
|
7
|
+
ProviderCapabilities,
|
|
8
|
+
get_provider,
|
|
9
|
+
list_providers,
|
|
10
|
+
)
|
|
11
|
+
from .size_resolver import resolve_size_preset
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"GeminiImageClient", # Backward compatibility
|
|
15
|
+
"GenerationNotes",
|
|
16
|
+
"GenerationResult",
|
|
17
|
+
"ImageClient",
|
|
18
|
+
"ImagePrompt",
|
|
19
|
+
"ImagePromptSections",
|
|
20
|
+
"ProviderCapabilities",
|
|
21
|
+
"get_provider",
|
|
22
|
+
"list_providers",
|
|
23
|
+
"resolve_size_preset",
|
|
24
|
+
]
|
pixbridge/_usage_log.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""JSONL logging for API usage (LLM, image generation, TTS, transcription)."""
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import threading
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
_log_lock = threading.Lock()
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def log_usage(path: Path, entry: dict) -> None:
|
|
11
|
+
"""Append a single usage entry as one JSON line (thread-safe)."""
|
|
12
|
+
line = json.dumps(entry, default=str) + "\n"
|
|
13
|
+
with _log_lock, open(path, "a", encoding="utf-8") as f:
|
|
14
|
+
f.write(line)
|