polarity-sdk 0.3.1__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.
@@ -0,0 +1,35 @@
1
+ # Root-level monorepo ignores. Per-app .gitignore files under apps/<name>/
2
+ # stay in place and compose recursively, so this file only adds patterns
3
+ # that should apply across the whole tree.
4
+
5
+ # OS / editor
6
+ .DS_Store
7
+ .DS_Store?
8
+ ._*
9
+ .Spotlight-V100
10
+ .Trashes
11
+ ehthumbs.db
12
+ Thumbs.db
13
+ .idea/
14
+ .vscode/
15
+ *.swp
16
+ *.swo
17
+
18
+ # Bun workspaces drop a top-level node_modules/ + lockfile when you run
19
+ # `bun install` at the root.
20
+ /node_modules/
21
+ /bun.lock
22
+
23
+ # Local env at root (per-app .env files are governed by their own .gitignore).
24
+ /.env
25
+ /.env.local
26
+ /.env.*.local
27
+
28
+ # Build caches that some tools stash at root.
29
+ /.turbo
30
+ /.cache
31
+ /dist
32
+ /build
33
+
34
+ # Plan / scratch (keep this dir local, never commit)
35
+ /.scratch/
@@ -0,0 +1,63 @@
1
+ Metadata-Version: 2.4
2
+ Name: polarity-sdk
3
+ Version: 0.3.1
4
+ Summary: Polarity SDK (Python). Install alias for polarity-keystone — same package, new name.
5
+ Project-URL: Homepage, https://plr.sh
6
+ Project-URL: Source, https://github.com/Polarityinc/polarity
7
+ Author-email: Polarity <support@polarity.cc>
8
+ License: MIT
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
14
+ Requires-Python: >=3.9
15
+ Requires-Dist: polarity-keystone>=0.3.1
16
+ Description-Content-Type: text/markdown
17
+
18
+ # polarity-sdk
19
+
20
+ Python SDK for [Polarity](https://plr.sh) — agent evaluation, sandboxed execution, and LLM observability.
21
+
22
+ This is the **canonical install name**. It's a thin alias that pulls in
23
+ `polarity-keystone`, which ships the actual code. Both names refer to
24
+ the same package; use whichever feels right.
25
+
26
+ ## Install
27
+
28
+ ```bash
29
+ pip install polarity-sdk
30
+ ```
31
+
32
+ ## Quickstart
33
+
34
+ ```python
35
+ import polarity as plr
36
+ from openai import OpenAI
37
+
38
+ client = plr.wrap(OpenAI())
39
+
40
+ @plr.traced("workflow")
41
+ def run(prompt: str):
42
+ return client.chat.completions.create(
43
+ model="gpt-4o-mini",
44
+ messages=[{"role": "user", "content": prompt}],
45
+ )
46
+
47
+ run("hello world")
48
+ ```
49
+
50
+ Traces appear at https://app.polarity.so.
51
+
52
+ ## Configuration
53
+
54
+ | Env var | Purpose |
55
+ | --- | --- |
56
+ | `POLARITY_API_KEY` | Required. Get one at https://app.polarity.so |
57
+ | `POLARITY_BASE_URL` | Optional. Defaults to `https://api.plr.sh` |
58
+
59
+ Legacy `KEYSTONE_*` env vars continue to work indefinitely.
60
+
61
+ ## More
62
+
63
+ Full docs at https://docs.polarity.so.
@@ -0,0 +1,46 @@
1
+ # polarity-sdk
2
+
3
+ Python SDK for [Polarity](https://plr.sh) — agent evaluation, sandboxed execution, and LLM observability.
4
+
5
+ This is the **canonical install name**. It's a thin alias that pulls in
6
+ `polarity-keystone`, which ships the actual code. Both names refer to
7
+ the same package; use whichever feels right.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ pip install polarity-sdk
13
+ ```
14
+
15
+ ## Quickstart
16
+
17
+ ```python
18
+ import polarity as plr
19
+ from openai import OpenAI
20
+
21
+ client = plr.wrap(OpenAI())
22
+
23
+ @plr.traced("workflow")
24
+ def run(prompt: str):
25
+ return client.chat.completions.create(
26
+ model="gpt-4o-mini",
27
+ messages=[{"role": "user", "content": prompt}],
28
+ )
29
+
30
+ run("hello world")
31
+ ```
32
+
33
+ Traces appear at https://app.polarity.so.
34
+
35
+ ## Configuration
36
+
37
+ | Env var | Purpose |
38
+ | --- | --- |
39
+ | `POLARITY_API_KEY` | Required. Get one at https://app.polarity.so |
40
+ | `POLARITY_BASE_URL` | Optional. Defaults to `https://api.plr.sh` |
41
+
42
+ Legacy `KEYSTONE_*` env vars continue to work indefinitely.
43
+
44
+ ## More
45
+
46
+ Full docs at https://docs.polarity.so.
@@ -0,0 +1,30 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "polarity-sdk"
7
+ version = "0.3.1"
8
+ description = "Polarity SDK (Python). Install alias for polarity-keystone — same package, new name."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "Polarity", email = "support@polarity.cc" }]
13
+ classifiers = [
14
+ "Development Status :: 4 - Beta",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3",
18
+ "Topic :: Software Development :: Libraries :: Python Modules",
19
+ ]
20
+ dependencies = ["polarity-keystone>=0.3.1"]
21
+
22
+ [project.urls]
23
+ Homepage = "https://plr.sh"
24
+ Source = "https://github.com/Polarityinc/polarity"
25
+
26
+ # This is a stub package with no code of its own. Installing it pulls
27
+ # in polarity-keystone, which ships the canonical `polarity` import.
28
+ [tool.hatch.build.targets.wheel]
29
+ packages = []
30
+ bypass-selection = true