tensorfeed 1.2.0__tar.gz → 1.16.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.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tensorfeed
3
- Version: 1.2.0
4
- Summary: Python SDK for the TensorFeed.ai API: AI news, status, model pricing, and agent-payable premium routing (USDC on Base, optional auto-send via web3)
3
+ Version: 1.16.0
4
+ Summary: Python SDK for the TensorFeed.ai API: AI news, status, model pricing, premium routing + history series + webhook watches, agent payments via USDC on Base (optional web3 auto-send)
5
5
  Author-email: "TensorFeed.ai" <feedback@tensorfeed.ai>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://tensorfeed.ai
@@ -24,6 +24,12 @@ Description-Content-Type: text/markdown
24
24
  Provides-Extra: web3
25
25
  Requires-Dist: web3>=6.0; extra == "web3"
26
26
  Requires-Dist: eth-account>=0.10; extra == "web3"
27
+ Provides-Extra: langchain
28
+ Requires-Dist: langchain-core>=0.3; extra == "langchain"
29
+ Provides-Extra: llamaindex
30
+ Requires-Dist: llama-index-core>=0.11; extra == "llamaindex"
31
+ Provides-Extra: crewai
32
+ Requires-Dist: crewai>=0.70; extra == "crewai"
27
33
 
28
34
  # tensorfeed
29
35
 
@@ -102,6 +108,46 @@ rec = tf.routing(
102
108
  weights={"quality": 0.6, "cost": 0.3, "availability": 0.1, "latency": 0.0},
103
109
  )
104
110
 
111
+ # Premium history series (1 credit each, range default = last 30 days, max 90)
112
+ prices = tf.pricing_series(model="Claude Opus 4.7")
113
+ print(f'Price changed {prices["summary"]["delta_pct_blended"]}% over the window')
114
+
115
+ scores = tf.benchmark_series(model="Claude Opus 4.7", benchmark="swe_bench")
116
+ print(f'SWE-bench moved {scores["summary"]["delta_pp"]} pp')
117
+
118
+ uptime = tf.status_uptime(provider="anthropic")
119
+ print(f'Anthropic uptime: {uptime["uptime_pct"]}% over {uptime["days_with_data"]} days')
120
+
121
+ diff = tf.history_compare(
122
+ from_date="2026-04-01", to_date="2026-04-27", snapshot_type="pricing",
123
+ )
124
+ print(f'{len(diff["changed"])} price changes, {len(diff["added"])} new models')
125
+
126
+ # Premium webhook watches (1 credit per registration, free reads)
127
+ created = tf.create_watch(
128
+ spec={
129
+ "type": "price",
130
+ "model": "Claude Opus 4.7",
131
+ "field": "blended",
132
+ "op": "lt",
133
+ "threshold": 30,
134
+ },
135
+ callback_url="https://agent.example.com/hook",
136
+ secret="any-shared-secret", # used to sign deliveries
137
+ )
138
+ watch_id = created["watch"]["id"]
139
+ print(f"Watch {watch_id} active until {created['watch']['expires_at']}")
140
+
141
+ # When a delivery arrives, verify it:
142
+ # sig = request.headers["X-TensorFeed-Signature"] # "sha256=<hex>"
143
+ # import hmac, hashlib
144
+ # expected = "sha256=" + hmac.new(b"any-shared-secret", body, hashlib.sha256).hexdigest()
145
+ # assert hmac.compare_digest(sig, expected)
146
+
147
+ print(tf.list_watches()) # see all your active watches
148
+ print(tf.get_watch(watch_id)) # check fire_count, last_fired_at
149
+ tf.delete_watch(watch_id) # remove when done
150
+
105
151
  # Check remaining credits
106
152
  print(tf.balance())
