nsepython 2.99__py3-none-any.whl → 2.100__py3-none-any.whl
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.
- nsepython/rahu.py +33 -0
- {nsepython-2.99.dist-info → nsepython-2.100.dist-info}/METADATA +1 -1
- nsepython-2.100.dist-info/RECORD +7 -0
- nsepython-2.99.dist-info/RECORD +0 -7
- {nsepython-2.99.dist-info → nsepython-2.100.dist-info}/WHEEL +0 -0
- {nsepython-2.99.dist-info → nsepython-2.100.dist-info}/licenses/LICENSE +0 -0
- {nsepython-2.99.dist-info → nsepython-2.100.dist-info}/top_level.txt +0 -0
nsepython/rahu.py
CHANGED
|
@@ -1773,6 +1773,39 @@ def share_holding(symbol):
|
|
|
1773
1773
|
return df
|
|
1774
1774
|
|
|
1775
1775
|
|
|
1776
|
+
def nse_annual_reports(symbol, year_from=None, year_to=None, index="equities"):
|
|
1777
|
+
"""Forum feature request (forum.unofficed.com topic 1459): list a listed
|
|
1778
|
+
company's annual reports with direct PDF download links, optionally
|
|
1779
|
+
filtered to a from/to year range. Backed by
|
|
1780
|
+
`/api/annual-reports?index=equities&symbol=X`, confirmed live via
|
|
1781
|
+
curl_cffi -- NOT the Akamai-walled historical/* family, just a plain
|
|
1782
|
+
metadata+link listing, so this is reliable. `index` is almost always
|
|
1783
|
+
"equities" (NSE also recognises "debt", but that returns no rows for a
|
|
1784
|
+
pure-equity symbol like most NSE-listed companies). Each returned row's
|
|
1785
|
+
`fileName` column IS the direct downloadable PDF/zip URL on
|
|
1786
|
+
nsearchives.nseindia.com -- fetch it yourself (e.g. with `requests` or
|
|
1787
|
+
`curl`) if you want the actual file; this function returns the metadata
|
|
1788
|
+
+ link, matching how every other *_history-style function in this
|
|
1789
|
+
library works, rather than silently downloading files to disk.
|
|
1790
|
+
`year_from`/`year_to` filter client-side on the report's `fromYr` (NSE's
|
|
1791
|
+
own API has no year-range parameter, it always returns the full
|
|
1792
|
+
available history -- commonly 15-20+ years for large-cap companies)."""
|
|
1793
|
+
symbol = nsesymbolpurify(symbol)
|
|
1794
|
+
payload = nsefetch(f"https://www.nseindia.com/api/annual-reports?index={index}&symbol={symbol}")
|
|
1795
|
+
rows = payload.get("data") or []
|
|
1796
|
+
df = pd.DataFrame.from_records(rows)
|
|
1797
|
+
if df.empty:
|
|
1798
|
+
return df
|
|
1799
|
+
if year_from is not None or year_to is not None:
|
|
1800
|
+
years = pd.to_numeric(df["fromYr"], errors="coerce")
|
|
1801
|
+
if year_from is not None:
|
|
1802
|
+
df = df[years >= int(year_from)]
|
|
1803
|
+
years = years[df.index]
|
|
1804
|
+
if year_to is not None:
|
|
1805
|
+
df = df[years <= int(year_to)]
|
|
1806
|
+
return df.reset_index(drop=True)
|
|
1807
|
+
|
|
1808
|
+
|
|
1776
1809
|
#Request from subhash
|
|
1777
1810
|
## https://unofficed.com/how-to-find-the-beta-of-indian-stocks-using-python/
|
|
1778
1811
|
def get_beta_df_maker(symbol,days):
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
nsepython/__init__.py,sha256=_1YN_O25fj7GRUrOREinuxKiXiF0l4cs-Grzjec8mZg,41
|
|
2
|
+
nsepython/rahu.py,sha256=fn_fApl5uw3sVtiSdzJHzfdC7tubdu9gI8-q1NL_KcQ,125978
|
|
3
|
+
nsepython-2.100.dist-info/licenses/LICENSE,sha256=VXapH-nuSz68DG5ScURElxHkl1lKk4MOK9cgZCSRDXs,34502
|
|
4
|
+
nsepython-2.100.dist-info/METADATA,sha256=qL-CuY5UNJsc6fUJgx7DC-ro314DP84secunyMNEi6E,7534
|
|
5
|
+
nsepython-2.100.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
6
|
+
nsepython-2.100.dist-info/top_level.txt,sha256=-hTS08c-pS4rPpiuzLkamRsgHTq7t6BG0M5wnU-iPy4,10
|
|
7
|
+
nsepython-2.100.dist-info/RECORD,,
|
nsepython-2.99.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
nsepython/__init__.py,sha256=_1YN_O25fj7GRUrOREinuxKiXiF0l4cs-Grzjec8mZg,41
|
|
2
|
-
nsepython/rahu.py,sha256=FTz7FfZOb2MilRtt1ENAxoHvFZtUC6J0A84mKQMuzis,124167
|
|
3
|
-
nsepython-2.99.dist-info/licenses/LICENSE,sha256=VXapH-nuSz68DG5ScURElxHkl1lKk4MOK9cgZCSRDXs,34502
|
|
4
|
-
nsepython-2.99.dist-info/METADATA,sha256=Ib_NPqQNPLNxP79vidhr1brGaj3SZbcXRL5mYUm3YZM,7533
|
|
5
|
-
nsepython-2.99.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
6
|
-
nsepython-2.99.dist-info/top_level.txt,sha256=-hTS08c-pS4rPpiuzLkamRsgHTq7t6BG0M5wnU-iPy4,10
|
|
7
|
-
nsepython-2.99.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|