kalibr 1.0.18__tar.gz → 1.0.21__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.
Files changed (29) hide show
  1. kalibr-1.0.21/PKG-INFO +302 -0
  2. kalibr-1.0.21/README.md +253 -0
  3. kalibr-1.0.21/examples/README.md +173 -0
  4. kalibr-1.0.21/examples/__init__.py +1 -0
  5. kalibr-1.0.21/kalibr/__init__.py +7 -0
  6. {kalibr-1.0.18 → kalibr-1.0.21}/kalibr/__main__.py +63 -6
  7. {kalibr-1.0.18 → kalibr-1.0.21}/kalibr/kalibr.py +53 -43
  8. kalibr-1.0.21/kalibr/kalibr_app.py +322 -0
  9. kalibr-1.0.21/kalibr.egg-info/PKG-INFO +302 -0
  10. {kalibr-1.0.18 → kalibr-1.0.21}/kalibr.egg-info/SOURCES.txt +2 -0
  11. {kalibr-1.0.18 → kalibr-1.0.21}/pyproject.toml +1 -1
  12. {kalibr-1.0.18 → kalibr-1.0.21}/setup.py +4 -1
  13. kalibr-1.0.18/PKG-INFO +0 -94
  14. kalibr-1.0.18/README.md +0 -45
  15. kalibr-1.0.18/kalibr/__init__.py +0 -8
  16. kalibr-1.0.18/kalibr/kalibr_app.py +0 -68
  17. kalibr-1.0.18/kalibr.egg-info/PKG-INFO +0 -94
  18. {kalibr-1.0.18 → kalibr-1.0.21}/LICENSE +0 -0
  19. {kalibr-1.0.18 → kalibr-1.0.21}/MANIFEST.in +0 -0
  20. {kalibr-1.0.18 → kalibr-1.0.21}/examples/basic_kalibr_example.py +0 -0
  21. {kalibr-1.0.18 → kalibr-1.0.21}/examples/enhanced_kalibr_example.py +0 -0
  22. {kalibr-1.0.18 → kalibr-1.0.21}/kalibr/deployment.py +0 -0
  23. {kalibr-1.0.18 → kalibr-1.0.21}/kalibr/schema_generators.py +0 -0
  24. {kalibr-1.0.18 → kalibr-1.0.21}/kalibr/types.py +0 -0
  25. {kalibr-1.0.18 → kalibr-1.0.21}/kalibr.egg-info/dependency_links.txt +0 -0
  26. {kalibr-1.0.18 → kalibr-1.0.21}/kalibr.egg-info/entry_points.txt +0 -0
  27. {kalibr-1.0.18 → kalibr-1.0.21}/kalibr.egg-info/requires.txt +0 -0
  28. {kalibr-1.0.18 → kalibr-1.0.21}/kalibr.egg-info/top_level.txt +0 -0
  29. {kalibr-1.0.18 → kalibr-1.0.21}/setup.cfg +0 -0
