dexify-api-client 1.0.0b4__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,12 @@
1
+ # SDK license and API data rights
2
+
3
+ The Apache License 2.0 applies to the Dexify client-library code in this package. It does **not** grant:
4
+
5
+ - access to the Dexify API or any subscription plan;
6
+ - a license to Dexify or third-party catalog, market, image, or analytics data;
7
+ - permission to mirror, bulk-extract, resell, sublicense, or redistribute API responses;
8
+ - permission to use Dexify or third-party trademarks, logos, or branding; or
9
+ - credentials, quota, support, service levels, or continued service availability.
10
+
11
+ Use of the API and returned data requires an active authorized account and is governed by the current Dexify API
12
+ Terms and the customer's approved plan or signed order. See https://www.dexifyvault.com/developers/terms.
@@ -0,0 +1,186 @@
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, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the
13
+ copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other
16
+ entities that control, are controlled by, or are under common control with
17
+ that entity. For the purposes of this definition, "control" means (i) the
18
+ power, direct or indirect, to cause the direction or management of such
19
+ entity, whether by contract or otherwise, or (ii) ownership of fifty percent
20
+ (50%) or more of the outstanding shares, or (iii) beneficial ownership of
21
+ such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
24
+ 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 source, and
28
+ configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical transformation
31
+ or translation of a Source form, including but not limited to compiled object
32
+ code, generated documentation, and conversions to other media types.
33
+
34
+ "Work" shall mean the work of authorship, whether in Source or Object form,
35
+ made available under the License, as indicated by a copyright notice that is
36
+ included in or attached to the work (an example is provided in the Appendix
37
+ below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object form,
40
+ that is based on (or derived from) the Work and for which the editorial
41
+ revisions, annotations, elaborations, or other modifications represent, as a
42
+ whole, an original work of authorship. For the purposes of this License,
43
+ Derivative Works shall not include works that remain separable from, or
44
+ merely link (or bind by name) to the interfaces of, the Work and Derivative
45
+ Works thereof.
46
+
47
+ "Contribution" shall mean any work of authorship, including the original
48
+ version of the Work and any modifications or additions to that Work or
49
+ Derivative Works thereof, that is intentionally submitted to Licensor for
50
+ inclusion in the Work by the copyright owner or by an individual or Legal
51
+ Entity authorized to submit on behalf of the copyright owner. For the
52
+ purposes of this definition, "submitted" means any form of electronic,
53
+ verbal, or written communication sent to the Licensor or its representatives,
54
+ including but not limited to communication on electronic mailing lists,
55
+ source code control systems, and issue tracking systems that are managed by,
56
+ or on behalf of, the Licensor for the purpose of discussing and improving the
57
+ Work, but excluding communication that is conspicuously marked or otherwise
58
+ designated in writing by the copyright owner as "Not a Contribution."
59
+
60
+ "Contributor" shall mean Licensor and any individual or Legal Entity on
61
+ behalf of whom a Contribution has been received by Licensor and subsequently
62
+ incorporated within the Work.
63
+
64
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
65
+ License, each Contributor hereby grants to You a perpetual, worldwide,
66
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
67
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
68
+ sublicense, and distribute the Work and such Derivative Works in Source or
69
+ Object form.
70
+
71
+ 3. Grant of Patent License. Subject to the terms and conditions of this
72
+ License, each Contributor hereby grants to You a perpetual, worldwide,
73
+ non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
74
+ section) patent license to make, have made, use, offer to sell, sell, import,
75
+ and otherwise transfer the Work, where such license applies only to those
76
+ patent claims licensable by such Contributor that are necessarily infringed
77
+ by their Contribution(s) alone or by combination of their Contribution(s)
78
+ with the Work to which such Contribution(s) was submitted. If You institute
79
+ patent litigation against any entity (including a cross-claim or counterclaim
80
+ in a lawsuit) alleging that the Work or a Contribution incorporated within
81
+ the Work constitutes direct or contributory patent infringement, then any
82
+ patent licenses granted to You under this License for that Work shall
83
+ terminate as of the date such litigation is filed.
84
+
85
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
86
+ Derivative Works thereof in any medium, with or without modifications, and in
87
+ Source or Object form, provided that You meet the following conditions:
88
+
89
+ (a) You must give any other recipients of the Work or Derivative Works a copy
90
+ of this License; and
91
+
92
+ (b) You must cause any modified files to carry prominent notices stating that
93
+ You changed the files; and
94
+
95
+ (c) You must retain, in the Source form of any Derivative Works that You
96
+ distribute, all copyright, patent, trademark, and attribution notices from the
97
+ Source form of the Work, excluding those notices that do not pertain to any
98
+ part of the Derivative Works; and
99
+
100
+ (d) If the Work includes a "NOTICE" text file as part of its distribution,
101
+ then any Derivative Works that You distribute must include a readable copy of
102
+ the attribution notices contained within such NOTICE file, excluding those
103
+ notices that do not pertain to any part of the Derivative Works, in at least
104
+ one of the following places: within a NOTICE text file distributed as part of
105
+ the Derivative Works; within the Source form or documentation, if provided
106
+ along with the Derivative Works; or, within a display generated by the
107
+ Derivative Works, if and wherever such third-party notices normally appear.
108
+ The contents of the NOTICE file are for informational purposes only and do
109
+ not modify the License. You may add Your own attribution notices within
110
+ Derivative Works that You distribute, alongside or as an addendum to the
111
+ NOTICE text from the Work, provided that such additional attribution notices
112
+ cannot be construed as modifying the License.
113
+
114
+ You may add Your own copyright statement to Your modifications and may
115
+ provide additional or different license terms and conditions for use,
116
+ reproduction, or distribution of Your modifications, or for any such
117
+ Derivative Works as a whole, provided Your use, reproduction, and distribution
118
+ of the Work otherwise complies with the conditions stated in this License.
119
+
120
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
121
+ Contribution intentionally submitted for inclusion in the Work by You to the
122
+ Licensor shall be under the terms and conditions of this License, without any
123
+ additional terms or conditions. Notwithstanding the above, nothing herein
124
+ shall supersede or modify the terms of any separate license agreement you may
125
+ have executed with Licensor regarding such Contributions.
126
+
127
+ 6. Trademarks. This License does not grant permission to use the trade names,
128
+ trademarks, service marks, or product names of the Licensor, except as required
129
+ for reasonable and customary use in describing the origin of the Work and
130
+ reproducing the content of the NOTICE file.
131
+
132
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
133
+ writing, Licensor provides the Work (and each Contributor provides its
134
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
135
+ KIND, either express or implied, including, without limitation, any warranties
136
+ or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
137
+ PARTICULAR PURPOSE. You are solely responsible for determining the
138
+ appropriateness of using or redistributing the Work and assume any risks
139
+ associated with Your exercise of permissions under this License.
140
+
141
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
142
+ tort (including negligence), contract, or otherwise, unless required by
143
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
144
+ writing, shall any Contributor be liable to You for damages, including any
145
+ direct, indirect, special, incidental, or consequential damages of any
146
+ character arising as a result of this License or out of the use or inability
147
+ to use the Work (including but not limited to damages for loss of goodwill,
148
+ work stoppage, computer failure or malfunction, or any and all other
149
+ commercial damages or losses), even if such Contributor has been advised of
150
+ the possibility of such damages.
151
+
152
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work
153
+ or Derivative Works thereof, You may choose to offer, and charge a fee for,
154
+ acceptance of support, warranty, indemnity, or other liability obligations
155
+ and/or rights consistent with this License. However, in accepting such
156
+ obligations, You may act only on Your own behalf and on Your sole
157
+ responsibility, not on behalf of any other Contributor, and only if You agree
158
+ to indemnify, defend, and hold each Contributor harmless for any liability
159
+ incurred by, or claims asserted against, such Contributor by reason of your
160
+ accepting any such warranty or additional liability.
161
+
162
+ END OF TERMS AND CONDITIONS
163
+
164
+ APPENDIX: How to apply the Apache License to your work.
165
+
166
+ To apply the Apache License to your work, attach the following boilerplate
167
+ notice, with the fields enclosed by brackets "[]" replaced with your own
168
+ identifying information. (Don't include the brackets!) The text should be
169
+ enclosed in the appropriate comment syntax for the file format. We also
170
+ recommend that a file or class name and description of purpose be included on
171
+ the same "printed page" as the copyright notice for easier identification
172
+ within third-party archives.
173
+
174
+ Copyright [yyyy] [name of copyright owner]
175
+
176
+ Licensed under the Apache License, Version 2.0 (the "License");
177
+ you may not use this file except in compliance with the License.
178
+ You may obtain a copy of the License at
179
+
180
+ http://www.apache.org/licenses/LICENSE-2.0
181
+
182
+ Unless required by applicable law or agreed to in writing, software
183
+ distributed under the License is distributed on an "AS IS" BASIS,
184
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
185
+ See the License for the specific language governing permissions and
186
+ limitations under the License.
@@ -0,0 +1,7 @@
1
+ Dexify API Client Libraries
2
+ Copyright 2026 Dexify
3
+
4
+ This product includes software developed by Dexify.
5
+
6
+ The Apache License applies only to the client-library code distributed in this
7
+ package. API access and data use are governed separately.
@@ -0,0 +1,45 @@
1
+ Metadata-Version: 2.4
2
+ Name: dexify-api-client
3
+ Version: 1.0.0b4
4
+ Summary: Dependency-free server-side Python client for the Dexify Developer API
5
+ License-Expression: Apache-2.0
6
+ Keywords: pokemon,tcg,pricing,api,dexify
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3 :: Only
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ License-File: NOTICE
14
+ License-File: DATA_RIGHTS.md
15
+ Dynamic: license-file
16
+
17
+ # Dexify API clients
18
+
19
+ Dependency-free, server-side clients for the Dexify Developer API. Both clients cover the complete v1 surface,
20
+ keep credentials out of browser code, support conditional ETag requests, expose quota metadata, and preserve
21
+ the API's history-depth metadata.
22
+
23
+ These packages are release-ready source artifacts but are not published to npm or PyPI yet. Publication requires
24
+ the Dexify organization credentials, final package names, and approval of the customer license.
25
+
26
+ ## JavaScript
27
+
28
+ ```js
29
+ import { DexifyClient } from "@dexify/api-client";
30
+
31
+ const dexify = new DexifyClient({ apiKey: process.env.DEXIFY_API_KEY });
32
+ const history = await dexify.getPriceHistory("CARD_UUID", { market: "ebay", limit: 30 });
33
+ console.log(history.meta.history_depth);
34
+ ```
35
+
36
+ ## Python
37
+
38
+ ```python
39
+ import os
40
+ from dexify_python import DexifyClient
41
+
42
+ dexify = DexifyClient(os.environ["DEXIFY_API_KEY"])
43
+ history = dexify.get_price_history("CARD_UUID", "ebay", limit=30)
44
+ print(history["meta"]["history_depth"])
45
+ ```
@@ -0,0 +1,29 @@
1
+ # Dexify API clients
2
+
3
+ Dependency-free, server-side clients for the Dexify Developer API. Both clients cover the complete v1 surface,
4
+ keep credentials out of browser code, support conditional ETag requests, expose quota metadata, and preserve
5
+ the API's history-depth metadata.
6
+
7
+ These packages are release-ready source artifacts but are not published to npm or PyPI yet. Publication requires
8
+ the Dexify organization credentials, final package names, and approval of the customer license.
9
+
10
+ ## JavaScript
11
+
12
+ ```js
13
+ import { DexifyClient } from "@dexify/api-client";
14
+
15
+ const dexify = new DexifyClient({ apiKey: process.env.DEXIFY_API_KEY });
16
+ const history = await dexify.getPriceHistory("CARD_UUID", { market: "ebay", limit: 30 });
17
+ console.log(history.meta.history_depth);
18
+ ```
19
+
20
+ ## Python
21
+
22
+ ```python
23
+ import os
24
+ from dexify_python import DexifyClient
25
+
26
+ dexify = DexifyClient(os.environ["DEXIFY_API_KEY"])
27
+ history = dexify.get_price_history("CARD_UUID", "ebay", limit=30)
28
+ print(history["meta"]["history_depth"])
29
+ ```
@@ -0,0 +1,45 @@
1
+ Metadata-Version: 2.4
2
+ Name: dexify-api-client
3
+ Version: 1.0.0b4
4
+ Summary: Dependency-free server-side Python client for the Dexify Developer API
5
+ License-Expression: Apache-2.0
6
+ Keywords: pokemon,tcg,pricing,api,dexify
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3 :: Only
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ License-File: NOTICE
14
+ License-File: DATA_RIGHTS.md
15
+ Dynamic: license-file
16
+
17
+ # Dexify API clients
18
+
19
+ Dependency-free, server-side clients for the Dexify Developer API. Both clients cover the complete v1 surface,
20
+ keep credentials out of browser code, support conditional ETag requests, expose quota metadata, and preserve
21
+ the API's history-depth metadata.
22
+
23
+ These packages are release-ready source artifacts but are not published to npm or PyPI yet. Publication requires
24
+ the Dexify organization credentials, final package names, and approval of the customer license.
25
+
26
+ ## JavaScript
27
+
28
+ ```js
29
+ import { DexifyClient } from "@dexify/api-client";
30
+
31
+ const dexify = new DexifyClient({ apiKey: process.env.DEXIFY_API_KEY });
32
+ const history = await dexify.getPriceHistory("CARD_UUID", { market: "ebay", limit: 30 });
33
+ console.log(history.meta.history_depth);
34
+ ```
35
+
36
+ ## Python
37
+
38
+ ```python
39
+ import os
40
+ from dexify_python import DexifyClient
41
+
42
+ dexify = DexifyClient(os.environ["DEXIFY_API_KEY"])
43
+ history = dexify.get_price_history("CARD_UUID", "ebay", limit=30)
44
+ print(history["meta"]["history_depth"])
45
+ ```
@@ -0,0 +1,10 @@
1
+ DATA_RIGHTS.md
2
+ LICENSE
3
+ NOTICE
4
+ README.md
5
+ dexify_python.py
6
+ pyproject.toml
7
+ dexify_api_client.egg-info/PKG-INFO
8
+ dexify_api_client.egg-info/SOURCES.txt
9
+ dexify_api_client.egg-info/dependency_links.txt
10
+ dexify_api_client.egg-info/top_level.txt
@@ -0,0 +1,143 @@
1
+ """Dependency-free reference client for the Dexify v1 API.
2
+
3
+ Copy this module into a server-side Python project. Keep API keys in a secret
4
+ manager or environment variable; never embed them in browser or mobile code.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ import json
10
+ from dataclasses import dataclass
11
+ from typing import Callable, Iterator
12
+ from urllib.error import HTTPError
13
+ from urllib.parse import urlencode
14
+ from urllib.request import Request, urlopen
15
+
16
+
17
+ @dataclass(frozen=True)
18
+ class ResponseMetadata:
19
+ request_id: str | None
20
+ rate_limit: int | None
21
+ rate_limit_remaining: int | None
22
+ rate_limit_reset: int | None
23
+ etag: str | None
24
+ not_modified: bool = False
25
+
26
+
27
+ class DexifyError(RuntimeError):
28
+ def __init__(self, status: int, title: str, detail: str, request_id: str | None = None,
29
+ retry_after: int | None = None):
30
+ super().__init__(f"Dexify API {status}: {detail}")
31
+ self.status = status
32
+ self.title = title
33
+ self.detail = detail
34
+ self.request_id = request_id
35
+ self.retry_after = retry_after
36
+
37
+
38
+ class DexifyClient:
39
+ def __init__(self, api_key: str, base_url: str = "https://api.dexifyvault.com",
40
+ timeout: float = 15, transport: Callable | None = None):
41
+ if not api_key.strip():
42
+ raise ValueError("api_key is required")
43
+ if not base_url.startswith("https://"):
44
+ raise ValueError("base_url must use HTTPS")
45
+ self.api_key = api_key
46
+ self.base_url = base_url.rstrip("/")
47
+ self.timeout = timeout
48
+ self.transport = transport or urlopen
49
+ self.last_response: ResponseMetadata | None = None
50
+ self._cache: dict[str, tuple[str, dict]] = {}
51
+
52
+ @staticmethod
53
+ def _integer_header(headers, name: str) -> int | None:
54
+ value = headers.get(name)
55
+ try:
56
+ return int(value) if value is not None else None
57
+ except ValueError:
58
+ return None
59
+
60
+ def _metadata(self, headers, not_modified: bool = False) -> ResponseMetadata:
61
+ return ResponseMetadata(
62
+ request_id=headers.get("X-Request-Id"),
63
+ rate_limit=self._integer_header(headers, "RateLimit-Limit"),
64
+ rate_limit_remaining=self._integer_header(headers, "RateLimit-Remaining"),
65
+ rate_limit_reset=self._integer_header(headers, "RateLimit-Reset"),
66
+ etag=headers.get("ETag"),
67
+ not_modified=not_modified,
68
+ )
69
+
70
+ def request(self, path: str, **params) -> dict:
71
+ query = urlencode([(key, value) for key, value in params.items() if value is not None])
72
+ url = f"{self.base_url}/v1/{path.lstrip('/')}" + (f"?{query}" if query else "")
73
+ headers = {"X-API-Key": self.api_key, "Accept": "application/json",
74
+ "User-Agent": "dexify-python-reference/1.0"}
75
+ cached = self._cache.get(url)
76
+ if cached:
77
+ headers["If-None-Match"] = cached[0]
78
+ request = Request(url, headers=headers, method="GET")
79
+ try:
80
+ with self.transport(request, timeout=self.timeout) as response:
81
+ payload = json.loads(response.read())
82
+ self.last_response = self._metadata(response.headers)
83
+ if self.last_response.etag:
84
+ self._cache[url] = (self.last_response.etag, payload)
85
+ return payload
86
+ except HTTPError as error:
87
+ if error.code == 304 and cached:
88
+ self.last_response = self._metadata(error.headers, not_modified=True)
89
+ return cached[1]
90
+ try:
91
+ problem = json.loads(error.read())
92
+ except (json.JSONDecodeError, UnicodeDecodeError):
93
+ problem = {}
94
+ self.last_response = self._metadata(error.headers)
95
+ raise DexifyError(
96
+ error.code,
97
+ problem.get("title", "Request failed"),
98
+ problem.get("detail", "The API request failed."),
99
+ problem.get("request_id") or error.headers.get("X-Request-Id"),
100
+ self._integer_header(error.headers, "Retry-After"),
101
+ ) from None
102
+
103
+ def list_cards(self, **filters) -> dict:
104
+ return self.request("cards", **filters)
105
+
106
+ def list_markets(self) -> dict:
107
+ """Return supported market identifiers, native currencies, and price types."""
108
+ return self.request("markets")
109
+
110
+ def iter_cards(self, **filters) -> Iterator[dict]:
111
+ cursor = None
112
+ while True:
113
+ page = self.list_cards(**filters, cursor=cursor)
114
+ yield from page["data"]
115
+ cursor = page["meta"].get("next_cursor")
116
+ if not cursor:
117
+ return
118
+
119
+ def get_card(self, card_id: str) -> dict:
120
+ return self.request(f"cards/{card_id}")
121
+
122
+ def get_prices(self, card_id: str, **filters) -> dict:
123
+ return self.request(f"cards/{card_id}/prices", **filters)
124
+
125
+ def get_price_history(self, card_id: str, market: str, **filters) -> dict:
126
+ return self.request(f"cards/{card_id}/price-history", market=market, **filters)
127
+
128
+ def get_market_summary(self, card_id: str) -> dict:
129
+ return self.request(f"cards/{card_id}/market-summary")
130
+
131
+ def analyze_deal(self, card_id: str, asking_price_minor: int, market: str, **filters) -> dict:
132
+ return self.request(f"cards/{card_id}/deal-analysis",
133
+ asking_price_minor=asking_price_minor, market=market, **filters)
134
+
135
+ def list_sets(self, **filters) -> dict:
136
+ return self.request("sets", **filters)
137
+
138
+ def get_set(self, set_id: str) -> dict:
139
+ return self.request(f"sets/{set_id}")
140
+
141
+ def get_usage(self) -> dict:
142
+ """Return this API key's current quota window after this request."""
143
+ return self.request("account/usage")
@@ -0,0 +1,21 @@
1
+ [build-system]
2
+ requires = ["setuptools==84.0.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "dexify-api-client"
7
+ version = "1.0.0b4"
8
+ description = "Dependency-free server-side Python client for the Dexify Developer API"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "Apache-2.0"
12
+ license-files = ["LICENSE", "NOTICE", "DATA_RIGHTS.md"]
13
+ keywords = ["pokemon", "tcg", "pricing", "api", "dexify"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3 :: Only",
18
+ ]
19
+
20
+ [tool.setuptools]
21
+ py-modules = ["dexify_python"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+