trustedrouter 0.10.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,9 @@
1
+ .venv/
2
+ __pycache__/
3
+ .pytest_cache/
4
+ .ruff_cache/
5
+ dist/
6
+ *.egg-info/
7
+ .coverage
8
+ coverage.xml
9
+ htmlcov/
@@ -0,0 +1,174 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including the
49
+ original version of the Work and any modifications or additions to
50
+ that Work or Derivative Works thereof, that is intentionally submitted
51
+ to Licensor for inclusion in the Work by the copyright owner or by an
52
+ individual or Legal Entity authorized to submit on behalf of the
53
+ copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of, publicly
70
+ display, publicly perform, sublicense, and distribute the Work and such
71
+ Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of this
74
+ License, each Contributor hereby grants to You a perpetual, worldwide,
75
+ non-exclusive, no-charge, royalty-free, irrevocable (except as stated
76
+ in this section) patent license to make, have made, use, offer to sell,
77
+ sell, import, and otherwise transfer the Work, where such license
78
+ applies only to those patent claims licensable by such Contributor
79
+ that are necessarily infringed by their Contribution(s) alone or by
80
+ combination of their Contribution(s) with the Work to which such
81
+ Contribution(s) was submitted. If You institute patent litigation
82
+ against any entity (including a cross-claim or counterclaim in a
83
+ lawsuit) alleging that the Work or a Contribution incorporated within
84
+ the Work constitutes direct or contributory patent infringement, then
85
+ any patent licenses granted to You under this License for that Work
86
+ shall terminate as of the date such litigation is filed.
87
+
88
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
89
+ Derivative Works thereof in any medium, with or without modifications,
90
+ and in Source or Object form, provided that You meet the following
91
+ conditions:
92
+
93
+ (a) You must give any other recipients of the Work or Derivative Works
94
+ a copy of this License; and
95
+
96
+ (b) You must cause any modified files to carry prominent notices
97
+ stating that You changed the files; and
98
+
99
+ (c) You must retain, in the Source form of any Derivative Works that
100
+ You distribute, all copyright, patent, trademark, and attribution
101
+ notices from the Source form of the Work, excluding those notices
102
+ that do not pertain to any part of the Derivative Works; and
103
+
104
+ (d) If the Work includes a "NOTICE" text file as part of its
105
+ distribution, then any Derivative Works that You distribute must
106
+ include a readable copy of the attribution notices contained
107
+ within such NOTICE file, excluding those notices that do not
108
+ pertain to any part of the Derivative Works, in at least one of
109
+ the following places: within a NOTICE text file distributed as
110
+ part of the Derivative Works; within the Source form or
111
+ documentation, if provided along with the Derivative Works; or,
112
+ within a display generated by the Derivative Works, if and
113
+ wherever such third-party notices normally appear. The contents
114
+ of the NOTICE file are for informational purposes only and do not
115
+ modify the License. You may add Your own attribution notices
116
+ within Derivative Works that You distribute, alongside or as an
117
+ addendum to the NOTICE text from the Work, provided that such
118
+ additional attribution notices cannot be construed as modifying
119
+ the License.
120
+
121
+ You may add Your own copyright statement to Your modifications and
122
+ may provide additional or different license terms and conditions for
123
+ use, reproduction, or distribution of Your modifications, or for any
124
+ such Derivative Works as a whole, provided Your use, reproduction, and
125
+ distribution of the Work otherwise complies with the conditions stated
126
+ in this License.
127
+
128
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
129
+ any Contribution intentionally submitted for inclusion in the Work by
130
+ You to the Licensor shall be under the terms and conditions of this
131
+ License, without any additional terms or conditions. Notwithstanding
132
+ the above, nothing herein shall supersede or modify the terms of any
133
+ separate license agreement you may have executed with Licensor
134
+ regarding such Contributions.
135
+
136
+ 6. Trademarks. This License does not grant permission to use the trade
137
+ names, trademarks, service marks, or product names of the Licensor,
138
+ except as required for reasonable and customary use in describing the
139
+ origin of the Work and reproducing the content of the NOTICE file.
140
+
141
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to
142
+ in writing, Licensor provides the Work (and each Contributor provides
143
+ its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR
144
+ CONDITIONS OF ANY KIND, either express or implied, including, without
145
+ limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
146
+ MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
147
+ responsible for determining the appropriateness of using or
148
+ redistributing the Work and assume any risks associated with Your
149
+ exercise of permissions under this License.
150
+
151
+ 8. Limitation of Liability. In no event and under no legal theory,
152
+ whether in tort (including negligence), contract, or otherwise, unless
153
+ required by applicable law (such as deliberate and grossly negligent
154
+ acts) or agreed to in writing, shall any Contributor be liable to You
155
+ for damages, including any direct, indirect, special, incidental, or
156
+ consequential damages of any character arising as a result of this
157
+ License or out of the use or inability to use the Work (including but
158
+ not limited to damages for loss of goodwill, work stoppage, computer
159
+ failure or malfunction, or any and all other commercial damages or
160
+ losses), even if such Contributor has been advised of the possibility
161
+ of such damages.
162
+
163
+ 9. Accepting Warranty or Additional Liability. While redistributing the
164
+ Work or Derivative Works thereof, You may choose to offer, and charge
165
+ a fee for, acceptance of support, warranty, indemnity, or other
166
+ liability obligations and/or rights consistent with this License.
167
+ However, in accepting such obligations, You may act only on Your own
168
+ behalf and on Your sole responsibility, not on behalf of any other
169
+ Contributor, and only if You agree to indemnify, defend, and hold each
170
+ Contributor harmless for any liability incurred by, or claims asserted
171
+ against, such Contributor by reason of your accepting any such
172
+ warranty or additional liability.
173
+
174
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,61 @@
1
+ Metadata-Version: 2.5
2
+ Name: trustedrouter
3
+ Version: 0.10.0
4
+ Summary: Alias for trusted-router-py, the official TrustedRouter Python SDK.
5
+ Project-URL: Homepage, https://trustedrouter.com
6
+ Project-URL: Documentation, https://github.com/Lore-Hex/trusted-router-py#readme
7
+ Project-URL: Issues, https://github.com/Lore-Hex/trusted-router-py/issues
8
+ Project-URL: Repository, https://github.com/Lore-Hex/trusted-router-py
9
+ Project-URL: Trust, https://trust.trustedrouter.com
10
+ Author: Lore Hex
11
+ License-Expression: Apache-2.0
12
+ License-File: LICENSE
13
+ Keywords: alias,llm,openai,sdk,trustedrouter
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: trusted-router-py>=0.10.0
25
+ Provides-Extra: attestation
26
+ Requires-Dist: trusted-router-py[attestation]>=0.10.0; extra == 'attestation'
27
+ Provides-Extra: receipts
28
+ Requires-Dist: trusted-router-py[receipts]>=0.10.0; extra == 'receipts'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # trustedrouter
32
+
33
+ `trustedrouter` is an alias that installs the official TrustedRouter Python SDK,
34
+ [`trusted-router-py`](https://pypi.org/project/trusted-router-py/).
35
+
36
+ ```bash
37
+ pip install trustedrouter
38
+ ```
39
+
40
+ This distribution contains only metadata. The SDK provides the `trustedrouter`
41
+ and `trusted_router` import names and the `trustedrouter` command.
42
+ The `attestation` and `receipts` extras are forwarded to the SDK, for example
43
+ `pip install "trustedrouter[attestation]"` or `pip install "trustedrouter[receipts]"`.
44
+
45
+ ## Quick start
46
+
47
+ ```python
48
+ from trustedrouter import TrustedRouter, AUTO_MODEL
49
+
50
+ with TrustedRouter(api_key="sk-tr-v1-...") as client:
51
+ resp = client.chat_completions(
52
+ model=AUTO_MODEL, # "trustedrouter/auto" — multi-provider failover
53
+ messages=[{"role": "user", "content": "hello"}],
54
+ )
55
+ print(resp.choices[0].message.content) # typed: ChatCompletion model
56
+ ```
57
+
58
+ - [TrustedRouter](https://trustedrouter.com)
59
+ - [Documentation](https://github.com/Lore-Hex/trusted-router-py#readme)
60
+ - [Official SDK on PyPI](https://pypi.org/project/trusted-router-py/)
61
+ - [Official SDK on GitHub](https://github.com/Lore-Hex/trusted-router-py)
@@ -0,0 +1,31 @@
1
+ # trustedrouter
2
+
3
+ `trustedrouter` is an alias that installs the official TrustedRouter Python SDK,
4
+ [`trusted-router-py`](https://pypi.org/project/trusted-router-py/).
5
+
6
+ ```bash
7
+ pip install trustedrouter
8
+ ```
9
+
10
+ This distribution contains only metadata. The SDK provides the `trustedrouter`
11
+ and `trusted_router` import names and the `trustedrouter` command.
12
+ The `attestation` and `receipts` extras are forwarded to the SDK, for example
13
+ `pip install "trustedrouter[attestation]"` or `pip install "trustedrouter[receipts]"`.
14
+
15
+ ## Quick start
16
+
17
+ ```python
18
+ from trustedrouter import TrustedRouter, AUTO_MODEL
19
+
20
+ with TrustedRouter(api_key="sk-tr-v1-...") as client:
21
+ resp = client.chat_completions(
22
+ model=AUTO_MODEL, # "trustedrouter/auto" — multi-provider failover
23
+ messages=[{"role": "user", "content": "hello"}],
24
+ )
25
+ print(resp.choices[0].message.content) # typed: ChatCompletion model
26
+ ```
27
+
28
+ - [TrustedRouter](https://trustedrouter.com)
29
+ - [Documentation](https://github.com/Lore-Hex/trusted-router-py#readme)
30
+ - [Official SDK on PyPI](https://pypi.org/project/trusted-router-py/)
31
+ - [Official SDK on GitHub](https://github.com/Lore-Hex/trusted-router-py)
@@ -0,0 +1,44 @@
1
+ [project]
2
+ name = "trustedrouter"
3
+ version = "0.10.0"
4
+ description = "Alias for trusted-router-py, the official TrustedRouter Python SDK."
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ license = "Apache-2.0"
8
+ license-files = ["LICENSE"]
9
+ authors = [{ name = "Lore Hex" }]
10
+ keywords = ["trustedrouter", "llm", "sdk", "alias", "openai"]
11
+ dependencies = ["trusted-router-py>=0.10.0"]
12
+ classifiers = [
13
+ "Development Status :: 3 - Alpha",
14
+ "Intended Audience :: Developers",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3 :: Only",
17
+ "Programming Language :: Python :: 3.10",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.13",
21
+ "Programming Language :: Python :: 3.14",
22
+ ]
23
+
24
+ [project.optional-dependencies]
25
+ attestation = ["trusted-router-py[attestation]>=0.10.0"]
26
+ receipts = ["trusted-router-py[receipts]>=0.10.0"]
27
+
28
+ [project.urls]
29
+ Homepage = "https://trustedrouter.com"
30
+ Documentation = "https://github.com/Lore-Hex/trusted-router-py#readme"
31
+ Issues = "https://github.com/Lore-Hex/trusted-router-py/issues"
32
+ Repository = "https://github.com/Lore-Hex/trusted-router-py"
33
+ Trust = "https://trust.trustedrouter.com"
34
+
35
+ [build-system]
36
+ requires = ["hatchling"]
37
+ build-backend = "hatchling.build"
38
+
39
+ [tool.hatch.build.targets.wheel]
40
+ # Metadata only: the real SDK owns both import packages and the CLI script.
41
+ bypass-selection = true
42
+
43
+ [tool.hatch.build.targets.sdist]
44
+ only-include = ["pyproject.toml", "README.md", "LICENSE"]