kalibr 1.0.9__py3-none-any.whl → 1.0.12__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/kalibr_app.py CHANGED
@@ -1,24 +1,27 @@
1
1
  from fastapi import FastAPI
2
- from typing import Callable, Dict
2
+ from typing import Callable
3
3
 
4
4
  class KalibrApp:
5
- def __init__(self, title: str = "Kalibr App"):
6
- self.title = title
7
- self.app = FastAPI(title=title)
8
- self.actions: Dict[str, Callable] = {}
5
+ def __init__(self):
6
+ self.app = FastAPI(title="Kalibr SDK App")
7
+ self._routes = []
9
8
 
10
- def action(self, name: str, description: str):
11
- def decorator(func):
12
- self.actions[name] = func
13
-
14
- async def route(**kwargs):
15
- return func(**kwargs)
16
-
17
- self.app.post(f"/{name}")(route)
9
+ def register(self):
10
+ """
11
+ Decorator to register a Python function as a Kalibr tool endpoint.
12
+ Exposes the function automatically with JSON schema inference.
13
+ """
14
+ def decorator(func: Callable):
15
+ route_path = f"/{func.__name__}"
16
+ self.app.post(route_path)(func)
17
+ self._routes.append(func.__name__)
18
18
  return func
19
19
  return decorator
20
20
 
21
- def get_fastapi_app(self):
21
+ def get_app(self):
22
+ """Return the FastAPI instance."""
22
23
  return self.app
23
24
 