107
153
  ```
@@ -197,7 +243,24 @@ except TensorFeedError as e:
197
243
  | Method | Cost | Description |
198
244
  |--------|------|-------------|
199
245
  | `tf.balance()` | Free | Check remaining credits |
246
+ | `tf.usage()` | Free | Per-token call history (last 100 calls aggregated by endpoint) |
200
247
  | `tf.routing(task=, budget=, top_n=, weights=)` | 1 credit | Top-N ranked routing with full detail |
248
+ | `tf.pricing_series(model=, from_date=, to_date=)` | 1 credit | Daily price points for one model with min/max/delta summary |
249
+ | `tf.benchmark_series(model=, benchmark=, from_date=, to_date=)` | 1 credit | Score evolution for a benchmark on one model, returns delta_pp |
250
+ | `tf.status_uptime(provider=, from_date=, to_date=)` | 1 credit | Uptime % per provider with incident days (degraded = half) |
251
+ | `tf.history_compare(from_date=, to_date=, snapshot_type=)` | 1 credit | Diff two snapshots: added, removed, changed entries with deltas |
252
+ | `tf.create_watch(spec=, callback_url=, secret=, fire_cap=)` | 1 credit | Register a webhook watch (price / status / digest) |
253
+ | `tf.create_digest_watch(cadence=, callback_url=, secret=, fire_cap=)` | 1 credit | Convenience: scheduled daily/weekly digest of pricing changes |
254
+ | `tf.list_watches()` | Free | List all active watches owned by the current token |
255
+ | `tf.get_watch(watch_id)` | Free | Read one watch including fire_count and last_fired_at |
256
+ | `tf.delete_watch(watch_id)` | Free | Remove an owned watch |
257
+ | `tf.premium_agents_directory(category=, status=, sort=, limit=, ...)` | 1 credit | Enriched directory: status, news, traffic, pricing, trending_score per agent |
258
+ | `tf.news_search(q=, from_date=, to_date=, provider=, category=, limit=)` | 1 credit | Full-text news search with date/provider filters, relevance scoring, recency boost |
259
+ | `tf.cost_projection(models=, input_tokens_per_day=, output_tokens_per_day=, horizon=)` | 1 credit | Project workload cost across 1-10 models, 4 horizons, cheapest-monthly ranking |
260
+ | `tf.forecast(target=, model=, field=, benchmark=, lookback=, horizon=)` | 1 credit | Linear-regression forecast for a price or benchmark series with 95% CI and confidence label |
261
+ | `tf.provider_deepdive(provider)` | 1 credit | One provider's full profile: status + all models + benchmarks joined + news + traffic |
262
+ | `tf.compare_models(ids=)` | 1 credit | Side-by-side compare of 2-5 models with normalized benchmarks + rankings |
263
+ | `tf.whats_new(days=, news_limit=)` | 1 credit | Agent morning brief: pricing changes + incidents + top news from last 1-7 days |
201
264
 
202
265
  ### Auto-send (requires `tensorfeed[web3]`)
203
266
 
@@ -220,11 +283,15 @@ If any source disagrees, do not send.
220
283
 
221
284
  ## Premium Data Terms
222
285
 
223
- Premium API responses are licensed for inference use only. Use of TensorFeed premium data for training, fine-tuning, evaluation, or distillation of ML models is prohibited.
286
+ Premium API responses are licensed for inference use only. Use of TensorFeed premium data for training, fine-tuning, evaluation, or distillation of ML models is prohibited (Section 17.1 of the [Terms](https://tensorfeed.ai/terms#premium)).
287
+
288
+ ## No refunds; credits do not expire
289
+
290
+ All credit purchases are final and non-refundable per Section 17.5 of the [Terms](https://tensorfeed.ai/terms#premium). Credits never expire and are jointly redeemable on tensorfeed.ai and terminalfeed.io. The recommended pattern is to buy in small increments (for example, $1 USDC for 50 credits) until call volume is calibrated, then top up as needed.
224
291
 
225
- ## Refunds
292
+ ## Sanctions
226
293
 
227
- Email `evan@tensorfeed.ai` with the tx hash within 24 hours of the charge for a manual USDC refund.
294
+ Premium API access is unavailable to persons or entities subject to OFAC, EU, UK, or UN sanctions, and to residents of comprehensively sanctioned jurisdictions (Cuba, Iran, North Korea, Syria, Crimea, Donetsk, Luhansk). Inbound credit-purchase transactions are screened against the Chainalysis public sanctions API. See Section 17.9 of the [Terms](https://tensorfeed.ai/terms#premium).
228
295
 
229
296
  ## Links
230
297
 
@@ -75,6 +75,46 @@ rec = tf.routing(
75
75
  weights={"quality": 0.6, "cost": 0.3, "availability": 0.1, "latency": 0.0},
76
76
  )
77
77
 
78
+ # Premium history series (1 credit each, range default = last 30 days, max 90)
79
+ prices = tf.pricing_series(model="Claude Opus 4.7")
80
+ print(f'Price changed {prices["summary"]["delta_pct_blended"]}% over the window')
81
+
82
+ scores = tf.benchmark_series(model="Claude Opus 4.7", benchmark="swe_bench")
83
+ print(f'SWE-bench moved {scores["summary"]["delta_pp"]} pp')
84
+
85
+ uptime = tf.status_uptime(provider="anthropic")
86
+ print(f'Anthropic uptime: {uptime["uptime_pct"]}% over {uptime["days_with_data"]} days')
87
+
88
+ diff = tf.history_compare(
89
+ from_date="2026-04-01", to_date="2026-04-27", snapshot_type="pricing",
90
+ )
91
+ print(f'{len(diff["changed"])} price changes, {len(diff["added"])} new models')
92
+
93
+ # Premium webhook watches (1 credit per registration, free reads)
94
+ created = tf.create_watch(
95
+ spec={
96
+ "type": "price",
97
+ "model": "Claude Opus 4.7",
98
+ "field": "blended",
99
+ "op": "lt",
100
+ "threshold": 30,
101
+ },
102
+ callback_url="https://agent.example.com/hook",
103
+ secret="any-shared-secret", # used to sign deliveries
104
+ )
105
+ watch_id = created["watch"]["id"]
106
+ print(f"Watch {watch_id} active until {created['watch']['expires_at']}")
107
+
108
+ # When a delivery arrives, verify it:
109
+ # sig = request.headers["X-TensorFeed-Signature"] # "sha256=<hex>"
110
+ # import hmac, hashlib
111
+ # expected = "sha256=" + hmac.new(b"any-shared-secret", body, hashlib.sha256).hexdigest()
112
+ # assert hmac.compare_digest(sig, expected)
113
+
114
+ print(tf.list_watches()) # see all your active watches
115
+ print(tf.get_watch(watch_id)) # check fire_count, last_fired_at
116
+ tf.delete_watch(watch_id) # remove when done
117
+
78
118
  # Check remaining credits
79
119
  print(tf.balance())
80
120
  ```
