finbrain-python 0.3.0__tar.gz → 0.3.1__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.
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/CHANGELOG.md +6 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/PKG-INFO +1 -1
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/app_ratings.py +14 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain_python.egg-info/PKG-INFO +1 -1
- finbrain_python-0.3.1/src/finbrain_python.egg-info/scm_version.json +8 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_app_ratings.py +38 -0
- finbrain_python-0.3.0/src/finbrain_python.egg-info/scm_version.json +0 -8
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/.gitattributes +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/.github/workflows/ci.yml +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/.github/workflows/release.yml +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/.gitignore +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/LICENSE +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/README.md +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/RELEASE.md +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/examples/async_example.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/examples/transactions_plotting_example.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/pyproject.toml +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/setup.cfg +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/__init__.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/__init__.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/client.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/__init__.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/_utils.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/analyst_ratings.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/app_ratings.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/available.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/corporate_lobbying.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/government_contracts.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/house_trades.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/insider_transactions.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/linkedin_data.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/news.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/options.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/patent_filings.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/predictions.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/recent.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/reddit_mentions.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/screener.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/senate_trades.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/sentiments.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/client.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/__init__.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/_utils.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/analyst_ratings.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/available.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/corporate_lobbying.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/government_contracts.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/house_trades.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/insider_transactions.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/linkedin_data.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/news.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/options.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/patent_filings.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/predictions.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/recent.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/reddit_mentions.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/screener.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/senate_trades.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/sentiments.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/exceptions.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/plotting.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/py.typed +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain_python.egg-info/SOURCES.txt +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain_python.egg-info/dependency_links.txt +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain_python.egg-info/requires.txt +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain_python.egg-info/scm_file_list.json +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain_python.egg-info/top_level.txt +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/__init__.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/conftest.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_analyst_ratings.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_async_client.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_available.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_cik_passthrough.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_client.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_corporate_lobbying.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_envelope.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_government_contracts.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_house_trades.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_insider_transactions.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_integration.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_linkedin_data.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_news.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_options.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_patent_filings.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_plotting.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_predictions.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_recent.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_reddit_mentions.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_screener.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_senate_trades.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_sentiments.py +0 -0
- {finbrain_python-0.3.0 → finbrain_python-0.3.1}/tests/test_utils.py +0 -0
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.1] - 2026-09-07
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`cik` on app ratings**: the v2 API now carries the company's SEC Central Index Key on the app-ratings response, and both DataFrame branches expose it as a `cik` column (`per_app=True` and the blended view). It is one value per company, repeated down the frame, kept as a string because the leading zeros are part of the identifier, and `None` for an issuer with no SEC registration such as a non-US listing. The raw-dict branch carried it already, being a passthrough. A CIK survives what a symbol does not: renames (BK became BNY) and recycled symbols, so it is the key to join app ratings to the insider, lobbying, contracts and patents datasets
|
|
13
|
+
|
|
8
14
|
## [0.3.0] - 2026-09-04
|
|
9
15
|
|
|
10
16
|
### Added
|
|
@@ -148,6 +148,12 @@ class AppRatingsAPI:
|
|
|
148
148
|
publish many apps (Apple has 140 on iOS) and which of them matters
|
|
149
149
|
is your judgement, not ours.
|
|
150
150
|
|
|
151
|
+
Either frame carries a ``cik`` column: the company's SEC Central
|
|
152
|
+
Index Key, a 10-digit zero-padded string (leading zeros are data),
|
|
153
|
+
``None`` for an issuer with no SEC registration. It is one value
|
|
154
|
+
per company, repeated down the frame, so a frame can be joined to
|
|
155
|
+
the other FinBrain datasets on the entity rather than the symbol.
|
|
156
|
+
|
|
151
157
|
Returns
|
|
152
158
|
-------
|
|
153
159
|
dict | pandas.DataFrame
|
|
@@ -165,6 +171,12 @@ class AppRatingsAPI:
|
|
|
165
171
|
data = self._c._request("GET", path, params=params)
|
|
166
172
|
|
|
167
173
|
if as_dataframe:
|
|
174
|
+
# One value per company, so it is a constant column rather than a
|
|
175
|
+
# per-row field. Assigned after the flatten so the flatten stays a
|
|
176
|
+
# pure function of the rows it is given. Kept as an object column:
|
|
177
|
+
# a numeric dtype would eat the leading zeros.
|
|
178
|
+
cik = data.get("cik")
|
|
179
|
+
|
|
168
180
|
if per_app:
|
|
169
181
|
flat = _flatten_apps(data.get("apps") or [])
|
|
170
182
|
df = pd.DataFrame(flat)
|
|
@@ -174,6 +186,7 @@ class AppRatingsAPI:
|
|
|
174
186
|
# row per app, so a date index would not be unique.
|
|
175
187
|
df.sort_values(["app_id", "date"], inplace=True)
|
|
176
188
|
df.reset_index(drop=True, inplace=True)
|
|
189
|
+
df["cik"] = cik
|
|
177
190
|
return df
|
|
178
191
|
|
|
179
192
|
rows: List[Dict[str, Any]] = data.get("data", [])
|
|
@@ -182,6 +195,7 @@ class AppRatingsAPI:
|
|
|
182
195
|
if not df.empty and "date" in df.columns:
|
|
183
196
|
df["date"] = pd.to_datetime(df["date"])
|
|
184
197
|
df.set_index("date", inplace=True)
|
|
198
|
+
df["cik"] = cik
|
|
185
199
|
return df
|
|
186
200
|
|
|
187
201
|
return data
|
|
@@ -72,6 +72,7 @@ def test_app_ratings_dataframe(client, _activate_responses):
|
|
|
72
72
|
"android_score",
|
|
73
73
|
"android_ratingsCount",
|
|
74
74
|
"android_installCount",
|
|
75
|
+
"cik", # one value per company, repeated down the frame
|
|
75
76
|
}
|
|
76
77
|
assert df.loc["2024-01-15", "ios_score"] == 4.07
|
|
77
78
|
assert df.loc["2024-01-15", "android_ratingsCount"] == 567996
|
|
@@ -98,6 +99,7 @@ def _per_app_payload():
|
|
|
98
99
|
{
|
|
99
100
|
"symbol": "AAPL",
|
|
100
101
|
"name": "Apple Inc.",
|
|
102
|
+
"cik": "0000320193",
|
|
101
103
|
"data": [
|
|
102
104
|
{
|
|
103
105
|
"date": "2026-09-01",
|
|
@@ -231,3 +233,39 @@ def test_app_ratings_per_app_empty_when_api_predates_apps(client, _activate_resp
|
|
|
231
233
|
df = client.app_ratings.ticker("AMZN", as_dataframe=True, per_app=True)
|
|
232
234
|
assert isinstance(df, pd.DataFrame)
|
|
233
235
|
assert df.empty
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
# ─────────── entity identity ────────────────────────────────────────────
|
|
239
|
+
def test_app_ratings_frames_carry_the_company_cik(client, _activate_responses):
|
|
240
|
+
"""Both frames carry `cik` so they can be joined on the entity.
|
|
241
|
+
|
|
242
|
+
A symbol is not an identity: it gets renamed (BK -> BNY) and recycled.
|
|
243
|
+
The CIK is one value per company, so it repeats down the frame, and it
|
|
244
|
+
stays a string because the leading zeros are part of the identifier.
|
|
245
|
+
"""
|
|
246
|
+
path = "app-ratings/AAPL"
|
|
247
|
+
stub_json(_activate_responses, "GET", path, _per_app_payload())
|
|
248
|
+
|
|
249
|
+
per_app = client.app_ratings.ticker("AAPL", as_dataframe=True, per_app=True)
|
|
250
|
+
assert list(per_app["cik"].unique()) == ["0000320193"]
|
|
251
|
+
# What matters is that a numeric dtype never eats the leading zeros.
|
|
252
|
+
# (Object dtype on pandas 2, the dedicated str dtype on pandas 3 - both
|
|
253
|
+
# are fine, so assert the property, not the implementation.)
|
|
254
|
+
assert not pd.api.types.is_numeric_dtype(per_app["cik"])
|
|
255
|
+
assert len(per_app) == 4 # the column does not add or drop rows
|
|
256
|
+
|
|
257
|
+
stub_json(_activate_responses, "GET", path, _per_app_payload())
|
|
258
|
+
blended = client.app_ratings.ticker("AAPL", as_dataframe=True)
|
|
259
|
+
assert list(blended["cik"].unique()) == ["0000320193"]
|
|
260
|
+
|
|
261
|
+
# the raw branch is a passthrough: no SDK code decides what it carries
|
|
262
|
+
stub_json(_activate_responses, "GET", path, _per_app_payload())
|
|
263
|
+
assert client.app_ratings.ticker("AAPL")["cik"] == "0000320193"
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
def test_app_ratings_cik_column_exists_when_the_issuer_has_none(client, _activate_responses):
|
|
267
|
+
"""A non-US listing has no CIK; the column is still there, all null."""
|
|
268
|
+
payload = wrap_v2({"symbol": "SAP.DE", "name": "SAP SE", "cik": None, "data": [], "apps": []})
|
|
269
|
+
stub_json(_activate_responses, "GET", "app-ratings/SAP.DE", payload)
|
|
270
|
+
df = client.app_ratings.ticker("SAP.DE", as_dataframe=True, per_app=True)
|
|
271
|
+
assert "cik" in df.columns and df["cik"].isna().all()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/analyst_ratings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/corporate_lobbying.py
RENAMED
|
File without changes
|
{finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/government_contracts.py
RENAMED
|
File without changes
|
|
File without changes
|
{finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/insider_transactions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/patent_filings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/aio/endpoints/reddit_mentions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/corporate_lobbying.py
RENAMED
|
File without changes
|
{finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/government_contracts.py
RENAMED
|
File without changes
|
|
File without changes
|
{finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain/endpoints/insider_transactions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{finbrain_python-0.3.0 → finbrain_python-0.3.1}/src/finbrain_python.egg-info/scm_file_list.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|