24
- app = None
25
+
26
+ # Default export for uvicorn (if someone runs `kalibr-connect serve demo_app.py`)
27
+ app = KalibrApp().get_app()
@@ -0,0 +1,120 @@
1
+ Metadata-Version: 2.4
2
+ Name: kalibr
3
+ Version: 1.0.12
4
+ Summary: Kalibr SDK — Integrate your SaaS with every major AI model using a single SDK.
5
+ Home-page: https://github.com/devon/kalibr-sdk
6
+ Author: Devon
7
+ Author-email: hello@kalibr.systems
8
+ License: MIT
9
+ Requires-Python: >=3.9
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE.txt
12
+ Requires-Dist: fastapi>=0.95.0
13
+ Requires-Dist: uvicorn>=0.22.0
14
+ Requires-Dist: typer>=0.9.0
15
+ Requires-Dist: pydantic>=2.0
16
+ Dynamic: author-email
17
+ Dynamic: home-page
18
+ Dynamic: license-file
19
+ Dynamic: requires-python
20
+
21
+ # Kalibr SDK
22
+
23
+ **Multi-Model AI Integration Framework**
24
+
25
+ Write once. Deploy anywhere. Connect to any AI model.
26
+
27
+ Kalibr lets developers expose any Python function as a model-compatible API — instantly usable by GPT, Claude, Gemini, and beyond.
28
+
29
+ ---
30
+
31
+ ## 🚀 Quick Start
32
+
33
+ ### Install
34
+ ```bash
35
+ pip install kalibr
36
+ ```
37
+
38
+ ### Run the included demo
39
+ ```bash
40
+ kalibr-connect serve examples/demo_app.py
41
+ ```
42
+
43
+ Then open your browser to:
44
+ ```
45
+ http://127.0.0.1:8000/docs
46
+ ```
47
+ You’ll see automatically generated endpoints for your demo functions — all schema-normalized and model-ready.
48
+
49
+ ---
50
+
51
+ ## ⚙️ Core Features
52
+
53
+ ✅ **Multi-Model Support** — Works with GPT Actions, Claude MCP, Gemini, and Copilot
54
+ ✅ **Automatic Schema Generation** — Define once, serve everywhere
55
+ ✅ **Fast Local Development** — Instantly test endpoints with `kalibr-connect serve`
56
+ ✅ **Lightweight Runtime** — No dependencies beyond FastAPI + Uvicorn
57
+
58
+ 🚧 *Coming Soon:*
59
+ • Auth & JWT user sessions
60
+ • Analytics & observability
61
+ • One-click deployment (Fly.io, AWS Lambda)
62
+
63
+ ---
64
+
65
+ ## 🧠 How It Works
66
+
67
+ Decorate your Python functions with `@app.register()`:
68
+
69
+ ```python
70
+ from kalibr.kalibr_app import KalibrApp
71
+
72
+ app = KalibrApp()
73
+
74
+ @app.register()
75
+ def summarize(text: str) -> str:
76
+ """Summarize text input."""
77
+ return text[:100] + "..."
78
+
79
+ @app.register()
80
+ def sentiment(text: str) -> dict:
81
+ """Return a basic sentiment classification."""
82
+ return {"sentiment": "positive" if "love" in text.lower() else "neutral"}
83
+
84
+ kalibr_app = app.get_app()
85
+ ```
86
+
87
+ Then run:
88
+ ```bash
89
+ kalibr-connect serve demo_app.py
90
+ ```
91
+
92
+ Your endpoints appear instantly at:
93
+ ```
94
+ http://127.0.0.1:8000/docs
95
+ ```
96
+
97
+ ---
98
+
99
+ ## 📁 Project Structure
100
+
101
+ ```
102
+ kalibr/
103
+ ├── __init__.py
104
+ ├── __main__.py
105
+ ├── kalibr_app.py
106
+ ├── schema_generators.py
107
+ examples/
108
+ ├── demo_app.py
109
+ └── enhanced_kalibr_example.py
110
+ ```
111
+
112
+ ---
113
+
114
+ ## 📘 Documentation
115
+
116
+ See [KALIBR_SDK_COMPLETE.md](KALIBR_SDK_COMPLETE.md) for full developer documentation.
117
+
118
+ ---
119
+
120
+ **Kalibr — Transform how you build AI-integrated applications.**
@@ -0,0 +1,10 @@
1
+ kalibr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ kalibr/__main__.py,sha256=ficQHOHEWM9h65ewQWYwkigIqLZeddLSRd9Foxz3CQ4,1377
3
+ kalibr/kalibr_app.py,sha256=EgWz_c2k7-02_pH29vT_lgbk_FIVRNTb87gUU8EyiJU,797
4
+ kalibr/schema_generators.py,sha256=1CFc0mCI0KVM48gEeGKK91I42WYyPYfEk2Yx2uZh478,286
5
+ kalibr-1.0.12.dist-info/licenses/LICENSE.txt,sha256=1WLJDkrueNpHCROy9zANrK2Ar2weqZ_z88hw90UKDoc,451
6
+ kalibr-1.0.12.dist-info/METADATA,sha256=hmBiA7VtaBeh7tbPoY-BgeEjmNeAORDhDokaOIsMvfU,2632
7
+ kalibr-1.0.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ kalibr-1.0.12.dist-info/entry_points.txt,sha256=T-DOrFEZb0fZxA9H8sSCh-2zKxdjnmpzIRmm5TY_f6s,56
9
+ kalibr-1.0.12.dist-info/top_level.txt,sha256=OkloC5_IfpE4-QwI30aLIYbFZk_-ChABWF7aBGddy28,7
10
+ kalibr-1.0.12.dist-info/RECORD,,
@@ -1,61 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: kalibr
3
- Version: 1.0.9
4
- Summary: Kalibr SDK — Integrate your SaaS with every major AI model using a single SDK.
5
- Home-page: https://github.com/devon/kalibr-sdk
6
- Author: Devon
7
- Author-email: hello@kalibr.systems
8
- License: MIT
9
- Requires-Python: >=3.9
10
- Description-Content-Type: text/markdown
11
- License-File: LICENSE.txt
12
- Requires-Dist: fastapi>=0.95.0
13
- Requires-Dist: uvicorn>=0.22.0
14
- Requires-Dist: typer>=0.9.0
15
- Requires-Dist: pydantic>=2.0
16
- Dynamic: author-email
17
- Dynamic: home-page
18
- Dynamic: license-file
19
- Dynamic: requires-python
20
-
21
- # Kalibr SDK
22
-
23
- **Multi-Model AI Integration Framework**
24
-
25
- Write once, deploy anywhere, connect to any AI model.
26
-
27
- ## Quick Start
28
-
29
- ```bash
30
- # Install
31
- pip install kalibr
32
-
33
- # Create app
34
- kalibr init --template enhanced --name "My API"
35
-
36
- # Test locally
37
- kalibr serve enhanced_app.py
38
-
39
- # Deploy to production
40
- kalibr deploy enhanced_app.py --platform fly --name my-api
41
- ```
42
-
43
- ## Features
44
-
45
- - ✅ **Multi-Model Support**: GPT Actions, Claude MCP, Gemini, Copilot
46
- - ✅ **Enhanced Framework**: File uploads, sessions, streaming, workflows
47
- - ✅ **Built-in Auth**: JWT, user management, protected routes
48
- - ✅ **Easy Deployment**: Fly.io, AWS Lambda with one command
49
- - ✅ **Analytics**: Automatic tracking, custom events, metrics
50
-
51
- ## Documentation
52
-
53
- See [KALIBR_SDK_COMPLETE.md](KALIBR_SDK_COMPLETE.md) for full documentation.
54
-
55
- ## Examples
56
-
57
- Check the [examples/](examples/) directory for sample applications.
58
-
59
- ---
60
-
61
- **Transform how you build AI-integrated applications! 🚀**
@@ -1,10 +0,0 @@
1
- kalibr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- kalibr/__main__.py,sha256=ficQHOHEWM9h65ewQWYwkigIqLZeddLSRd9Foxz3CQ4,1377
3
- kalibr/kalibr_app.py,sha256=cunLck36eM__vP4ZYbzJZWi_Ee13GIpL04J6p1JWVkM,605
4
- kalibr/schema_generators.py,sha256=1CFc0mCI0KVM48gEeGKK91I42WYyPYfEk2Yx2uZh478,286
5
- kalibr-1.0.9.dist-info/licenses/LICENSE.txt,sha256=1WLJDkrueNpHCROy9zANrK2Ar2weqZ_z88hw90UKDoc,451
6
- kalibr-1.0.9.dist-info/METADATA,sha256=Vom-3m40OeEhhLFGpAbLmBcr2rvlDm6GGZB1gTOof0I,1505
7
- kalibr-1.0.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
- kalibr-1.0.9.dist-info/entry_points.txt,sha256=T-DOrFEZb0fZxA9H8sSCh-2zKxdjnmpzIRmm5TY_f6s,56
9
- kalibr-1.0.9.dist-info/top_level.txt,sha256=OkloC5_IfpE4-QwI30aLIYbFZk_-ChABWF7aBGddy28,7
10
- kalibr-1.0.9.dist-info/RECORD,,