@@ -170,7 +210,24 @@ except TensorFeedError as e:
170
210
  | Method | Cost | Description |
171
211
  |--------|------|-------------|
172
212
  | `tf.balance()` | Free | Check remaining credits |
213
+ | `tf.usage()` | Free | Per-token call history (last 100 calls aggregated by endpoint) |
173
214
  | `tf.routing(task=, budget=, top_n=, weights=)` | 1 credit | Top-N ranked routing with full detail |
215
+ | `tf.pricing_series(model=, from_date=, to_date=)` | 1 credit | Daily price points for one model with min/max/delta summary |
216
+ | `tf.benchmark_series(model=, benchmark=, from_date=, to_date=)` | 1 credit | Score evolution for a benchmark on one model, returns delta_pp |
217
+ | `tf.status_uptime(provider=, from_date=, to_date=)` | 1 credit | Uptime % per provider with incident days (degraded = half) |
218
+ | `tf.history_compare(from_date=, to_date=, snapshot_type=)` | 1 credit | Diff two snapshots: added, removed, changed entries with deltas |
219
+ | `tf.create_watch(spec=, callback_url=, secret=, fire_cap=)` | 1 credit | Register a webhook watch (price / status / digest) |
220
+ | `tf.create_digest_watch(cadence=, callback_url=, secret=, fire_cap=)` | 1 credit | Convenience: scheduled daily/weekly digest of pricing changes |
221
+ | `tf.list_watches()` | Free | List all active watches owned by the current token |
222
+ | `tf.get_watch(watch_id)` | Free | Read one watch including fire_count and last_fired_at |
223
+ | `tf.delete_watch(watch_id)` | Free | Remove an owned watch |
224
+ | `tf.premium_agents_directory(category=, status=, sort=, limit=, ...)` | 1 credit | Enriched directory: status, news, traffic, pricing, trending_score per agent |
225
+ | `tf.news_search(q=, from_date=, to_date=, provider=, category=, limit=)` | 1 credit | Full-text news search with date/provider filters, relevance scoring, recency boost |
226
+ | `tf.cost_projection(models=, input_tokens_per_day=, output_tokens_per_day=, horizon=)` | 1 credit | Project workload cost across 1-10 models, 4 horizons, cheapest-monthly ranking |
227
+ | `tf.forecast(target=, model=, field=, benchmark=, lookback=, horizon=)` | 1 credit | Linear-regression forecast for a price or benchmark series with 95% CI and confidence label |
228
+ | `tf.provider_deepdive(provider)` | 1 credit | One provider's full profile: status + all models + benchmarks joined + news + traffic |
229
+ | `tf.compare_models(ids=)` | 1 credit | Side-by-side compare of 2-5 models with normalized benchmarks + rankings |
230
+ | `tf.whats_new(days=, news_limit=)` | 1 credit | Agent morning brief: pricing changes + incidents + top news from last 1-7 days |
174
231
 
