pid-sdk 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.
pid_sdk/__init__.py ADDED
@@ -0,0 +1,7 @@
1
+ """pid-sdk — Universal Portable Identity for the Agentic Era"""
2
+
3
+ __version__ = "0.1.0"
4
+
5
+ from .pid import PID
6
+
7
+ __all__ = ["PID"]
pid_sdk/pid.py ADDED
@@ -0,0 +1,40 @@
1
+ """PID — Passport ID"""
2
+ import uuid
3
+ import time
4
+ from dataclasses import dataclass, field
5
+ from typing import Dict, Any
6
+
7
+ @dataclass
8
+ class PID:
9
+ id: str = field(default_factory=lambda: str(uuid.uuid4()))
10
+ name: str = ""
11
+ domain: str = ""
12
+ context: Dict[str, Any] = field(default_factory=dict)
13
+ created_at: float = field(default_factory=time.time)
14
+
15
+ @classmethod
16
+ def create(cls, name: str, domain: str = "", **kwargs) -> "PID":
17
+ return cls(name=name, domain=domain, context=kwargs)
18
+
19
+ def board(self, domain: str, context: dict):
20
+ self.domain = domain
21
+ self.context.update(context)
22
+
23
+ def export(self) -> dict:
24
+ return {
25
+ "id": self.id,
26
+ "name": self.name,
27
+ "domain": self.domain,
28
+ "context": self.context,
29
+ "created_at": self.created_at,
30
+ }
31
+
32
+ @classmethod
33
+ def load(cls, data: dict) -> "PID":
34
+ return cls(
35
+ id=data["id"],
36
+ name=data["name"],
37
+ domain=data.get("domain", ""),
38
+ context=data.get("context", {}),
39
+ created_at=data.get("created_at", time.time()),
40
+ )
@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.4
2
+ Name: pid-sdk
3
+ Version: 0.1.0
4
+ Summary: Universal Portable Identity SDK for the Agentic Era (PID)
5
+ Author-email: XY and Z <milo@xyandz.io>
6
+ License: MIT
7
+ Project-URL: Homepage, https://xyandz.io
8
+ Project-URL: Repository, https://github.com/XYANDZ-iO/pid-sdk
9
+ Keywords: pid,identity,agentic,aos,passport,xyandz
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+
16
+ # pid-sdk
17
+
18
+ Universal Portable Identity SDK for the Agentic Era.
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ pip install pid-sdk
24
+ ```
25
+
26
+ ## Quick Start
27
+
28
+ ```python
29
+ from pid_sdk import PID
30
+
31
+ passport = PID.create(name="Sarah", domain="ad-intelligence")
32
+ passport.board("ad-intelligence", {"brand": "Glow Beauty", "budget": "$200K/month"})
33
+ ```
34
+
35
+ - [GitHub](https://github.com/XYANDZ-iO/pid-sdk)
36
+ - [xyandz.io](https://xyandz.io)
@@ -0,0 +1,6 @@
1
+ pid_sdk/__init__.py,sha256=tIqPfhFvqCoGEmEdda4HRHKbCuunG1WWYMJxG5VA1wg,130
2
+ pid_sdk/pid.py,sha256=Ma-ginXUSP_KLE-rw2nNh7QrBLx_2JOV7XwSEbYL0Qg,1150
3
+ pid_sdk-0.1.0.dist-info/METADATA,sha256=B1s4lq8Wj6NnDJDrbk6FepoV4LhRncoo0kw0r2KCYco,928
4
+ pid_sdk-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
5
+ pid_sdk-0.1.0.dist-info/top_level.txt,sha256=2cc04JweeX0jSze01F_4eGZG7ZJZJPIzt4KZfk4eGw8,8
6
+ pid_sdk-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ pid_sdk