aistockradars 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.
@@ -0,0 +1,5 @@
1
+ dist/
2
+ .venv/
3
+ __pycache__/
4
+ *.egg-info/
5
+ .pytest_cache/
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ First release.
6
+
7
+ - `find_company`, `company`, `widest_gaps`, `ledger`, `filings`, `capital_events`, `companies`, `me`.
8
+ - Typed errors; `RateLimited` and `ServiceUnavailable` carry the server's `retry_after`. No automatic
9
+ retries.
10
+ - The key is read from `AISTOCKRADARS_API_KEY` when not passed.
11
+ - `ledger()` without a month waits up to 60 seconds; every other call up to 15.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Donatas Juskus
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,229 @@
1
+ Metadata-Version: 2.5
2
+ Name: aistockradars
3
+ Version: 0.1.0
4
+ Summary: Python client for the AIR Stock Discovery API: Discovery Gap bands, AIR Scores and SEC filing facts for US small and mid caps. Research, not tips.
5
+ Project-URL: Homepage, https://www.aistockradars.com
6
+ Project-URL: Documentation, https://www.aistockradars.com/developers
7
+ Project-URL: Changelog, https://github.com/DJuskus1978/aistockradars-python/blob/main/CHANGELOG.md
8
+ Project-URL: Source, https://github.com/DJuskus1978/aistockradars-python
9
+ Project-URL: Issues, https://github.com/DJuskus1978/aistockradars-python/issues
10
+ Author: AIR Stock Discovery
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ Keywords: 8-k,api client,discovery gap,mid cap,sec edgar,sec filings,small cap,stock discovery
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Topic :: Office/Business :: Financial :: Investment
24
+ Classifier: Typing :: Typed
25
+ Requires-Python: >=3.10
26
+ Requires-Dist: httpx<1,>=0.27
27
+ Description-Content-Type: text/markdown
28
+
29
+ # aistockradars
30
+
31
+ The official Python client for the [AIR Stock Discovery](https://www.aistockradars.com) API.
32
+
33
+ AIR reads the SEC filings of US-listed small and mid caps and scores them every trading day. The API
34
+ serves AIR's derived values: the AIR Score with its word and AIR confidence, the Discovery Gap band
35
+ with Gap confidence, five perspectives as rating words, and facts stated in SEC filings. It serves no
36
+ prices.
37
+
38
+ Research, not tips. Not investment advice.
39
+
40
+ ## Install
41
+
42
+ ```bash
43
+ pip install aistockradars
44
+ ```
45
+
46
+ Python 3.10 or newer. One dependency: `httpx`.
47
+
48
+ ## Quick start
49
+
50
+ Create a key under **Account → API** at [www.aistockradars.com](https://www.aistockradars.com/developers),
51
+ then:
52
+
53
+ ```bash
54
+ export AISTOCKRADARS_API_KEY=...
55
+ ```
56
+
57
+ ```python
58
+ from aistockradars import Client
59
+
60
+ with Client() as air:
61
+ for row in air.widest_gaps(limit=5).data:
62
+ print(row["ticker"], "Discovery Gap:", row["gap_band"], f"({row['gap_score']}/100)")
63
+ ```
64
+
65
+ You can also pass the key directly: `Client(api_key="...")`. Keys are shown once, at creation.
66
+
67
+ ## What every call returns
68
+
69
+ Every method returns a `Result`:
70
+
71
+ | Field | What |
72
+ |---|---|
73
+ | `data` | The payload |
74
+ | `meta` | Paging, the snapshot date (`as_of`) or the history window |
75
+ | `disclaimer` | Always `"Research, not investment advice."` |
76
+ | `attribution_required` | `True` when your plan requires attribution |
77
+ | `attribution` | The exact string to show, when `attribution_required` is `True` |
78
+
79
+ **Attribution.** When `attribution_required` is `True`, show the `attribution` string —
80
+ "Source: AIR Stock Discovery — www.aistockradars.com", linked to www.aistockradars.com where
81
+ possible — wherever you use AIR data in public. Which plans require it is listed on
82
+ [/developers](https://www.aistockradars.com/developers).
83
+
84
+ ## Methods
85
+
86
+ ### `find_company(query, limit=10)` — look up a ticker
87
+
88
+ ```python
89
+ res = air.find_company("agilysys")
90
+ for c in res.data:
91
+ print(c["ticker"], c["name"])
92
+ ```
93
+
94
+ Matches the ticker exactly first, then tickers that start with `query`, then names that contain it;
95
+ case-insensitive. The first call reads AIR's full company list (one call per 200 companies, counted
96
+ against your daily limit) and keeps it on the client; later calls on the same client make no calls.
97
+ `find_company(query, refresh=True)` reads the list again.
98
+
99
+ ### `company(ticker)` — one company's current read
100
+
101
+ ```python
102
+ c = air.company("AGYS").data
103
+ gap = c["discovery_gap"]
104
+ print("Discovery Gap:", gap["band"], f"({gap['score']}/100)", "· Gap confidence", gap["confidence"])
105
+ print("AIR Score:", c["air_word"], f"· {c['air_score']} / 100")
106
+ print("AIR confidence", c["overall_confidence"])
107
+ ```
108
+
109
+ A company outside AIR's universe comes back with `status == "not_current"`, a `notice` and no scores.
110
+
111
+ ### `widest_gaps(sector=None, limit=25)` — the Discover ranking by Discovery Gap
112
+
113
+ ```python
114
+ res = air.widest_gaps(sector="BIOTECH", limit=10)
115
+ print("As of", res.meta["as_of"])
116
+ ```
117
+
118
+ `sector` is one of `GENERIC`, `BIOTECH`, `INDUSTRIALS`, `BANKS`, `SOFTWARE_SAAS`, `SEMICONDUCTORS`;
119
+ `limit` is 1–200.
120
+
121
+ ### `filings(ticker, all=False)` — SEC filings on the company's timeline
122
+
123
+ ```python
124
+ for f in air.filings("AGYS").data:
125
+ print(f["filed_at"], f["form"], f["title"])
126
+ ```
127
+
128
+ The last 12 months, newest first; `all=True` for every filing AIR holds.
129
+
130
+ ### `capital_events(ticker, all=False)` — dividend and buyback facts
131
+
132
+ ```python
133
+ ev = air.capital_events("AGYS").data
134
+ for e in ev["events"]:
135
+ print(e["date"], e["line"])
136
+ ```
137
+
138
+ Dividend changes and buyback authorizations stated in 8-K filings, each as one sentence with its
139
+ filing, plus investor days the company announced.
140
+
141
+ ### `ledger(month=None)` — the forward ledger
142
+
143
+ ```python
144
+ for m in air.ledger(month="2026-10").data:
145
+ for e in m["surfaced"]:
146
+ then, now = e["at_surfacing"]["gap_band"], e["now"]["gap_band"]
147
+ print(m["month"], e["ticker"], "then:", then, "now:", now)
148
+ ```
149
+
150
+ Each closed month's top five by Discovery Gap, the read then and the read now. Without `month`, the
151
+ latest 12 closed months — that call can take up to a minute, and the client waits that long for it.
152
+
153
+ ### `companies()` — every company in AIR's universe
154
+
155
+ ```python
156
+ tickers = [c["ticker"] for c in air.companies()]
157
+ ```
158
+
159
+ Iterates the pages, one call per page of up to 200.
160
+
161
+ ### `me()` — your plan, today's usage and limits
162
+
163
+ ```python
164
+ me = air.me().data
165
+ print(me["tier_label"], me["usage_today"], "of", me["limits"]["calls_per_day"], "calls today")
166
+ ```
167
+
168
+ ## Reading the values
169
+
170
+ - **Discovery Gap** band words, highest first: Very high, High, Medium, Low. The figure beside the band is
171
+ the gap score out of 100; **Gap confidence** says how fully AIR could measure the gap.
172
+ - **AIR Score** words: Attractive, Constructive, Neutral, Cautious, Weak, High risk, beside the score out
173
+ of 100; **AIR confidence** is the support behind the whole AIR read. The two confidences are different
174
+ figures — name which one you show.
175
+ - **Perspectives** are rating words only: Very strong, Strong, Balanced, Watch, Weak.
176
+
177
+ ## Limits and errors
178
+
179
+ Each account has a per-second limit and a daily limit, shared by all of its keys; the daily limit
180
+ resets at 00:00 UTC. Your current limits: `air.me()`. Refused calls are not counted.
181
+
182
+ All errors subclass `AirError` and carry the API's `status`, `code` and `message`. The client never
183
+ retries on its own; retrying is your choice.
184
+
185
+ | Error | When |
186
+ |---|---|
187
+ | `AuthError` | 401: key missing, unknown or revoked (`missing_key`, `invalid_key`, `revoked_key`) |
188
+ | `TierError` | 403: the call is not on your plan (`forbidden_tier`) |
189
+ | `NotFound` | 404: no such company or closed ledger month |
190
+ | `BadRequest` | 400: a parameter was rejected (the message names it) |
191
+ | `RateLimited` | 429: `retry_after` is the server's wait in seconds; `daily` is `True` when the daily limit is spent (`daily_limit`), `False` for the per-second limit (`rate_limited`) |
192
+ | `ServiceUnavailable` | 5xx, timeout or network failure; `retry_after` when the server sends one |
193
+
194
+ ```python
195
+ import time
196
+ from aistockradars import RateLimited
197
+
198
+ try:
199
+ res = air.widest_gaps()
200
+ except RateLimited as e:
201
+ if not e.daily:
202
+ time.sleep(e.retry_after or 1)
203
+ res = air.widest_gaps()
204
+ ```
205
+
206
+ ## Versioning
207
+
208
+ The API's v1 only adds: new fields and enum values may appear at any time, so ignore fields you do not
209
+ know. The client follows semantic versioning. The full schema is the OpenAPI document at
210
+ <https://www.aistockradars.com/api/v1/openapi.json>.
211
+
212
+ ## Other ways to use AIR
213
+
214
+ - **In Claude:** the AIR connector, read-only, no sign-in — `https://mcp.aistockradars.com/mcp`.
215
+ - **On a website:** [AIStockRadars Stock Discovery Widgets](https://wordpress.org/plugins/aistockradars-stock-discovery-widgets/)
216
+ for WordPress, and embeddable widgets at <https://www.aistockradars.com/widgets>.
217
+
218
+ ## Links
219
+
220
+ - API documentation and plans: <https://www.aistockradars.com/developers>
221
+ - Trust and security: <https://www.aistockradars.com/trust>
222
+ - API Terms: <https://www.aistockradars.com/terms#api-terms>
223
+ - Privacy: <https://www.aistockradars.com/privacy>
224
+ - Issues: <https://github.com/DJuskus1978/aistockradars-python/issues>
225
+ - Changelog: [CHANGELOG.md](https://github.com/DJuskus1978/aistockradars-python/blob/main/CHANGELOG.md)
226
+
227
+ MIT licensed.
228
+
229
+ Source: AIR Stock Discovery — www.aistockradars.com
@@ -0,0 +1,201 @@
1
+ # aistockradars
2
+
3
+ The official Python client for the [AIR Stock Discovery](https://www.aistockradars.com) API.
4
+
5
+ AIR reads the SEC filings of US-listed small and mid caps and scores them every trading day. The API
6
+ serves AIR's derived values: the AIR Score with its word and AIR confidence, the Discovery Gap band
7
+ with Gap confidence, five perspectives as rating words, and facts stated in SEC filings. It serves no
8
+ prices.
9
+
10
+ Research, not tips. Not investment advice.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ pip install aistockradars
16
+ ```
17
+
18
+ Python 3.10 or newer. One dependency: `httpx`.
19
+
20
+ ## Quick start
21
+
22
+ Create a key under **Account → API** at [www.aistockradars.com](https://www.aistockradars.com/developers),
23
+ then:
24
+
25
+ ```bash
26
+ export AISTOCKRADARS_API_KEY=...
27
+ ```
28
+
29
+ ```python
30
+ from aistockradars import Client
31
+
32
+ with Client() as air:
33
+ for row in air.widest_gaps(limit=5).data:
34
+ print(row["ticker"], "Discovery Gap:", row["gap_band"], f"({row['gap_score']}/100)")
35
+ ```
36
+
37
+ You can also pass the key directly: `Client(api_key="...")`. Keys are shown once, at creation.
38
+
39
+ ## What every call returns
40
+
41
+ Every method returns a `Result`:
42
+
43
+ | Field | What |
44
+ |---|---|
45
+ | `data` | The payload |
46
+ | `meta` | Paging, the snapshot date (`as_of`) or the history window |
47
+ | `disclaimer` | Always `"Research, not investment advice."` |
48
+ | `attribution_required` | `True` when your plan requires attribution |
49
+ | `attribution` | The exact string to show, when `attribution_required` is `True` |
50
+
51
+ **Attribution.** When `attribution_required` is `True`, show the `attribution` string —
52
+ "Source: AIR Stock Discovery — www.aistockradars.com", linked to www.aistockradars.com where
53
+ possible — wherever you use AIR data in public. Which plans require it is listed on
54
+ [/developers](https://www.aistockradars.com/developers).
55
+
56
+ ## Methods
57
+
58
+ ### `find_company(query, limit=10)` — look up a ticker
59
+
60
+ ```python
61
+ res = air.find_company("agilysys")
62
+ for c in res.data:
63
+ print(c["ticker"], c["name"])
64
+ ```
65
+
66
+ Matches the ticker exactly first, then tickers that start with `query`, then names that contain it;
67
+ case-insensitive. The first call reads AIR's full company list (one call per 200 companies, counted
68
+ against your daily limit) and keeps it on the client; later calls on the same client make no calls.
69
+ `find_company(query, refresh=True)` reads the list again.
70
+
71
+ ### `company(ticker)` — one company's current read
72
+
73
+ ```python
74
+ c = air.company("AGYS").data
75
+ gap = c["discovery_gap"]
76
+ print("Discovery Gap:", gap["band"], f"({gap['score']}/100)", "· Gap confidence", gap["confidence"])
77
+ print("AIR Score:", c["air_word"], f"· {c['air_score']} / 100")
78
+ print("AIR confidence", c["overall_confidence"])
79
+ ```
80
+
81
+ A company outside AIR's universe comes back with `status == "not_current"`, a `notice` and no scores.
82
+
83
+ ### `widest_gaps(sector=None, limit=25)` — the Discover ranking by Discovery Gap
84
+
85
+ ```python
86
+ res = air.widest_gaps(sector="BIOTECH", limit=10)
87
+ print("As of", res.meta["as_of"])
88
+ ```
89
+
90
+ `sector` is one of `GENERIC`, `BIOTECH`, `INDUSTRIALS`, `BANKS`, `SOFTWARE_SAAS`, `SEMICONDUCTORS`;
91
+ `limit` is 1–200.
92
+
93
+ ### `filings(ticker, all=False)` — SEC filings on the company's timeline
94
+
95
+ ```python
96
+ for f in air.filings("AGYS").data:
97
+ print(f["filed_at"], f["form"], f["title"])
98
+ ```
99
+
100
+ The last 12 months, newest first; `all=True` for every filing AIR holds.
101
+
102
+ ### `capital_events(ticker, all=False)` — dividend and buyback facts
103
+
104
+ ```python
105
+ ev = air.capital_events("AGYS").data
106
+ for e in ev["events"]:
107
+ print(e["date"], e["line"])
108
+ ```
109
+
110
+ Dividend changes and buyback authorizations stated in 8-K filings, each as one sentence with its
111
+ filing, plus investor days the company announced.
112
+
113
+ ### `ledger(month=None)` — the forward ledger
114
+
115
+ ```python
116
+ for m in air.ledger(month="2026-10").data:
117
+ for e in m["surfaced"]:
118
+ then, now = e["at_surfacing"]["gap_band"], e["now"]["gap_band"]
119
+ print(m["month"], e["ticker"], "then:", then, "now:", now)
120
+ ```
121
+
122
+ Each closed month's top five by Discovery Gap, the read then and the read now. Without `month`, the
123
+ latest 12 closed months — that call can take up to a minute, and the client waits that long for it.
124
+
125
+ ### `companies()` — every company in AIR's universe
126
+
127
+ ```python
128
+ tickers = [c["ticker"] for c in air.companies()]
129
+ ```
130
+
131
+ Iterates the pages, one call per page of up to 200.
132
+
133
+ ### `me()` — your plan, today's usage and limits
134
+
135
+ ```python
136
+ me = air.me().data
137
+ print(me["tier_label"], me["usage_today"], "of", me["limits"]["calls_per_day"], "calls today")
138
+ ```
139
+
140
+ ## Reading the values
141
+
142
+ - **Discovery Gap** band words, highest first: Very high, High, Medium, Low. The figure beside the band is
143
+ the gap score out of 100; **Gap confidence** says how fully AIR could measure the gap.
144
+ - **AIR Score** words: Attractive, Constructive, Neutral, Cautious, Weak, High risk, beside the score out
145
+ of 100; **AIR confidence** is the support behind the whole AIR read. The two confidences are different
146
+ figures — name which one you show.
147
+ - **Perspectives** are rating words only: Very strong, Strong, Balanced, Watch, Weak.
148
+
149
+ ## Limits and errors
150
+
151
+ Each account has a per-second limit and a daily limit, shared by all of its keys; the daily limit
152
+ resets at 00:00 UTC. Your current limits: `air.me()`. Refused calls are not counted.
153
+
154
+ All errors subclass `AirError` and carry the API's `status`, `code` and `message`. The client never
155
+ retries on its own; retrying is your choice.
156
+
157
+ | Error | When |
158
+ |---|---|
159
+ | `AuthError` | 401: key missing, unknown or revoked (`missing_key`, `invalid_key`, `revoked_key`) |
160
+ | `TierError` | 403: the call is not on your plan (`forbidden_tier`) |
161
+ | `NotFound` | 404: no such company or closed ledger month |
162
+ | `BadRequest` | 400: a parameter was rejected (the message names it) |
163
+ | `RateLimited` | 429: `retry_after` is the server's wait in seconds; `daily` is `True` when the daily limit is spent (`daily_limit`), `False` for the per-second limit (`rate_limited`) |
164
+ | `ServiceUnavailable` | 5xx, timeout or network failure; `retry_after` when the server sends one |
165
+
166
+ ```python
167
+ import time
168
+ from aistockradars import RateLimited
169
+
170
+ try:
171
+ res = air.widest_gaps()
172
+ except RateLimited as e:
173
+ if not e.daily:
174
+ time.sleep(e.retry_after or 1)
175
+ res = air.widest_gaps()
176
+ ```
177
+
178
+ ## Versioning
179
+
180
+ The API's v1 only adds: new fields and enum values may appear at any time, so ignore fields you do not
181
+ know. The client follows semantic versioning. The full schema is the OpenAPI document at
182
+ <https://www.aistockradars.com/api/v1/openapi.json>.
183
+
184
+ ## Other ways to use AIR
185
+
186
+ - **In Claude:** the AIR connector, read-only, no sign-in — `https://mcp.aistockradars.com/mcp`.
187
+ - **On a website:** [AIStockRadars Stock Discovery Widgets](https://wordpress.org/plugins/aistockradars-stock-discovery-widgets/)
188
+ for WordPress, and embeddable widgets at <https://www.aistockradars.com/widgets>.
189
+
190
+ ## Links
191
+
192
+ - API documentation and plans: <https://www.aistockradars.com/developers>
193
+ - Trust and security: <https://www.aistockradars.com/trust>
194
+ - API Terms: <https://www.aistockradars.com/terms#api-terms>
195
+ - Privacy: <https://www.aistockradars.com/privacy>
196
+ - Issues: <https://github.com/DJuskus1978/aistockradars-python/issues>
197
+ - Changelog: [CHANGELOG.md](https://github.com/DJuskus1978/aistockradars-python/blob/main/CHANGELOG.md)
198
+
199
+ MIT licensed.
200
+
201
+ Source: AIR Stock Discovery — www.aistockradars.com
@@ -0,0 +1,36 @@
1
+ """Print one company's AIR read and its latest SEC filings.
2
+
3
+ python examples/company_reading.py AGYS
4
+ """
5
+
6
+ import sys
7
+
8
+ from aistockradars import Client, NotFound
9
+
10
+ ticker = sys.argv[1] if len(sys.argv) > 1 else "AGYS"
11
+
12
+ with Client() as air:
13
+ try:
14
+ c = air.company(ticker).data
15
+ except NotFound as err:
16
+ sys.exit(err.message)
17
+ print(f"{c['name']} ({c['ticker']}) · {c['sector']['label']}")
18
+ if c["status"] != "current":
19
+ print(c["notice"])
20
+ sys.exit(0)
21
+ gap = c["discovery_gap"] or {}
22
+ print(f"AIR Score: {c['air_score']} / 100 · AIR confidence {c['overall_confidence']} / 100")
23
+ print(
24
+ f"Discovery Gap: {gap.get('band') or '—'} ({gap.get('score', '—')}/100) · "
25
+ f"Gap confidence {gap.get('confidence', '—')}/100"
26
+ )
27
+ for p in c["perspectives"] or []:
28
+ print(f"- {p['label']}: {p['rating'] or p['not_scored_reason']}")
29
+
30
+ res = air.filings(ticker)
31
+ print(f"\nLatest SEC filings ({len(res.data)} in the last 12 months):")
32
+ for f in res.data[:5]:
33
+ print(f"- {f['filed_at']} · Form {f['form']} — {f['title']}")
34
+ print(res.disclaimer)
35
+ if res.attribution:
36
+ print(res.attribution)
@@ -0,0 +1,23 @@
1
+ """Print AIR's forward ledger: each closed month's top five, then and now.
2
+
3
+ python examples/ledger.py # the latest 12 closed months
4
+ python examples/ledger.py 2026-10 # one month
5
+ """
6
+
7
+ import sys
8
+
9
+ from aistockradars import Client
10
+
11
+ with Client() as air:
12
+ res = air.ledger(sys.argv[1] if len(sys.argv) > 1 else None)
13
+ for month in res.data:
14
+ print(f"\n{month['month']} (last snapshot {month['month_end_as_of']})")
15
+ for e in month["surfaced"]:
16
+ then, now = e["at_surfacing"], e["now"]
17
+ line = f"- {e['name']} ({e['ticker']}): then Discovery Gap: {then['gap_band']}"
18
+ if now:
19
+ line += f"; now Discovery Gap: {now['gap_band']}"
20
+ print(line)
21
+ print(res.disclaimer)
22
+ if res.attribution:
23
+ print(res.attribution)
@@ -0,0 +1,21 @@
1
+ """Print today's ten widest Discovery Gaps with their labelled figures.
2
+
3
+ export AISTOCKRADARS_API_KEY=... # Account → API at www.aistockradars.com
4
+ python examples/widest_gaps.py
5
+ """
6
+
7
+ from aistockradars import Client
8
+
9
+ with Client() as air:
10
+ res = air.widest_gaps(limit=10)
11
+ print(f"Widest Discovery Gaps as of {res.meta.get('as_of')}")
12
+ for row in res.data:
13
+ print(
14
+ f"{row['rank']}. {row['name']} ({row['ticker']}) — "
15
+ f"Discovery Gap: {row['gap_band']} ({row['gap_score']}/100) · "
16
+ f"AIR Score: {row['air_word']} · {row['air_score']} / 100 · "
17
+ f"AIR confidence {row['confidence']} / 100"
18
+ )
19
+ print(res.disclaimer)
20
+ if res.attribution:
21
+ print(res.attribution)
@@ -0,0 +1,65 @@
1
+ [project]
2
+ name = "aistockradars"
3
+ version = "0.1.0"
4
+ description = "Python client for the AIR Stock Discovery API: Discovery Gap bands, AIR Scores and SEC filing facts for US small and mid caps. Research, not tips."
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ license = "MIT"
8
+ license-files = ["LICENSE"]
9
+ authors = [{ name = "AIR Stock Discovery" }]
10
+ dependencies = ["httpx>=0.27,<1"]
11
+ keywords = [
12
+ "sec filings",
13
+ "stock discovery",
14
+ "8-k",
15
+ "small cap",
16
+ "mid cap",
17
+ "discovery gap",
18
+ "sec edgar",
19
+ "api client",
20
+ ]
21
+ classifiers = [
22
+ "Development Status :: 4 - Beta",
23
+ "Intended Audience :: Developers",
24
+ "Operating System :: OS Independent",
25
+ "Programming Language :: Python :: 3",
26
+ "Programming Language :: Python :: 3 :: Only",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Programming Language :: Python :: 3.13",
31
+ "Topic :: Office/Business :: Financial :: Investment",
32
+ "Typing :: Typed",
33
+ ]
34
+
35
+ [project.urls]
36
+ Homepage = "https://www.aistockradars.com"
37
+ Documentation = "https://www.aistockradars.com/developers"
38
+ Changelog = "https://github.com/DJuskus1978/aistockradars-python/blob/main/CHANGELOG.md"
39
+ Source = "https://github.com/DJuskus1978/aistockradars-python"
40
+ Issues = "https://github.com/DJuskus1978/aistockradars-python/issues"
41
+
42
+ [dependency-groups]
43
+ dev = ["pytest>=8"]
44
+
45
+ [build-system]
46
+ requires = ["hatchling>=1.26"]
47
+ build-backend = "hatchling.build"
48
+
49
+ [tool.hatch.build.targets.wheel]
50
+ packages = ["src/aistockradars"]
51
+
52
+ # The sdist carries the package, its tests and docs; never scripts/ (the live
53
+ # smoke test) or anything else in the folder.
54
+ [tool.hatch.build.targets.sdist]
55
+ include = ["src", "tests", "examples", "README.md", "LICENSE", "CHANGELOG.md"]
56
+
57
+ [tool.pytest.ini_options]
58
+ testpaths = ["tests"]
59
+
60
+ [tool.ruff]
61
+ line-length = 100
62
+ target-version = "py310"
63
+
64
+ [tool.ruff.lint]
65
+ select = ["E", "F", "W", "I", "UP", "B", "SIM"]
@@ -0,0 +1,34 @@
1
+ """Python client for the AIR Stock Discovery API.
2
+
3
+ Research, not tips. Not investment advice.
4
+ Source: AIR Stock Discovery — www.aistockradars.com
5
+ """
6
+
7
+ from ._copy import API_DISCLAIMER, DATA_ATTRIBUTION
8
+ from ._version import __version__
9
+ from .client import DEFAULT_BASE_URL, Client, Result
10
+ from .errors import (
11
+ AirError,
12
+ AuthError,
13
+ BadRequest,
14
+ NotFound,
15
+ RateLimited,
16
+ ServiceUnavailable,
17
+ TierError,
18
+ )
19
+
20
+ __all__ = [
21
+ "API_DISCLAIMER",
22
+ "DATA_ATTRIBUTION",
23
+ "DEFAULT_BASE_URL",
24
+ "AirError",
25
+ "AuthError",
26
+ "BadRequest",
27
+ "Client",
28
+ "NotFound",
29
+ "RateLimited",
30
+ "Result",
31
+ "ServiceUnavailable",
32
+ "TierError",
33
+ "__version__",
34
+ ]
@@ -0,0 +1,9 @@
1
+ """Strings the SDK states about AIR's data.
2
+
3
+ Copies of apps/web/lib/copy/product-facts.ts in the AIR monorepo, pinned
4
+ there by apps/web/tests/mcp-1-parity.test.ts.
5
+ """
6
+
7
+ DATA_ATTRIBUTION = "Source: AIR Stock Discovery — www.aistockradars.com"
8
+ API_DISCLAIMER = "Research, not investment advice."
9
+ RESEARCH_NOT_TIPS = "Research, not tips."
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"