kalibr 1.0.24__py3-none-any.whl → 1.0.26__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.
kalibr/__init__.py CHANGED
@@ -1 +1,5 @@
1
- __version__ = "1.0.24"
1
+ from .kalibr_app import KalibrApp
2
+ from .kalibr import Kalibr
3
+
4
+ __all__ = ["Kalibr", "KalibrApp"]
5
+ __version__ = "1.0.26"
@@ -0,0 +1,176 @@
1
+ Metadata-Version: 2.4
2
+ Name: kalibr
3
+ Version: 1.0.26
4
+ Summary: Multi-Model MCP SDK — deploy to GPT, Claude, Gemini, Copilot from one codebase.
5
+ Home-page: https://github.com/devonakelley/kalibr-sdk
6
+ Author: Kalibr Team
7
+ Author-email: team@kalibr.dev
8
+ Requires-Python: >=3.11
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Requires-Dist: fastapi>=0.110.1
12
+ Requires-Dist: uvicorn>=0.25.0
13
+ Requires-Dist: typer>=0.9.0
14
+ Requires-Dist: pydantic>=2.6.4
15
+ Requires-Dist: requests>=2.31.0
16
+ Requires-Dist: aiofiles>=23.2.1
17
+ Requires-Dist: jsonschema>=4.21.1
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: home-page
21
+ Dynamic: license-file
22
+ Dynamic: requires-python
23
+
24
+ # Kalibr SDK v1.0.26
25
+ ### Multi-Model AI Integration Framework
26
+
27
+ **Write once. Deploy anywhere. Connect to any AI model.**
28
+
29
+ Kalibr turns your Python functions into APIs that automatically work with **GPT Actions**, **Claude MCP**, **Gemini Extensions**, and **Copilot Plugins** — all from one codebase.
30
+ It’s the unified SDK layer for building, packaging, and deploying AI-ready endpoints.
31
+
32
+ ---
33
+
34
+ ## 🧠 Core Purpose
35
+
36
+ Kalibr is a **multi-model integration SDK** that converts simple Python functions into fully MCP-compatible APIs for every major AI model ecosystem.
37
+
38
+ > One function → Four schemas → Deploy anywhere.
39
+
40
+ ---
41
+
42
+ ## ⚙️ What It Does
43
+
44
+ ### 1. Unified Schema Generation
45
+
46
+ Kalibr automatically generates and serves schemas for:
47
+ - `/openapi.json` → GPT Actions
48
+ - `/mcp.json` → Claude MCP
49
+ - `/schemas/gemini` → Gemini Extensions
50
+ - `/schemas/copilot` → Copilot Plugins
51
+ - `/models/supported` → List of supported integrations
52
+
53
+ No manual YAML or JSON schema creation needed.
54
+
55
+ ---
56
+
57
+ ### 2. Environment-Aware Base URLs
58
+
59
+ Kalibr auto-detects where it's running and sets the correct base URL automatically:
60
+
61
+ | Environment | Example Base URL |
62
+ |--------------|------------------|
63
+ | Local | `http://localhost:8000` |
64
+ | Fly.io | `https://<app>.fly.dev` |
65
+ | Render | `https://<app>.onrender.com` |
66
+ | Custom | Set via `KALIBR_BASE_URL` |
67
+
68
+ ---
69
+
70
+ ### 3. Deployment & Runtime Abstraction
71
+
72
+ Kalibr provides a single CLI entrypoint for local and hosted runtime deployment:
73
+
74
+ ```bash
75
+ kalibr serve my_app.py
76
+ kalibr deploy my_app.py --runtime fly|render|local
77
+ kalibr version
78
+ ```
79
+
80
+ Each runtime automatically generates valid schema URLs and deployment bundles (`Dockerfile`, `fly.toml`, etc).
81
+
82
+ ---
83
+
84
+ ### 4. Two Development Modes
85
+
86
+ #### Simple Mode (Function-Level)
87
+ For lightweight APIs and test integrations.
88
+
89
+ ```python
90
+ from kalibr import Kalibr
91
+
92
+ app = Kalibr(title="Weather API")
93
+
94
+ @app.action("get_weather", "Fetch weather data")
95
+ def get_weather(city: str):
96
+ return {"city": city, "temp": 72, "condition": "sunny"}
97
+ ```
98
+
99
+ #### Advanced Mode (Full App)
100
+
101
+ ```python
102
+ from kalibr import KalibrApp
103
+ from kalibr.types import FileUpload, Session
104
+
105
+ app = KalibrApp(title="Document API")
106
+
107
+ @app.file_handler("analyze_doc", [".pdf", ".docx"])
108
+ async def analyze_doc(file: FileUpload):
109
+ return {"filename": file.filename, "result": "parsed"}
110
+
111
+ @app.session_action("save_data")
112
+ async def save_data(session: Session, data: dict):
113
+ session.set("data", data)
114
+ return {"saved": True}
115
+ ```
116
+
117
+ Includes:
118
+ - Async/await support
119
+ - File uploads
120
+ - Session persistence
121
+ - Streaming responses
122
+ - Workflow scaffolding
123
+
124
+ ---
125
+
126
+ ### 5. Built-in Routes
127
+
128
+ | Endpoint | Purpose |
129
+ |-----------|----------|
130
+ | `/health` | Health + version check |
131
+ | `/docs` | Swagger UI |
132
+ | `/models/supported` | Shows model compatibility |
133
+ | `/openapi.json`, `/mcp.json`, etc. | Model schemas |
134
+
135
+ ---
136
+
137
+ ### 6. CLI Reference
138
+
139
+ ```
140
+ kalibr serve my_app.py # Run locally
141
+ kalibr deploy my_app.py # Deploy to Fly/Render
142
+ kalibr examples # Copy examples
143
+ kalibr version # Show SDK version
144
+ ```
145
+
146
+ ---
147
+
148
+ ### 7. Value Proposition
149
+
150
+ For developers or MCP infrastructure projects (e.g. Emergent):
151
+
152
+ - **Instant MCP onboarding** — one file → all model schemas
153
+ - **Zero config** — no schema or deployment setup required
154
+ - **Multi-runtime support** — local, Fly, Render, or custom hosts
155
+ - **Unified interface layer** — consistent schema output for all AI platforms
156
+
157
+ ---
158
+
159
+ ### 8. Upcoming Additions
160
+
161
+ - Observability + tracing hooks
162
+ - Usage metering and billing
163
+ - Schema diffing / auto-validation
164
+ - Multi-runtime load routing
165
+
166
+ ---
167
+
168
+ ### License
169
+
170
+ MIT License © 2025 Kalibr Team
171
+ GitHub: [https://github.com/devonakelley/kalibr-sdk](https://github.com/devonakelley/kalibr-sdk)
172
+
173
+ ---
174
+
175
+ **Kalibr SDK** — the unified layer between AI models and the real world.
176
+ Write once. Deploy anywhere. Integrate everything.
@@ -1,4 +1,4 @@
1
- kalibr/__init__.py,sha256=rnKYfyIc2hXBxsPKz6c7OchEPYsBq3xHKgj-1s8ShT8,23
1
+ kalibr/__init__.py,sha256=ho27It_rTdaObXXm0C4BswKheCuwHPOoJ03Q4lY4k1g,119
2
2
  kalibr/__main__.py,sha256=nRQLefjyoy9c_-UKU1UZGcCRrypQWchJAbUlmNFPv2g,8353
3
3
  kalibr/deployment.py,sha256=GZ874FXQX1uIroTA-UM5A-pTVn2UY0NxXi39vmTowyI,1396
4
4
  kalibr/kalibr.py,sha256=yrgXVlTgadBbpnX_l7fAxxjxGp9oxcZhzGjaQPiIcpo,10469
@@ -8,12 +8,12 @@ kalibr/runtime_router.py,sha256=PTXMj5yt72cfzYtjWQ-mUF3t8eov9nuXXI0ScIVNMrU,4606
8
8
  kalibr/schema_generators.py,sha256=xxnY05KgHTJ7BPXMCIC-McJCCt8aIOF5s0ptCwDqs_Y,6716
9
9
  kalibr/types.py,sha256=bNmf_cOWXBmhaMVAPEp3_EdRCcdXY2pbOgOxZ1dZ0Mc,3476
10
10
  kalibr/validator.py,sha256=PezDmHG9dVINce91rdYQstJC41eZP21qEA3VDICE3C4,2333
11
- kalibr-1.0.24.data/data/examples/README.md,sha256=loo2nm6yfT-pqGb5uNg1VeEdOKflYzHISUHTuSltfY0,4875
12
- kalibr-1.0.24.data/data/examples/basic_kalibr_example.py,sha256=Kfrh-XZuJ0vwFLB_xBpdqpgpMJw2NpIx0yBsqrAqBnE,2188
13
- kalibr-1.0.24.data/data/examples/enhanced_kalibr_example.py,sha256=AuhTpyRUNVAJuZKRy9iydXusNkBgQ84eKNiXxsr4iUQ,11994
14
- kalibr-1.0.24.dist-info/licenses/LICENSE,sha256=1WLJDkrueNpHCROy9zANrK2Ar2weqZ_z88hw90UKDoc,451
15
- kalibr-1.0.24.dist-info/METADATA,sha256=aOYaifRrS0cdDX-ZxmzK6tbepqclKAx1qx2oP009cRM,5424
16
- kalibr-1.0.24.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
- kalibr-1.0.24.dist-info/entry_points.txt,sha256=KiJfV_BaeYdIdYniww3wnSBBqSHpRxP9BTLNwu7IjyY,48
18
- kalibr-1.0.24.dist-info/top_level.txt,sha256=OkloC5_IfpE4-QwI30aLIYbFZk_-ChABWF7aBGddy28,7
19
- kalibr-1.0.24.dist-info/RECORD,,
11
+ kalibr-1.0.26.data/data/examples/README.md,sha256=loo2nm6yfT-pqGb5uNg1VeEdOKflYzHISUHTuSltfY0,4875
12
+ kalibr-1.0.26.data/data/examples/basic_kalibr_example.py,sha256=Kfrh-XZuJ0vwFLB_xBpdqpgpMJw2NpIx0yBsqrAqBnE,2188
13
+ kalibr-1.0.26.data/data/examples/enhanced_kalibr_example.py,sha256=AuhTpyRUNVAJuZKRy9iydXusNkBgQ84eKNiXxsr4iUQ,11994
14
+ kalibr-1.0.26.dist-info/licenses/LICENSE,sha256=1WLJDkrueNpHCROy9zANrK2Ar2weqZ_z88hw90UKDoc,451
15
+ kalibr-1.0.26.dist-info/METADATA,sha256=c7Q1uF9Dgwb15g_7xTJ_WfHpCy6u1JcQtFBj_Nz472k,4556
16
+ kalibr-1.0.26.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
+ kalibr-1.0.26.dist-info/entry_points.txt,sha256=KiJfV_BaeYdIdYniww3wnSBBqSHpRxP9BTLNwu7IjyY,48
18
+ kalibr-1.0.26.dist-info/top_level.txt,sha256=OkloC5_IfpE4-QwI30aLIYbFZk_-ChABWF7aBGddy28,7
19
+ kalibr-1.0.26.dist-info/RECORD,,
@@ -1,231 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: kalibr
3
- Version: 1.0.24
4
- Summary: Multi-Model MCP SDK — deploy to GPT, Claude, Gemini, Copilot from one codebase.
5
- Home-page: https://github.com/devonakelley/kalibr-sdk
6
- Author: Kalibr Team
7
- Author-email: team@kalibr.dev
8
- Requires-Python: >=3.11
9
- Description-Content-Type: text/markdown
10
- License-File: LICENSE
11
- Requires-Dist: fastapi>=0.110.1
12
- Requires-Dist: uvicorn>=0.25.0
13
- Requires-Dist: typer>=0.9.0
14
- Requires-Dist: pydantic>=2.6.4
15
- Requires-Dist: requests>=2.31.0
16
- Requires-Dist: aiofiles>=23.2.1
17
- Requires-Dist: jsonschema>=4.21.1
18
- Dynamic: author
19
- Dynamic: author-email
20
- Dynamic: home-page
21
- Dynamic: license-file
22
- Dynamic: requires-python
23
-
24
- # Kalibr SDK
25
- ### Multi-Model AI Integration Framework
26
-
27
- **Write once. Deploy anywhere. Connect to any AI model.**
28
-
29
- Kalibr turns Python functions into APIs that work seamlessly with GPT, Claude, Gemini, and Copilot — automatically generating model-specific schemas and endpoints.
30
-
31
- ---
32
-
33
- ## 🚀 Quick Start (2 minutes)
34
-
35
- ### 1. Install
36
- ```bash
37
- pip install kalibr
38
- ```
39
-
40
- ### 2. Get Examples
41
- ```bash
42
- kalibr-connect examples
43
- ```
44
- This copies example files to `./kalibr_examples/` in your current directory.
45
-
46
- ### 3. Run Demo
47
- ```bash
48
- kalibr-connect serve kalibr_examples/basic_kalibr_example.py
49
- ```
50
-
51
- ### 4. See All Schemas
52
- Kalibr now **auto-detects your environment** and generates the correct base URLs.
53
-
54
- | Environment | Example Base URL |
55
- |--------------|------------------|
56
- | Local Dev | `http://localhost:8000` |
57
- | Fly.io | `https://<app-name>.fly.dev` |
58
- | Custom Host | Use `KALIBR_BASE_URL` env var |
59
-
60
- Then open:
61
- ```
62
- <your-base-url>/gpt-actions.json # ChatGPT
63
- <your-base-url>/mcp.json # Claude
64
- <your-base-url>/schemas/gemini # Gemini
65
- <your-base-url>/schemas/copilot # Copilot
66
- ```
67
-
68
- ---
69
-
70
- ## 🧠 What Kalibr Does
71
-
72
- Kalibr turns your Python functions into production-ready multi-model APIs.
73
-
74
- ```python
75
- from kalibr import Kalibr
76
-
77
- app = Kalibr(title="Inventory API")
78
-
79
- @app.action("get_inventory", "Fetch inventory data")
80
- def get_inventory(product_id: str):
81
- return {"product_id": product_id, "stock": 42}
82
- ```
83
-
84
- Result:
85
- ChatGPT, Claude, Gemini, and Copilot can all call `get_inventory()` using their native protocols — no schema work required.
86
-
87
- ---
88
-
89
- ## 💪 Two Modes
90
-
91
- ### **Function-Level (Simple)**
92
- Ideal for one-off APIs or scripts.
93
-
94
- ```python
95
- from kalibr import Kalibr
96
-
97
- app = Kalibr(title="My API")
98
-
99
- @app.action("calculate_price", "Calculate price total")
100
- def calculate_price(product_id: str, quantity: int):
101
- return {"total": quantity * 19.99}
102
- ```
103
-
104
- ### **App-Level (Advanced)**
105
- Use `KalibrApp` for complete control — file uploads, sessions, streaming, and workflows.
106
-
107
- ```python
108
- from kalibr import KalibrApp
109
- from kalibr.types import FileUpload, Session
110
-
111
- app = KalibrApp(title="Advanced API")
112
-
113
- @app.file_handler("analyze_doc", [".pdf", ".docx"])
114
- async def analyze_doc(file: FileUpload):
115
- return {"filename": file.filename, "analysis": "..."}
116
-
117
- @app.session_action("save_data", "Save session data")
118
- async def save_data(session: Session, data: dict):
119
- session.set("my_data", data)
120
- return {"saved": True}
121
- ```
122
-
123
- ---
124
-
125
- ## 📚 Examples Included
126
-
127
- After running `kalibr-connect examples`, you’ll get:
128
-
129
- - `basic_kalibr_example.py` – simple function-level demo
130
- - `enhanced_kalibr_example.py` – full app with sessions, uploads, and streaming
131
-
132
- ---
133
-
134
- ## 🤖 AI Platform Integration
135
-
136
- ### ChatGPT (GPT Actions)
137
- 1. Copy schema URL:
138
- `https://<your-domain>/gpt-actions.json`
139
- 2. In GPT Builder → *Actions* → *Import from URL*
140
- 3. Done — ChatGPT can call your endpoints.
141
-
142
- ### Claude (MCP)
143
- Add to Claude Desktop config:
144
- ```json
145
- {
146
- "mcp": {
147
- "servers": {
148
- "my-api": {
149
- "url": "https://<your-domain>/mcp.json"
150
- }
151
- }
152
- }
153
- }
154
- ```
155
-
156
- ### Gemini / Copilot
157
- Use:
158
- ```
159
- https://<your-domain>/schemas/gemini
160
- https://<your-domain>/schemas/copilot
161
- ```
162
-
163
- ---
164
-
165
- ## 🎯 Common Use Cases
166
-
167
- - **Customer Service APIs** — let AI handle orders or refunds
168
- - **Data Analysis** — query your analytics through AI
169
- - **Document Processing** — parse or summarize uploaded docs
170
- - **Business Automation** — trigger internal workflows
171
- - **Internal Tools** — expose secure internal logic to assistants
172
-
173
- ---
174
-
175
- ## 🔧 CLI Reference
176
-
177
- ```bash
178
- kalibr-connect examples # Copy examples
179
- kalibr-connect serve my_app.py # Run locally
180
- kalibr-connect version # Show version
181
- kalibr-connect --help # Full CLI
182
- ```
183
-
184
- ---
185
-
186
- ## ⚡ Key Features
187
-
188
- ✅ Multi-Model Support — GPT, Claude, Gemini, Copilot
189
- ✅ Automatic Schema Generation
190
- ✅ Environment-Aware Base URLs (v1.0.21+)
191
- ✅ File Uploads
192
- ✅ Session Management
193
- ✅ Streaming Responses
194
- ✅ Workflow Support
195
- ✅ Type-Safe API Generation
196
- ✅ Async / Await Ready
197
-
198
- ---
199
-
200
- ## 🔥 Why Kalibr?
201
-
202
- Without Kalibr:
203
- - Learn 4 model specs
204
- - Maintain 4 codebases
205
- - Duplicate effort
206
-
207
- With Kalibr:
208
- - One Python function
209
- - Four schemas generated automatically
210
- - Deploy anywhere
211
-
212
- ---
213
-
214
- ## 🆕 Version 1.0.21+
215
-
216
- - **Automatic Base-URL Detection**
217
- - Works with `KALIBR_BASE_URL` or `FLY_APP_NAME`
218
- - Fixes all localhost references in deployed schemas
219
- - Ready for **MCP ecosystem production use**
220
- - Drop-in backwards compatibility
221
-
222
- ---
223
-
224
- ## 🧩 License
225
-
226
- MIT License — see `LICENSE` file for details.
227
-
228
- ---
229
-
230
- **Kalibr SDK — the unified layer between AI models and the real world.**
231
- Write once. Deploy anywhere. Integrate everything.