175
232
  ### Auto-send (requires `tensorfeed[web3]`)
176
233
 
@@ -193,11 +250,15 @@ If any source disagrees, do not send.
193
250
 
194
251
  ## Premium Data Terms
195
252
 
196
- Premium API responses are licensed for inference use only. Use of TensorFeed premium data for training, fine-tuning, evaluation, or distillation of ML models is prohibited.
253
+ Premium API responses are licensed for inference use only. Use of TensorFeed premium data for training, fine-tuning, evaluation, or distillation of ML models is prohibited (Section 17.1 of the [Terms](https://tensorfeed.ai/terms#premium)).
254
+
255
+ ## No refunds; credits do not expire
256
+
257
+ All credit purchases are final and non-refundable per Section 17.5 of the [Terms](https://tensorfeed.ai/terms#premium). Credits never expire and are jointly redeemable on tensorfeed.ai and terminalfeed.io. The recommended pattern is to buy in small increments (for example, $1 USDC for 50 credits) until call volume is calibrated, then top up as needed.
197
258
 
198
- ## Refunds
259
+ ## Sanctions
199
260
 
200
- Email `evan@tensorfeed.ai` with the tx hash within 24 hours of the charge for a manual USDC refund.
261
+ Premium API access is unavailable to persons or entities subject to OFAC, EU, UK, or UN sanctions, and to residents of comprehensively sanctioned jurisdictions (Cuba, Iran, North Korea, Syria, Crimea, Donetsk, Luhansk). Inbound credit-purchase transactions are screened against the Chainalysis public sanctions API. See Section 17.9 of the [Terms](https://tensorfeed.ai/terms#premium).
201
262
 
202
263
  ## Links
203
264
 
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tensorfeed"
7
- version = "1.2.0"
8
- description = "Python SDK for the TensorFeed.ai API: AI news, status, model pricing, and agent-payable premium routing (USDC on Base, optional auto-send via web3)"
7
+ version = "1.16.0"
8
+ description = "Python SDK for the TensorFeed.ai API: AI news, status, model pricing, premium routing + history series + webhook watches, agent payments via USDC on Base (optional web3 auto-send)"
9
9
  readme = "README.md"
10
10
  license = "MIT"
11
11
  requires-python = ">=3.9"
@@ -41,6 +41,21 @@ web3 = [
41
41
  "web3>=6.0",
42
42
  "eth-account>=0.10",
43
43
  ]
44
+ # pip install 'tensorfeed[langchain]' to enable tensorfeed.langchain
45
+ # (StructuredTool wrappers + Document loader for AI news).
46
+ langchain = [
47
+ "langchain-core>=0.3",
48
+ ]
49
+ # pip install 'tensorfeed[llamaindex]' to enable tensorfeed.llamaindex
50
+ # (BaseReader implementations for news and the attention index).
51
+ llamaindex = [
52
+ "llama-index-core>=0.11",
53
+ ]
54
+ # pip install 'tensorfeed[crewai]' to enable tensorfeed.crewai
55
+ # (BaseTool wrappers for news, status, attention, harnesses, routing).
56
+ crewai = [
57
+ "crewai>=0.70",
58
+ ]
44
59
 
45
60
  [project.urls]
46
61
  Homepage = "https://tensorfeed.ai"
@@ -21,4 +21,4 @@ __all__ = [
21
21
  "PaymentRequired",
22
22
  "RateLimited",
23
23
  ]
24
- __version__ = "1.2.0"
24
+ __version__ = "1.16.0"