auros-protocol 1.0.0__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,50 @@
1
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
+
3
+ # dependencies
4
+ node_modules/
5
+ /.pnp
6
+ .pnp.*
7
+ .yarn/*
8
+ !.yarn/patches
9
+ !.yarn/plugins
10
+ !.yarn/releases
11
+ !.yarn/versions
12
+
13
+ # testing
14
+ /coverage
15
+
16
+ # next.js
17
+ .next/
18
+ /out/
19
+
20
+ # production
21
+ /build
22
+
23
+ # protocol dev keys (local fallback)
24
+ .data/
25
+
26
+ # misc
27
+ .DS_Store
28
+ *.pem
29
+ __pycache__/
30
+ *.py[cod]
31
+ packages/auros-protocol-python/dist/
32
+
33
+ # debug
34
+ npm-debug.log*
35
+ yarn-debug.log*
36
+ yarn-error.log*
37
+ .pnpm-debug.log*
38
+
39
+ # env (keep .env.example committable)
40
+ .env.local
41
+ .env*.local
42
+
43
+ # vercel
44
+ .vercel
45
+
46
+ # typescript
47
+ *.tsbuildinfo
48
+ next-env.d.ts
49
+
50
+ .vercel
@@ -0,0 +1,118 @@
1
+ Metadata-Version: 2.4
2
+ Name: auros-protocol
3
+ Version: 1.0.0
4
+ Summary: Official Python SDK for the AUROS Protocol — RWA intelligence API
5
+ Project-URL: Homepage, https://getauros.com/developers
6
+ Project-URL: Documentation, https://getauros.com/developers/docs
7
+ Project-URL: Repository, https://github.com/getauros/auros
8
+ Author-email: AUROS <contact@getauros.com>
9
+ License-Expression: MIT
10
+ Keywords: api,auros,mica,rwa,tokenization
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.10
20
+ Requires-Dist: httpx>=0.27
21
+ Description-Content-Type: text/markdown
22
+
23
+ # auros-protocol (Python)
24
+
25
+ Official Python SDK for the [AUROS Protocol](https://getauros.com/developers).
26
+
27
+ ## Install
28
+
29
+ ```bash
30
+ pip install auros-protocol
31
+ ```
32
+
33
+ Or from source:
34
+
35
+ ```bash
36
+ cd packages/auros-protocol-python
37
+ pip install -e .
38
+ ```
39
+
40
+ ## Quickstart
41
+
42
+ ```python
43
+ from auros import AurosProtocol
44
+
45
+ client = AurosProtocol(api_key="auros_pk_test_demo")
46
+
47
+ result = client.score(
48
+ description="Retail warehouse Luxembourg €2.5M SPV professional investors"
49
+ )
50
+ print(result["score"], result["grade"], result["mica_classification"])
51
+ ```
52
+
53
+ ## Methods
54
+
55
+ | Method | Endpoint | Auth |
56
+ |--------|----------|------|
57
+ | `score(**fields)` | `POST /api/v1/score` | Bearer |
58
+ | `score_batch(**body)` | `POST /api/v1/score/batch` | Bearer |
59
+ | `products(**query)` | `GET /api/v1/products` | Bearer |
60
+ | `jurisdictions(**query)` | `GET /api/v1/jurisdictions` | Bearer |
61
+ | `checklist(**body)` | `POST /api/v1/checklist` | Bearer |
62
+ | `compare(**body)` | `POST /api/v1/compare` | Bearer |
63
+ | `status()` | `GET /api/v1/status` | None |
64
+ | `create_key(email)` | `POST /api/v1/keys` | None |
65
+
66
+ ## Examples
67
+
68
+ ```python
69
+ # Catalog
70
+ bonds = client.products(category="bonds", yield_min=4, limit=10)
71
+
72
+ # Jurisdictions
73
+ ranking = client.jurisdictions(
74
+ asset_type="real_estate",
75
+ investor_type="professional",
76
+ timeline_months=6,
77
+ )
78
+
79
+ # Checklist
80
+ items = client.checklist(
81
+ asset_type="real_estate",
82
+ jurisdiction="luxembourg",
83
+ structure="spv",
84
+ )
85
+
86
+ # Compare RWA products
87
+ comparison = client.compare(category="bonds", yield_min=4, limit=3)
88
+
89
+ # API health (no auth)
90
+ health = client.status()
91
+ print(health["status"], health["version"])
92
+
93
+ # Free API key
94
+ key_resp = client.create_key("you@company.com")
95
+ print(key_resp["api_key"])
96
+ ```
97
+
98
+ ## Context manager
99
+
100
+ ```python
101
+ with AurosProtocol(api_key="auros_pk_test_demo") as client:
102
+ print(client.score(description="..."))
103
+ ```
104
+
105
+ ## Disclaimer
106
+
107
+ Indicative intelligence only — not legal, tax, or investment advice.
108
+
109
+ ## Publish (maintainers)
110
+
111
+ ```bash
112
+ cd packages/auros-protocol-python
113
+ python -m pip install --upgrade build twine
114
+ python -m build
115
+ python -m twine upload dist/*
116
+ ```
117
+
118
+ Set `TWINE_USERNAME=__token__` and `TWINE_PASSWORD=pypi-<your-api-token>` before upload.
@@ -0,0 +1,96 @@
1
+ # auros-protocol (Python)
2
+
3
+ Official Python SDK for the [AUROS Protocol](https://getauros.com/developers).
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install auros-protocol
9
+ ```
10
+
11
+ Or from source:
12
+
13
+ ```bash
14
+ cd packages/auros-protocol-python
15
+ pip install -e .
16
+ ```
17
+
18
+ ## Quickstart
19
+
20
+ ```python
21
+ from auros import AurosProtocol
22
+
23
+ client = AurosProtocol(api_key="auros_pk_test_demo")
24
+
25
+ result = client.score(
26
+ description="Retail warehouse Luxembourg €2.5M SPV professional investors"
27
+ )
28
+ print(result["score"], result["grade"], result["mica_classification"])
29
+ ```
30
+
31
+ ## Methods
32
+
33
+ | Method | Endpoint | Auth |
34
+ |--------|----------|------|
35
+ | `score(**fields)` | `POST /api/v1/score` | Bearer |
36
+ | `score_batch(**body)` | `POST /api/v1/score/batch` | Bearer |
37
+ | `products(**query)` | `GET /api/v1/products` | Bearer |
38
+ | `jurisdictions(**query)` | `GET /api/v1/jurisdictions` | Bearer |
39
+ | `checklist(**body)` | `POST /api/v1/checklist` | Bearer |
40
+ | `compare(**body)` | `POST /api/v1/compare` | Bearer |
41
+ | `status()` | `GET /api/v1/status` | None |
42
+ | `create_key(email)` | `POST /api/v1/keys` | None |
43
+
44
+ ## Examples
45
+
46
+ ```python
47
+ # Catalog
48
+ bonds = client.products(category="bonds", yield_min=4, limit=10)
49
+
50
+ # Jurisdictions
51
+ ranking = client.jurisdictions(
52
+ asset_type="real_estate",
53
+ investor_type="professional",
54
+ timeline_months=6,
55
+ )
56
+
57
+ # Checklist
58
+ items = client.checklist(
59
+ asset_type="real_estate",
60
+ jurisdiction="luxembourg",
61
+ structure="spv",
62
+ )
63
+
64
+ # Compare RWA products
65
+ comparison = client.compare(category="bonds", yield_min=4, limit=3)
66
+
67
+ # API health (no auth)
68
+ health = client.status()
69
+ print(health["status"], health["version"])
70
+
71
+ # Free API key
72
+ key_resp = client.create_key("you@company.com")
73
+ print(key_resp["api_key"])
74
+ ```
75
+
76
+ ## Context manager
77
+
78
+ ```python
79
+ with AurosProtocol(api_key="auros_pk_test_demo") as client:
80
+ print(client.score(description="..."))
81
+ ```
82
+
83
+ ## Disclaimer
84
+
85
+ Indicative intelligence only — not legal, tax, or investment advice.
86
+
87
+ ## Publish (maintainers)
88
+
89
+ ```bash
90
+ cd packages/auros-protocol-python
91
+ python -m pip install --upgrade build twine
92
+ python -m build
93
+ python -m twine upload dist/*
94
+ ```
95
+
96
+ Set `TWINE_USERNAME=__token__` and `TWINE_PASSWORD=pypi-<your-api-token>` before upload.
@@ -0,0 +1,6 @@
1
+ """AUROS Protocol Python SDK."""
2
+
3
+ from auros.client import AurosProtocol, AurosProtocolError
4
+
5
+ __all__ = ["AurosProtocol", "AurosProtocolError"]
6
+ __version__ = "1.0.0"
@@ -0,0 +1,136 @@
1
+ """AUROS Protocol HTTP client."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Any
6
+
7
+ import httpx
8
+
9
+ DEFAULT_BASE_URL = "https://getauros.com"
10
+
11
+
12
+ class AurosProtocolError(Exception):
13
+ def __init__(self, code: str, message: str, status: int) -> None:
14
+ super().__init__(message)
15
+ self.code = code
16
+ self.message = message
17
+ self.status = status
18
+
19
+
20
+ class AurosProtocol:
21
+ """Typed client for the AUROS Protocol REST API."""
22
+
23
+ def __init__(
24
+ self,
25
+ api_key: str,
26
+ *,
27
+ base_url: str = DEFAULT_BASE_URL,
28
+ client: httpx.Client | None = None,
29
+ ) -> None:
30
+ if not api_key or not api_key.strip():
31
+ raise ValueError("api_key is required")
32
+ self._api_key = api_key.strip()
33
+ self._base_url = base_url.rstrip("/")
34
+ self._client = client or httpx.Client(timeout=30.0)
35
+ self._owns_client = client is None
36
+
37
+ def close(self) -> None:
38
+ if self._owns_client:
39
+ self._client.close()
40
+
41
+ def __enter__(self) -> AurosProtocol:
42
+ return self
43
+
44
+ def __exit__(self, *args: object) -> None:
45
+ self.close()
46
+
47
+ def score(self, **body: Any) -> dict[str, Any]:
48
+ return self._post("/api/v1/score", body)
49
+
50
+ def score_batch(self, **body: Any) -> dict[str, Any]:
51
+ return self._post("/api/v1/score/batch", body)
52
+
53
+ def score_history(self, score_id: str) -> dict[str, Any]:
54
+ return self._request("GET", f"/api/v1/score/{score_id}/history")
55
+
56
+ def products(self, **query: Any) -> dict[str, Any]:
57
+ return self._get("/api/v1/products", query)
58
+
59
+ def jurisdictions(self, **query: Any) -> dict[str, Any]:
60
+ return self._get("/api/v1/jurisdictions", query)
61
+
62
+ def checklist(self, **body: Any) -> dict[str, Any]:
63
+ return self._post("/api/v1/checklist", body)
64
+
65
+ def compare(self, **body: Any) -> dict[str, Any]:
66
+ return self._post("/api/v1/compare", body)
67
+
68
+ def status(self) -> dict[str, Any]:
69
+ return self._request("GET", "/api/v1/status", auth=False)
70
+
71
+ def monitor(self, **body: Any) -> dict[str, Any]:
72
+ return self._post("/api/v1/monitor", body)
73
+
74
+ def get_monitor(self, monitor_id: str) -> dict[str, Any]:
75
+ return self._request("GET", f"/api/v1/monitor/{monitor_id}")
76
+
77
+ def delete_monitor(self, monitor_id: str) -> dict[str, Any]:
78
+ return self._request("DELETE", f"/api/v1/monitor/{monitor_id}")
79
+
80
+ def dossier(self, **body: Any) -> dict[str, Any]:
81
+ return self._post("/api/v1/dossier", body)
82
+
83
+ def register_webhook(self, **body: Any) -> dict[str, Any]:
84
+ return self._post("/api/v1/webhooks", body)
85
+
86
+ def webhooks(self) -> dict[str, Any]:
87
+ return self._request("GET", "/api/v1/webhooks")
88
+
89
+ def delete_webhook(self, webhook_id: str) -> dict[str, Any]:
90
+ return self._request("DELETE", f"/api/v1/webhooks/{webhook_id}")
91
+
92
+ def create_key(self, email: str) -> dict[str, Any]:
93
+ return self._request("POST", "/api/v1/keys", json={"email": email}, auth=False)
94
+
95
+ def _get(self, path: str, params: dict[str, Any]) -> dict[str, Any]:
96
+ filtered = {k: v for k, v in params.items() if v is not None}
97
+ return self._request("GET", path, params=filtered)
98
+
99
+ def _post(self, path: str, body: dict[str, Any]) -> dict[str, Any]:
100
+ filtered = {k: v for k, v in body.items() if v is not None}
101
+ return self._request("POST", path, json=filtered)
102
+
103
+ def _request(
104
+ self,
105
+ method: str,
106
+ path: str,
107
+ *,
108
+ json: dict[str, Any] | None = None,
109
+ params: dict[str, Any] | None = None,
110
+ auth: bool = True,
111
+ ) -> dict[str, Any]:
112
+ headers: dict[str, str] = {
113
+ "Accept": "application/json",
114
+ "X-AUROS-Protocol-Version": "1.0",
115
+ }
116
+ if json is not None:
117
+ headers["Content-Type"] = "application/json"
118
+ if auth:
119
+ headers["Authorization"] = f"Bearer {self._api_key}"
120
+
121
+ response = self._client.request(
122
+ method,
123
+ f"{self._base_url}{path}",
124
+ headers=headers,
125
+ json=json,
126
+ params=params,
127
+ )
128
+ data = response.json()
129
+ if not response.is_success:
130
+ err = data.get("error", {}) if isinstance(data, dict) else {}
131
+ raise AurosProtocolError(
132
+ err.get("code", "unknown_error"),
133
+ err.get("message", "Request failed"),
134
+ response.status_code,
135
+ )
136
+ return data
File without changes
@@ -0,0 +1,34 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "auros-protocol"
7
+ version = "1.0.0"
8
+ description = "Official Python SDK for the AUROS Protocol — RWA intelligence API"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.10"
12
+ keywords = ["auros", "rwa", "mica", "tokenization", "api"]
13
+ authors = [{ name = "AUROS", email = "contact@getauros.com" }]
14
+ dependencies = [
15
+ "httpx>=0.27",
16
+ ]
17
+ classifiers = [
18
+ "Development Status :: 4 - Beta",
19
+ "Intended Audience :: Developers",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Typing :: Typed",
26
+ ]
27
+
28
+ [project.urls]
29
+ Homepage = "https://getauros.com/developers"
30
+ Documentation = "https://getauros.com/developers/docs"
31
+ Repository = "https://github.com/getauros/auros"
32
+
33
+ [tool.hatch.build.targets.wheel]
34
+ packages = ["auros"]