ambolt 0.1.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.
ambolt-0.1.0/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ambolt
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this documentation and associated files, to deal in them without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies, and to permit persons to whom they are furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions.
8
+
9
+ THE DOCUMENTATION IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
ambolt-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: ambolt
3
+ Version: 0.1.0
4
+ Summary: Client for the Ambolt pay-per-call data tools (x402, USDC): electricity, company registers, tenders, FX, DNS, on-chain facts.
5
+ License: MIT
6
+ Project-URL: Homepage, https://ambolt.dev
7
+ Project-URL: Documentation, https://ambolt.dev/docs
8
+ Project-URL: Source, https://github.com/ambolt/ambolt-mcp
9
+ Keywords: x402,mcp,ai-agents,data-api,usdc
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Intended Audience :: Developers
13
+ Requires-Python: >=3.9
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Dynamic: license-file
17
+
18
+ # ambolt
19
+
20
+ Client for [Ambolt](https://ambolt.dev): dated, sourced data lookups as pay-per-call endpoints (x402, USDC). Failed calls are never charged.
21
+
22
+ ```python
23
+ from ambolt import Ambolt
24
+
25
+ ambolt = Ambolt(session=paying_session) # a requests-compatible session that pays x402 challenges
26
+ print(ambolt.iban_validate(iban="DK5000400440116243"))
27
+ print(ambolt.call("dk-electricity-prices", area="DK1"))
28
+ ```
29
+
30
+ Every function is also an MCP tool at `https://api.ambolt.dev/mcp`. Not financial, legal or tax advice.
ambolt-0.1.0/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # ambolt
2
+
3
+ Client for [Ambolt](https://ambolt.dev): dated, sourced data lookups as pay-per-call endpoints (x402, USDC). Failed calls are never charged.
4
+
5
+ ```python
6
+ from ambolt import Ambolt
7
+
8
+ ambolt = Ambolt(session=paying_session) # a requests-compatible session that pays x402 challenges
9
+ print(ambolt.iban_validate(iban="DK5000400440116243"))
10
+ print(ambolt.call("dk-electricity-prices", area="DK1"))
11
+ ```
12
+
13
+ Every function is also an MCP tool at `https://api.ambolt.dev/mcp`. Not financial, legal or tax advice.
@@ -0,0 +1,60 @@
1
+ """Ambolt: client for the pay-per-call data tools at https://ambolt.dev (x402, USDC). Zero dependencies.
2
+
3
+ Payment: pass a requests-compatible session that pays x402 challenges (for example from the `x402` package).
4
+ Without one, calls raise AmboltError with status 402 and the price challenge.
5
+ """
6
+ import json
7
+ import urllib.error
8
+ import urllib.parse
9
+ import urllib.request
10
+
11
+ from ._generated import FUNCTIONS
12
+
13
+ __all__ = ["Ambolt", "AmboltError", "FUNCTIONS"]
14
+ __version__ = "0.1.0"
15
+
16
+
17
+ class AmboltError(Exception):
18
+ def __init__(self, message, status=None, body=None):
19
+ super().__init__(message)
20
+ self.status = status
21
+ self.body = body
22
+
23
+
24
+ def _encode(v):
25
+ return json.dumps(v, separators=(",", ":")) if isinstance(v, (list, dict)) else str(v).lower() if isinstance(v, bool) else str(v)
26
+
27
+
28
+ class Ambolt:
29
+ def __init__(self, session=None, base_url="https://api.ambolt.dev"):
30
+ self.session = session
31
+ self.base_url = base_url.rstrip("/")
32
+ self.mcp_url = self.base_url + "/mcp"
33
+ self.functions = FUNCTIONS
34
+ for fn in FUNCTIONS:
35
+ setattr(self, fn["py"], self._method(fn["id"]))
36
+
37
+ def _method(self, fn_id):
38
+ return lambda **params: self.call(fn_id, **params)
39
+
40
+ def call(self, fn_id, **params):
41
+ qs = urllib.parse.urlencode({k: _encode(v) for k, v in params.items() if v is not None})
42
+ url = f"{self.base_url}/v1/{fn_id}?{qs}"
43
+ if self.session is not None:
44
+ r = self.session.get(url, headers={"accept": "application/json"})
45
+ status, text = r.status_code, r.text
46
+ else:
47
+ try:
48
+ with urllib.request.urlopen(urllib.request.Request(url, headers={"accept": "application/json"}), timeout=30) as r:
49
+ status, text = r.status, r.read().decode("utf-8")
50
+ except urllib.error.HTTPError as e:
51
+ status, text = e.code, e.read().decode("utf-8", "replace")
52
+ try:
53
+ body = json.loads(text)
54
+ except ValueError:
55
+ body = None
56
+ if status == 402:
57
+ raise AmboltError("payment required: pass a session that pays x402", status, body)
58
+ if status >= 400:
59
+ raise AmboltError((body or {}).get("error", f"HTTP {status}"), status, body)
60
+ return body
@@ -0,0 +1,315 @@
1
+ # Generated by sdk/generate.mjs. Do not edit.
2
+ FUNCTIONS = [
3
+ {
4
+ "id": "base-erc20-balance",
5
+ "py": "base_erc20_balance",
6
+ "description": "ERC-20 token balance of a wallet address on Base mainnet (USDC, WETH, any token): raw units, decimals, symbol and formatted amount, read live via eth_call..",
7
+ "priceUsd": 0.003,
8
+ "required": [
9
+ "address",
10
+ "token"
11
+ ]
12
+ },
13
+ {
14
+ "id": "base-token-facts",
15
+ "py": "base_token_facts",
16
+ "description": "Verifiable on-chain facts about an ERC-20 token on Base: name, symbol, supply, whether the contract has an owner (and whether it was renounced), whether it is an upgradeable proxy and who administers it, whether it is paused, and which privileged functions (mint, burn, pause, blacklist, fee setting, upgrade) appear in its bytecode.",
17
+ "priceUsd": 0.01,
18
+ "required": [
19
+ "token"
20
+ ]
21
+ },
22
+ {
23
+ "id": "base-token-info",
24
+ "py": "base_token_info",
25
+ "description": "Basic facts about an ERC-20 token contract on Base mainnet: name, symbol, decimals and total supply (raw and formatted), read live via eth_call.",
26
+ "priceUsd": 0.003,
27
+ "required": [
28
+ "token"
29
+ ]
30
+ },
31
+ {
32
+ "id": "base-transaction",
33
+ "py": "base_transaction",
34
+ "description": "Look up a transaction on Base by hash: success or revert, block and time, sender, recipient, ETH value, gas and fee, the called method selector, and decoded ERC-20 transfers with token symbols.",
35
+ "priceUsd": 0.005,
36
+ "required": [
37
+ "hash"
38
+ ]
39
+ },
40
+ {
41
+ "id": "base-wallet-balances",
42
+ "py": "base_wallet_balances",
43
+ "description": "ETH balance and balances of major tokens (USDC, WETH, cbBTC, DAI, USDbC, cbETH, AERO) for any address on Base, plus any extra token contracts you list.",
44
+ "priceUsd": 0.005,
45
+ "required": [
46
+ "address"
47
+ ]
48
+ },
49
+ {
50
+ "id": "disposable-email-check",
51
+ "py": "disposable_email_check",
52
+ "description": "Fast email address check without sending anything: syntax, domain MX records, disposable/temporary-mail domain (9,000+ listed), role address (info@, admin@) and likely typo of a popular provider.",
53
+ "priceUsd": 0.003,
54
+ "required": [
55
+ "email"
56
+ ]
57
+ },
58
+ {
59
+ "id": "dk-co2-intensity",
60
+ "py": "dk_co2_intensity",
61
+ "description": "CO2 emissions per kWh of electricity consumed in Denmark (DK1 West, DK2 East), latest 5-minute value plus 24-hour average, cleanest and dirtiest times..",
62
+ "priceUsd": 0.005,
63
+ "required": []
64
+ },
65
+ {
66
+ "id": "dk-electricity-prices",
67
+ "py": "dk_electricity_prices",
68
+ "description": "Day-ahead electricity spot prices for one day and bidding area, in EUR and DKK per MWh, quarter-hourly or hourly, with min/max/average and the cheapest hours.",
69
+ "priceUsd": 0.01,
70
+ "required": []
71
+ },
72
+ {
73
+ "id": "dns-lookup",
74
+ "py": "dns_lookup",
75
+ "description": "Resolve public DNS records for a domain (A, AAAA, MX, TXT, NS, CNAME) and report whether SPF and DMARC records are present, with their policies.",
76
+ "priceUsd": 0.003,
77
+ "required": [
78
+ "domain"
79
+ ]
80
+ },
81
+ {
82
+ "id": "doi-lookup",
83
+ "py": "doi_lookup",
84
+ "description": "Scholarly metadata by DOI, or a best-match search by citation text: title, authors, journal, year, publisher, citation count, licence links and URL.",
85
+ "priceUsd": 0.003,
86
+ "required": []
87
+ },
88
+ {
89
+ "id": "domain-rdap",
90
+ "py": "domain_rdap",
91
+ "description": "Look up a domain in the public RDAP registry: registration, last-changed and expiry dates, status codes, nameservers, DNSSEC flag and registrar name.",
92
+ "priceUsd": 0.003,
93
+ "required": [
94
+ "domain"
95
+ ]
96
+ },
97
+ {
98
+ "id": "domain-ssl-sweep",
99
+ "py": "domain_ssl_sweep",
100
+ "description": "Check SSL certificate and domain registration expiry for one domain or a whole list: certificate issuer, valid from and to, days left, trusted or not, domain registration and expiry dates, registrar and nameservers.",
101
+ "priceUsd": 0.005,
102
+ "required": []
103
+ },
104
+ {
105
+ "id": "ecb-key-rates",
106
+ "py": "ecb_key_rates",
107
+ "description": "The three ECB key interest rates with their latest change dates and recent history.",
108
+ "priceUsd": 0.003,
109
+ "required": []
110
+ },
111
+ {
112
+ "id": "ens-resolve",
113
+ "py": "ens_resolve",
114
+ "description": "Resolve an ENS name (e.g.",
115
+ "priceUsd": 0.003,
116
+ "required": []
117
+ },
118
+ {
119
+ "id": "entity-resolve",
120
+ "py": "entity_resolve",
121
+ "description": "Resolve a company name, website domain, registry number, LEI or VAT number to its official legal entity: registry, registry number, legal form, status, address, industry codes, size where published and LEI.",
122
+ "priceUsd": 0.01,
123
+ "required": []
124
+ },
125
+ {
126
+ "id": "eu-vat-validate",
127
+ "py": "eu_vat_validate",
128
+ "description": "Check whether an EU VAT number is valid and active.",
129
+ "priceUsd": 0.003,
130
+ "required": [
131
+ "vat"
132
+ ]
133
+ },
134
+ {
135
+ "id": "fx-rate-ecb",
136
+ "py": "fx_rate_ecb",
137
+ "description": "European Central Bank euro foreign-exchange reference rates for any date since 1999, converted to any base currency.",
138
+ "priceUsd": 0.003,
139
+ "required": []
140
+ },
141
+ {
142
+ "id": "iban-validate",
143
+ "py": "iban_validate",
144
+ "description": "Validate an IBAN offline: ISO 13616 checksum (mod 97), registered length for the country, and a normalised and grouped format.",
145
+ "priceUsd": 0.003,
146
+ "required": [
147
+ "iban"
148
+ ]
149
+ },
150
+ {
151
+ "id": "lei-lookup",
152
+ "py": "lei_lookup",
153
+ "description": "Look up a Legal Entity Identifier (LEI) record by 20-character LEI, or search legal entities by name and country.",
154
+ "priceUsd": 0.005,
155
+ "required": []
156
+ },
157
+ {
158
+ "id": "nordic-company-lookup",
159
+ "py": "nordic_company_lookup",
160
+ "description": "Look up companies in the Norwegian and Finnish company registers by registration number or name: name, legal form, industry, address, registration date and status.",
161
+ "priceUsd": 0.005,
162
+ "required": [
163
+ "country"
164
+ ]
165
+ },
166
+ {
167
+ "id": "package-vulnerabilities",
168
+ "py": "package_vulnerabilities",
169
+ "description": "Check an npm or PyPI package version against a public vulnerability database: advisory ids, aliases (CVE, GHSA), summary, severity label and first fixed version, plus the latest published version.",
170
+ "priceUsd": 0.003,
171
+ "required": [
172
+ "ecosystem",
173
+ "name"
174
+ ]
175
+ },
176
+ {
177
+ "id": "rss-feed-normaliser",
178
+ "py": "rss_feed_normaliser",
179
+ "description": "Turn any RSS 2.0, RSS 1.0, Atom or JSON Feed into one clean JSON schema: feed title, link and language, then items with id, title, URL, ISO published/updated dates, summary, categories and enclosure.",
180
+ "priceUsd": 0.003,
181
+ "required": [
182
+ "url"
183
+ ]
184
+ },
185
+ {
186
+ "id": "sitemap-robots-doctor",
187
+ "py": "sitemap_robots_doctor",
188
+ "description": "Audit a website's robots.txt and XML sitemaps in one call: user-agent groups and blocked paths, sitemap declarations, whether each sitemap loads, URL counts (indexes followed to 10 files), lastmod coverage and age, duplicates, off-host and non-HTTPS URLs, size-limit breaches, and a sample of listed URLs checked for status.",
189
+ "priceUsd": 0.005,
190
+ "required": [
191
+ "site"
192
+ ]
193
+ },
194
+ {
195
+ "id": "solana-swap-quote",
196
+ "py": "solana_swap_quote",
197
+ "description": "Get a swap quote on Solana through a DEX aggregator: expected output, minimum output after slippage, price impact, route venues and all fees in basis points.",
198
+ "priceUsd": 0.003,
199
+ "required": [
200
+ "inputMint",
201
+ "outputMint",
202
+ "amount"
203
+ ]
204
+ },
205
+ {
206
+ "id": "solana-swap-transaction",
207
+ "py": "solana_swap_transaction",
208
+ "description": "Build an unsigned Solana swap transaction through a DEX aggregator for a wallet you control.",
209
+ "priceUsd": 0.003,
210
+ "required": [
211
+ "inputMint",
212
+ "outputMint",
213
+ "amount",
214
+ "taker"
215
+ ]
216
+ },
217
+ {
218
+ "id": "solana-token-facts",
219
+ "py": "solana_token_facts",
220
+ "description": "Verifiable on-chain facts about a Solana token mint: whether the mint and freeze authorities are still set, total supply, decimals, token program, and how much of the supply the largest token accounts hold, plus public market metrics from a token index.",
221
+ "priceUsd": 0.01,
222
+ "required": [
223
+ "mint"
224
+ ]
225
+ },
226
+ {
227
+ "id": "solana-token-price",
228
+ "py": "solana_token_price",
229
+ "description": "Current USD price, 24-hour change, liquidity and decimals for up to 50 Solana token mints in one call, from an aggregated market feed.",
230
+ "priceUsd": 0.003,
231
+ "required": [
232
+ "mints"
233
+ ]
234
+ },
235
+ {
236
+ "id": "solana-token-search",
237
+ "py": "solana_token_search",
238
+ "description": "Find Solana tokens by symbol, name or mint address: mint, decimals, verification flag, organic score, liquidity, market cap and holder count.",
239
+ "priceUsd": 0.003,
240
+ "required": [
241
+ "query"
242
+ ]
243
+ },
244
+ {
245
+ "id": "solana-transaction",
246
+ "py": "solana_transaction",
247
+ "description": "Look up a confirmed Solana transaction by signature: success or error, time, fee, signers, programs used, and the resulting SOL and token balance changes per account.",
248
+ "priceUsd": 0.005,
249
+ "required": [
250
+ "signature"
251
+ ]
252
+ },
253
+ {
254
+ "id": "solana-wallet-balances",
255
+ "py": "solana_wallet_balances",
256
+ "description": "SOL balance and token holdings of any Solana address, with symbols, USD prices and values, largest first.",
257
+ "priceUsd": 0.01,
258
+ "required": [
259
+ "address"
260
+ ]
261
+ },
262
+ {
263
+ "id": "tech-stack-lookup",
264
+ "py": "tech_stack_lookup",
265
+ "description": "Detect the technologies a public website uses: CMS or site builder, JavaScript framework, CDN and hosting, web server, analytics and tag managers, advertising pixels, support widgets, payments, consent tools.",
266
+ "priceUsd": 0.005,
267
+ "required": []
268
+ },
269
+ {
270
+ "id": "ted-notices-search",
271
+ "py": "ted_notices_search",
272
+ "description": "Find recent EU public procurement notices by buyer country, CPV code, keyword and notice type.",
273
+ "priceUsd": 0.01,
274
+ "required": []
275
+ },
276
+ {
277
+ "id": "tender-feed",
278
+ "py": "tender_feed",
279
+ "description": "Search public tenders across TED (EU), Find a Tender (UK) and SAM.gov (US) in one normalised schema: title, buyer organisation, country, CPV codes, deadline, estimated value, procurement method and source link.",
280
+ "priceUsd": 0.02,
281
+ "required": []
282
+ },
283
+ {
284
+ "id": "url-metadata",
285
+ "py": "url_metadata",
286
+ "description": "Link-preview data for one or many public URLs: title, description, canonical URL, Open Graph and Twitter card fields, favicon, language, hreflang alternates, feed links and JSON-LD types.",
287
+ "priceUsd": 0.003,
288
+ "required": []
289
+ },
290
+ {
291
+ "id": "url-to-markdown",
292
+ "py": "url_to_markdown",
293
+ "description": "Fetch a public web page and return its main text as Markdown with title, headings, lists, tables and absolute links.",
294
+ "priceUsd": 0.003,
295
+ "required": [
296
+ "url"
297
+ ]
298
+ },
299
+ {
300
+ "id": "us-treasury-rates",
301
+ "py": "us_treasury_rates",
302
+ "description": "Monthly average interest rates on US Treasury marketable securities (bills, notes, bonds, TIPS, FRNs) Latest months first.",
303
+ "priceUsd": 0.003,
304
+ "required": []
305
+ },
306
+ {
307
+ "id": "wikipedia-summary",
308
+ "py": "wikipedia_summary",
309
+ "description": "Lead-section summary of a Wikipedia article by title and language: plain-text extract, short description, canonical URL and last-edit time.",
310
+ "priceUsd": 0.003,
311
+ "required": [
312
+ "title"
313
+ ]
314
+ }
315
+ ]
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: ambolt
3
+ Version: 0.1.0
4
+ Summary: Client for the Ambolt pay-per-call data tools (x402, USDC): electricity, company registers, tenders, FX, DNS, on-chain facts.
5
+ License: MIT
6
+ Project-URL: Homepage, https://ambolt.dev
7
+ Project-URL: Documentation, https://ambolt.dev/docs
8
+ Project-URL: Source, https://github.com/ambolt/ambolt-mcp
9
+ Keywords: x402,mcp,ai-agents,data-api,usdc
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Intended Audience :: Developers
13
+ Requires-Python: >=3.9
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Dynamic: license-file
17
+
18
+ # ambolt
19
+
20
+ Client for [Ambolt](https://ambolt.dev): dated, sourced data lookups as pay-per-call endpoints (x402, USDC). Failed calls are never charged.
21
+
22
+ ```python
23
+ from ambolt import Ambolt
24
+
25
+ ambolt = Ambolt(session=paying_session) # a requests-compatible session that pays x402 challenges
26
+ print(ambolt.iban_validate(iban="DK5000400440116243"))
27
+ print(ambolt.call("dk-electricity-prices", area="DK1"))
28
+ ```
29
+
30
+ Every function is also an MCP tool at `https://api.ambolt.dev/mcp`. Not financial, legal or tax advice.
@@ -0,0 +1,9 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ ambolt/__init__.py
5
+ ambolt/_generated.py
6
+ ambolt.egg-info/PKG-INFO
7
+ ambolt.egg-info/SOURCES.txt
8
+ ambolt.egg-info/dependency_links.txt
9
+ ambolt.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ ambolt
@@ -0,0 +1,22 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "ambolt"
7
+ version = "0.1.0"
8
+ description = "Client for the Ambolt pay-per-call data tools (x402, USDC): electricity, company registers, tenders, FX, DNS, on-chain facts."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT" }
12
+ keywords = ["x402", "mcp", "ai-agents", "data-api", "usdc"]
13
+
14
+ classifiers = ["License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Intended Audience :: Developers"]
15
+
16
+ [project.urls]
17
+ Homepage = "https://ambolt.dev"
18
+ Documentation = "https://ambolt.dev/docs"
19
+ Source = "https://github.com/ambolt/ambolt-mcp"
20
+
21
+ [tool.setuptools]
22
+ packages = ["ambolt"]
ambolt-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+