kalibr-1.0.21/PKG-INFO ADDED
@@ -0,0 +1,302 @@
1
+ Metadata-Version: 2.4
2
+ Name: kalibr
3
+ Version: 1.0.21
4
+ Summary: Multi-Model AI Integration Framework
5
+ Home-page: https://github.com/devonakelley/kalibr-sdk
6
+ Author: Kalibr Team
7
+ Author-email: Kalibr Team <team@kalibr.dev>
8
+ License: MIT
9
+ Project-URL: Homepage, https://kalibr.dev
10
+ Project-URL: Documentation, https://kalibr.dev/docs
11
+ Project-URL: Repository, https://github.com/devonakelley/kalibr-sdk
12
+ Project-URL: Bug Reports, https://github.com/devonakelley/kalibr-sdk/issues
13
+ Keywords: ai,api,framework,gpt,claude,gemini,copilot,multi-model,sdk
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
23
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
+ Requires-Python: >=3.11
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: fastapi>=0.110.1
28
+ Requires-Dist: uvicorn>=0.25.0
29
+ Requires-Dist: pydantic>=2.6.4
30
+ Requires-Dist: typer>=0.9.0
31
+ Requires-Dist: requests>=2.31.0
32
+ Requires-Dist: python-jose[cryptography]>=3.3.0
33
+ Requires-Dist: passlib[bcrypt]>=1.7.4
34
+ Requires-Dist: python-multipart>=0.0.9
35
+ Requires-Dist: motor>=3.3.1
36
+ Requires-Dist: pymongo>=4.5.0
37
+ Requires-Dist: boto3>=1.34.129
38
+ Requires-Dist: aiofiles>=23.2.1
39
+ Provides-Extra: dev
40
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
41
+ Requires-Dist: black>=24.1.1; extra == "dev"
42
+ Requires-Dist: isort>=5.13.2; extra == "dev"
43
+ Requires-Dist: flake8>=7.0.0; extra == "dev"
44
+ Requires-Dist: mypy>=1.8.0; extra == "dev"
45
+ Dynamic: author
46
+ Dynamic: home-page
47
+ Dynamic: license-file
48
+ Dynamic: requires-python
49
+
50
+ # Kalibr SDK
51
+
52
+ **Multi-Model AI Integration Framework**
53
+
54
+ Write once. Deploy anywhere. Connect to any AI model.
55
+
56
+ Kalibr lets you expose Python functions as APIs that work with **GPT, Claude, Gemini, and Copilot** automatically.
57
+
58
+ [![PyPI version](https://badge.fury.io/py/kalibr.svg)](https://badge.fury.io/py/kalibr)
59
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
60
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
61
+
62
+ ---
63
+
64
+ ## 🚀 Quick Start (2 minutes)
65
+
66
+ ### 1. Install
67
+ ```bash
68
+ pip install kalibr
69
+ ```
70
+
71
+ ### 2. Get Examples
72
+ ```bash
73
+ kalibr-connect examples
74
+ ```
75
+
76
+ This copies example files to `./kalibr_examples/` in your current directory.
77
+
78
+ ### 3. Run Demo
79
+ ```bash
80
+ kalibr-connect serve kalibr_examples/basic_kalibr_example.py
81
+ ```
82
+
83
+ ### 4. See Multi-Model Schemas
84
+
85
+ Open your browser to see all 4 AI model schemas auto-generated:
86
+
87
+ ```
88
+ http://localhost:8000/ # API info
89
+ http://localhost:8000/gpt-actions.json # For ChatGPT
90
+ http://localhost:8000/mcp.json # For Claude
91
+ http://localhost:8000/schemas/gemini # For Gemini
92
+ http://localhost:8000/schemas/copilot # For Copilot
93
+ http://localhost:8000/docs # Interactive docs
94
+ ```
95
+
96
+ **That's it!** One Python file, four AI platform schemas. 🎯
97
+
98
+ ---
99
+
100
+ ## 🎯 What Does This Do?
101
+
102
+ Kalibr turns your Python functions into APIs that AI assistants can call:
103
+
104
+ ```python
105
+ from kalibr import Kalibr
106
+
107
+ app = Kalibr(title="My Business API")
108
+
109
+ @app.action("get_inventory", "Check product stock")
110
+ def get_inventory(product_id: str):
111
+ # Your business logic
112
+ return {"product_id": product_id, "stock": 42}
113
+ ```
114
+
115
+ **Result:** ChatGPT, Claude, Gemini, and Copilot can all call your `get_inventory` function!
116
+
117
+ ---
118
+
119
+ ## 💪 Two Modes
120
+
121
+ ### Function-Level (Simple)
122
+ Perfect for exposing business logic:
123
+
124
+ ```python
125
+ from kalibr import Kalibr
126
+
127
+ app = Kalibr(title="My API")
128
+
129
+ @app.action("calculate_price", "Calculate product price")
130
+ def calculate_price(product_id: str, quantity: int):
131
+ return {"total": quantity * get_price(product_id)}
132
+ ```
133
+
134
+ ### App-Level (Advanced)
135
+ Full framework with file uploads, sessions, streaming, workflows:
136
+
137
+ ```python
138
+ from kalibr import KalibrApp
139
+ from kalibr.types import FileUpload, Session
140
+
141
+ app = KalibrApp(title="Advanced API")
142
+
143
+ @app.file_handler("analyze_doc", [".pdf", ".docx"])
144
+ async def analyze_doc(file: FileUpload):
145
+ return {"filename": file.filename, "analysis": "..."}
146
+
147
+ @app.session_action("save_data", "Save to session")
148
+ async def save_data(session: Session, data: dict):
149
+ session.set("my_data", data)
150
+ return {"saved": True}
151
+
152
+ @app.stream_action("live_feed", "Stream real-time data")
153
+ async def live_feed(count: int = 10):
154
+ for i in range(count):
155
+ yield {"item": i, "timestamp": "..."}
156
+ ```
157
+
158
+ ---
159
+
160
+ ## 📚 Examples Included
161
+
162
+ After running `kalibr-connect examples`, you get:
163
+
164
+ - **`basic_kalibr_example.py`** - Simple function-level example
165
+ - **`enhanced_kalibr_example.py`** - Advanced app-level example with all features
166
+
167
+ ---
168
+
169
+ ## 🤖 AI Platform Integration
170
+
171
+ Once your Kalibr app is running, integrate with AI platforms:
172
+
173
+ ### ChatGPT (GPT Actions)
174
+ 1. Copy schema from `http://localhost:8000/gpt-actions.json`
175
+ 2. Go to GPT Builder → Actions → Import from URL
176
+ 3. Done! ChatGPT can now call your functions
177
+
178
+ ### Claude (MCP)
179
+ 1. Add to Claude Desktop config:
180
+ ```json
181
+ {
182
+ "mcp": {
183
+ "servers": {
184
+ "my-api": {
185
+ "url": "http://localhost:8000/mcp.json"
186
+ }
187
+ }
188
+ }
189
+ }
190
+ ```
191
+ 2. Done! Claude can now call your functions
192
+
193
+ ### Gemini & Copilot
194
+ Similar simple setup using their respective schema endpoints.
195
+
196
+ ---
197
+
198
+ ## 🎯 Use Cases
199
+
200
+ - **Customer Service APIs** - Let AI assistants look up orders, process refunds
201
+ - **Data Analysis APIs** - Let AI query your analytics and generate insights
202
+ - **Document Processing** - Let AI analyze uploaded documents
203
+ - **Business Automation** - Let AI trigger workflows in your systems
204
+ - **Internal Tools** - Give your team AI-powered access to internal systems
205
+
206
+ ---
207
+
208
+ ## 📖 Documentation
209
+
210
+ - **Quick Start**: You're reading it!
211
+ - **Full Docs**: See `KALIBR_SDK_COMPLETE.md` in the package
212
+ - **Examples**: Run `kalibr-connect examples`
213
+ - **CLI Help**: `kalibr-connect --help`
214
+
215
+ ---
216
+
217
+ ## 🔧 CLI Commands
218
+
219
+ ```bash
220
+ kalibr-connect examples # Copy example files to current dir
221
+ kalibr-connect serve my_app.py # Run your app locally
222
+ kalibr-connect version # Show version info
223
+ kalibr-connect --help # Show all commands
224
+ ```
225
+
226
+ ---
227
+
228
+ ## ⚡ Key Features
229
+
230
+ - ✅ **Multi-Model Support** - Works with GPT, Claude, Gemini, Copilot
231
+ - ✅ **Automatic Schemas** - No manual schema writing
232
+ - ✅ **File Uploads** - Handle document uploads
233
+ - ✅ **Sessions** - Stateful conversations
234
+ - ✅ **Streaming** - Real-time data streaming
235
+ - ✅ **Workflows** - Multi-step processes
236
+ - ✅ **Type Safe** - Full Python type hints
237
+ - ✅ **Fast** - Async/await support
238
+
239
+ ---
240
+
241
+ ## 🔥 Why Kalibr?
242
+
243
+ **Without Kalibr:**
244
+ - Learn 4 different API specs
245
+ - Write 4 different schemas
246
+ - Maintain 4 codebases
247
+ - = Weeks of work
248
+
249
+ **With Kalibr:**
250
+ - Write Python functions once
251
+ - Kalibr generates all 4 schemas
252
+ - Single codebase
253
+ - = One day of work
254
+
255
+ ---
256
+
257
+ ## 💡 Simple Example
258
+
259
+ ```python
260
+ # my_app.py
261
+ from kalibr import Kalibr
262
+
263
+ app = Kalibr(title="Weather API")
264
+
265
+ @app.action("get_weather", "Get current weather")
266
+ def get_weather(city: str):
267
+ # Your logic here
268
+ return {"city": city, "temp": 72, "condition": "sunny"}
269
+ ```
270
+
271
+ ```bash
272
+ # Run it
273
+ kalibr-connect serve my_app.py
274
+
275
+ # Now ALL these work:
276
+ # ✅ ChatGPT can call get_weather()
277
+ # ✅ Claude can call get_weather()
278
+ # ✅ Gemini can call get_weather()
279
+ # ✅ Copilot can call get_weather()
280
+ ```
281
+
282
+ ---
283
+
284
+ ## 🚀 Get Started Now
285
+
286
+ ```bash
287
+ pip install kalibr
288
+ kalibr-connect examples
289
+ kalibr-connect serve kalibr_examples/basic_kalibr_example.py
290
+ ```
291
+
292
+ Open http://localhost:8000 and see your multi-model API in action! 🎯
293
+
294
+ ---
295
+
296
+ ## 📝 License
297
+
298
+ MIT License - see LICENSE file for details.
299
+
300
+ ---
301
+
302
+ **Kalibr SDK** - Transform how you build AI-integrated applications! 🚀
@@ -0,0 +1,253 @@
1
+ # Kalibr SDK
2
+
3
+ **Multi-Model AI Integration Framework**
4
+
5
+ Write once. Deploy anywhere. Connect to any AI model.
6
+
7
+ Kalibr lets you expose Python functions as APIs that work with **GPT, Claude, Gemini, and Copilot** automatically.
8
+
9
+ [![PyPI version](https://badge.fury.io/py/kalibr.svg)](https://badge.fury.io/py/kalibr)
10
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
11
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
12
+
13
+ ---
14
+
15
+ ## 🚀 Quick Start (2 minutes)
16
+
17
+ ### 1. Install
18
+ ```bash
19
+ pip install kalibr
20
+ ```
21
+
22
+ ### 2. Get Examples
23
+ ```bash
24
+ kalibr-connect examples
25
+ ```
26
+
27
+ This copies example files to `./kalibr_examples/` in your current directory.
28
+
29
+ ### 3. Run Demo
30
+ ```bash
31
+ kalibr-connect serve kalibr_examples/basic_kalibr_example.py
32
+ ```
33
+
34
+ ### 4. See Multi-Model Schemas
35
+
36
+ Open your browser to see all 4 AI model schemas auto-generated:
37
+
38
+ ```
39
+ http://localhost:8000/ # API info
40
+ http://localhost:8000/gpt-actions.json # For ChatGPT
41
+ http://localhost:8000/mcp.json # For Claude
42
+ http://localhost:8000/schemas/gemini # For Gemini
43
+ http://localhost:8000/schemas/copilot # For Copilot
44
+ http://localhost:8000/docs # Interactive docs
45
+ ```
46
+
47
+ **That's it!** One Python file, four AI platform schemas. 🎯
48
+
49
+ ---
50
+
51
+ ## 🎯 What Does This Do?
52
+
53
+ Kalibr turns your Python functions into APIs that AI assistants can call:
54
+
55
+ ```python
56
+ from kalibr import Kalibr
57
+
58
+ app = Kalibr(title="My Business API")
59
+
60
+ @app.action("get_inventory", "Check product stock")
61
+ def get_inventory(product_id: str):
62
+ # Your business logic
63
+ return {"product_id": product_id, "stock": 42}
64
+ ```
65
+
66
+ **Result:** ChatGPT, Claude, Gemini, and Copilot can all call your `get_inventory` function!
67
+
68
+ ---
69
+
70
+ ## 💪 Two Modes
71
+
72
+ ### Function-Level (Simple)
73
+ Perfect for exposing business logic:
74
+
75
+ ```python
76
+ from kalibr import Kalibr
77
+
78
+ app = Kalibr(title="My API")
79
+
80
+ @app.action("calculate_price", "Calculate product price")
81
+ def calculate_price(product_id: str, quantity: int):
82
+ return {"total": quantity * get_price(product_id)}
83
+ ```
84
+
85
+ ### App-Level (Advanced)
86
+ Full framework with file uploads, sessions, streaming, workflows:
87
+
88
+ ```python
89
+ from kalibr import KalibrApp
90
+ from kalibr.types import FileUpload, Session
91
+
92
+ app = KalibrApp(title="Advanced API")
93
+
94
+ @app.file_handler("analyze_doc", [".pdf", ".docx"])
95
+ async def analyze_doc(file: FileUpload):
96
+ return {"filename": file.filename, "analysis": "..."}
97
+
98
+ @app.session_action("save_data", "Save to session")
99
+ async def save_data(session: Session, data: dict):
100
+ session.set("my_data", data)
101
+ return {"saved": True}
102
+
103
+ @app.stream_action("live_feed", "Stream real-time data")
104
+ async def live_feed(count: int = 10):
105
+ for i in range(count):
106
+ yield {"item": i, "timestamp": "..."}
107
+ ```
108
+
109
+ ---
110
+
111
+ ## 📚 Examples Included
112
+
113
+ After running `kalibr-connect examples`, you get:
114
+
115
+ - **`basic_kalibr_example.py`** - Simple function-level example
116
+ - **`enhanced_kalibr_example.py`** - Advanced app-level example with all features
117
+
118
+ ---
119
+
120
+ ## 🤖 AI Platform Integration
121
+
122
+ Once your Kalibr app is running, integrate with AI platforms:
123
+
124
+ ### ChatGPT (GPT Actions)
125
+ 1. Copy schema from `http://localhost:8000/gpt-actions.json`
126
+ 2. Go to GPT Builder → Actions → Import from URL
127
+ 3. Done! ChatGPT can now call your functions
128
+
129
+ ### Claude (MCP)
130
+ 1. Add to Claude Desktop config:
131
+ ```json
132
+ {
133
+ "mcp": {
134
+ "servers": {
135
+ "my-api": {
136
+ "url": "http://localhost:8000/mcp.json"
137
+ }
138
+ }
139
+ }
140
+ }
141
+ ```
142
+ 2. Done! Claude can now call your functions
143
+
144
+ ### Gemini & Copilot
145
+ Similar simple setup using their respective schema endpoints.
146
+
147
+ ---
148
+
149
+ ## 🎯 Use Cases
150
+
151
+ - **Customer Service APIs** - Let AI assistants look up orders, process refunds
152
+ - **Data Analysis APIs** - Let AI query your analytics and generate insights
153
+ - **Document Processing** - Let AI analyze uploaded documents
154
+ - **Business Automation** - Let AI trigger workflows in your systems
155
+ - **Internal Tools** - Give your team AI-powered access to internal systems
156
+
157
+ ---
158
+
159
+ ## 📖 Documentation
160
+
161
+ - **Quick Start**: You're reading it!
162
+ - **Full Docs**: See `KALIBR_SDK_COMPLETE.md` in the package
163
+ - **Examples**: Run `kalibr-connect examples`
164
+ - **CLI Help**: `kalibr-connect --help`
165
+
166
+ ---
167
+
168
+ ## 🔧 CLI Commands
169
+
170
+ ```bash
171
+ kalibr-connect examples # Copy example files to current dir
172
+ kalibr-connect serve my_app.py # Run your app locally
173
+ kalibr-connect version # Show version info
174
+ kalibr-connect --help # Show all commands
175
+ ```
176
+
177
+ ---
178
+
179
+ ## ⚡ Key Features
180
+
181
+ - ✅ **Multi-Model Support** - Works with GPT, Claude, Gemini, Copilot
182
+ - ✅ **Automatic Schemas** - No manual schema writing
183
+ - ✅ **File Uploads** - Handle document uploads
184
+ - ✅ **Sessions** - Stateful conversations
185
+ - ✅ **Streaming** - Real-time data streaming
186
+ - ✅ **Workflows** - Multi-step processes
187
+ - ✅ **Type Safe** - Full Python type hints
188
+ - ✅ **Fast** - Async/await support
189
+
190
+ ---
191
+
192
+ ## 🔥 Why Kalibr?
193
+
194
+ **Without Kalibr:**
195
+ - Learn 4 different API specs
196
+ - Write 4 different schemas
197
+ - Maintain 4 codebases
198
+ - = Weeks of work
199
+
200
+ **With Kalibr:**
201
+ - Write Python functions once
202
+ - Kalibr generates all 4 schemas
203
+ - Single codebase
204
+ - = One day of work
205
+
206
+ ---
207
+
208
+ ## 💡 Simple Example
209
+
210
+ ```python
211
+ # my_app.py
212
+ from kalibr import Kalibr
213
+
214
+ app = Kalibr(title="Weather API")
215
+
216
+ @app.action("get_weather", "Get current weather")
217
+ def get_weather(city: str):
218
+ # Your logic here
219
+ return {"city": city, "temp": 72, "condition": "sunny"}
220
+ ```
221
+
222
+ ```bash
223
+ # Run it
224
+ kalibr-connect serve my_app.py
225
+
226
+ # Now ALL these work:
227
+ # ✅ ChatGPT can call get_weather()
228
+ # ✅ Claude can call get_weather()
229
+ # ✅ Gemini can call get_weather()
230
+ # ✅ Copilot can call get_weather()
231
+ ```
232
+
233
+ ---
234
+
235
+ ## 🚀 Get Started Now
236
+
237
+ ```bash
238
+ pip install kalibr
239
+ kalibr-connect examples
240
+ kalibr-connect serve kalibr_examples/basic_kalibr_example.py
241
+ ```
242
+
243
+ Open http://localhost:8000 and see your multi-model API in action! 🎯
244
+
245
+ ---
246
+
247
+ ## 📝 License
248
+
249
+ MIT License - see LICENSE file for details.
250
+
251
+ ---
252
+
253
+ **Kalibr SDK** - Transform how you build AI-integrated applications! 🚀