axprism 0.2.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.
- axprism-0.2.0/LICENSE +21 -0
- axprism-0.2.0/PKG-INFO +188 -0
- axprism-0.2.0/README.md +146 -0
- axprism-0.2.0/axprism/__init__.py +64 -0
- axprism-0.2.0/axprism/client.py +817 -0
- axprism-0.2.0/axprism/exceptions.py +45 -0
- axprism-0.2.0/axprism/models.py +357 -0
- axprism-0.2.0/axprism.egg-info/PKG-INFO +188 -0
- axprism-0.2.0/axprism.egg-info/SOURCES.txt +14 -0
- axprism-0.2.0/axprism.egg-info/dependency_links.txt +1 -0
- axprism-0.2.0/axprism.egg-info/requires.txt +10 -0
- axprism-0.2.0/axprism.egg-info/top_level.txt +1 -0
- axprism-0.2.0/pyproject.toml +42 -0
- axprism-0.2.0/setup.cfg +4 -0
- axprism-0.2.0/setup.py +41 -0
- axprism-0.2.0/tests/test_live.py +69 -0
axprism-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AxPrism
|
|
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.
|
axprism-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: axprism
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: AxPrism API client — institutional XBRL data, Shariah compliance screening, SEC/EDGAR, ESEF, Tadawul/Bursa/IDX
|
|
5
|
+
Home-page: https://axprism.com
|
|
6
|
+
Author: AxPrism
|
|
7
|
+
Author-email: AxPrism <dev@axprism.com>
|
|
8
|
+
Maintainer: AxPrism
|
|
9
|
+
Maintainer-email: AxPrism <dev@axprism.com>
|
|
10
|
+
License: MIT
|
|
11
|
+
Project-URL: Homepage, https://axprism.com
|
|
12
|
+
Project-URL: Documentation, https://axprism.com/api-reference
|
|
13
|
+
Project-URL: API Reference, https://axprism.com/api-reference
|
|
14
|
+
Project-URL: Bug Reports, https://axprism.com/contact
|
|
15
|
+
Keywords: xbrl,financial-data,shariah-compliance,aaoifi,sec-edgar,esef,tadawul
|
|
16
|
+
Classifier: Development Status :: 4 - Beta
|
|
17
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
18
|
+
Classifier: Intended Audience :: Developers
|
|
19
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
26
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
27
|
+
Requires-Python: >=3.8
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: requests>=2.28.0
|
|
31
|
+
Provides-Extra: async
|
|
32
|
+
Requires-Dist: httpx>=0.24.0; extra == "async"
|
|
33
|
+
Provides-Extra: pandas
|
|
34
|
+
Requires-Dist: pandas>=1.5.0; extra == "pandas"
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
37
|
+
Dynamic: author
|
|
38
|
+
Dynamic: home-page
|
|
39
|
+
Dynamic: license-file
|
|
40
|
+
Dynamic: maintainer
|
|
41
|
+
Dynamic: requires-python
|
|
42
|
+
|
|
43
|
+
# axprism
|
|
44
|
+
|
|
45
|
+
Official Python SDK for the [AxPrism API](https://axprism.com) — institutional
|
|
46
|
+
XBRL data, Shariah compliance screening (AAOIFI, MSCI Islamic, DJIM, FTSE, Saudi
|
|
47
|
+
CMA), SEC/EDGAR, ESEF, EDINET, and the Tadawul / Bursa Malaysia / IDX exchanges.
|
|
48
|
+
|
|
49
|
+
## Installation
|
|
50
|
+
|
|
51
|
+
> **Coming soon to PyPI.** `pip install axprism` will work once the package is
|
|
52
|
+
> published. For now, install from a local checkout of this repo:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# From the repo root:
|
|
56
|
+
pip install ./sdk/python
|
|
57
|
+
# …or for development (editable install):
|
|
58
|
+
pip install -e ./sdk/python
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Requires Python 3.8+ and [`requests`](https://pypi.org/project/requests/).
|
|
62
|
+
|
|
63
|
+
## Authentication
|
|
64
|
+
|
|
65
|
+
AxPrism authenticates with the `X-API-Key` header. Get a key at
|
|
66
|
+
[axprism.com/keys](https://axprism.com/keys). A public **read-only demo key** is
|
|
67
|
+
available for trying the API: `axmd_demo_try_axprism_2024`.
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
from axprism import AxPrism
|
|
71
|
+
|
|
72
|
+
client = AxPrism(api_key="axmd_live_...")
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Quick Start
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
from axprism import AxPrism
|
|
79
|
+
|
|
80
|
+
client = AxPrism(api_key="axmd_demo_try_axprism_2024")
|
|
81
|
+
|
|
82
|
+
# Shariah compliance screening
|
|
83
|
+
result = client.compliance("AAPL", standard="aaoifi")
|
|
84
|
+
print(result.verdict) # "halal"
|
|
85
|
+
print(result.ratios.debt.ratio) # 0.026
|
|
86
|
+
print(result.ratios.debt.passes) # True
|
|
87
|
+
|
|
88
|
+
# Screen a full portfolio (with purification)
|
|
89
|
+
portfolio = client.portfolio([
|
|
90
|
+
{"ticker": "AAPL", "weight": 35, "shares": 120, "dividend_per_share": 0.96},
|
|
91
|
+
{"ticker": "MSFT", "weight": 25, "shares": 80, "dividend_per_share": 3.32},
|
|
92
|
+
])
|
|
93
|
+
print(portfolio.summary.halal_weight)
|
|
94
|
+
print(portfolio.purification.total_usd)
|
|
95
|
+
|
|
96
|
+
# Normalized financial statements (values are display strings; use as_number=True for floats)
|
|
97
|
+
fin = client.financials("AAPL", statement="IS", period="annual", currency="USD")
|
|
98
|
+
print(fin.get_metric("Revenue")) # "$416,161,000,000"
|
|
99
|
+
print(f"Revenue: ${fin.get_metric('Revenue', as_number=True):,.0f}")
|
|
100
|
+
|
|
101
|
+
# Price history
|
|
102
|
+
hist = client.prices("AAPL", start="2024-01-01", limit=252)
|
|
103
|
+
print(hist.prices[0].close)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Endpoint coverage
|
|
107
|
+
|
|
108
|
+
The SDK provides typed, ergonomic methods across all key groups. For any of the
|
|
109
|
+
API's 165+ operations not given a dedicated method, use the generic
|
|
110
|
+
`client.request(method, path, params=..., json=...)` escape hatch.
|
|
111
|
+
|
|
112
|
+
| Group | Methods |
|
|
113
|
+
|-------|---------|
|
|
114
|
+
| **Compliance** | `compliance`, `compliance_multi`, `compliance_trend`, `compliance_history`, `compliance_point_in_time`, `compliance_audit`, `sukuk`, `portfolio`, `screen_compliance`, `purification`, `is_halal` |
|
|
115
|
+
| **Financials** | `financials`, `ttm`, `batch_metric`, `compare`, `facts`, `segments`, `nongaap`, `restatements`, `restatement_events`, `concept_history`, `concepts_search`, `screener` |
|
|
116
|
+
| **Profile / symbols** | `profile`, `market_cap`, `symbols`, `exchanges`, `company_resolve` |
|
|
117
|
+
| **Market data** | `prices`, `estimates`, `news`, `insiders`, `holders_13f`, `etf_holdings`, `options_chain`, `corporate_actions`, `esg`, `calendar`, `fx_rates` |
|
|
118
|
+
| **Disclosures / text** | `disclosures.search`, `disclosures.recent`, `disclosures.facets`, `text.search`, `text.stats`, `text.index` |
|
|
119
|
+
| **International** | `tadawul.*`, `bursa.*`, `idx.*` (`symbols`, `profile`, `financials`, `sectors`, `shariah`) |
|
|
120
|
+
| **Filings** | `filing_index`, `filing_as_reported`, `filing_footnote_graph`, `filing_diff`, `filing_textblocks` |
|
|
121
|
+
| **Webhooks** | `webhooks.list`, `webhooks.events`, `webhooks.create`, `webhooks.delete` |
|
|
122
|
+
| **Bulk / export** | `bulk_financials` (CSV), `excel_workbook` (XLSX bytes) |
|
|
123
|
+
| **Coverage** | `coverage_core50`, `coverage_summary`, `benchmark_financials_50` |
|
|
124
|
+
| **Account** | `me`, `usage`, `pricing`, `rulesets`, `metrics_catalog`, `keys.*` |
|
|
125
|
+
|
|
126
|
+
### International exchanges
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
client.tadawul.symbols(limit=10) # Saudi Tadawul registry
|
|
130
|
+
client.tadawul.financials("2222") # Saudi Aramco
|
|
131
|
+
client.bursa.shariah() # Bursa Malaysia SC list
|
|
132
|
+
client.idx.profile("BBCA") # Indonesia Stock Exchange
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Disclosure & text search
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
client.disclosures.search("supply chain risk", ticker="AAPL", forms=["10-K", "10-Q"])
|
|
139
|
+
client.disclosures.recent("AAPL", limit=10)
|
|
140
|
+
client.text.search("revenue recognition", ticker="MSFT")
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Pagination
|
|
144
|
+
|
|
145
|
+
```python
|
|
146
|
+
for hit in client.paginate("/api/v1/disclosures/search",
|
|
147
|
+
{"q": "climate", "ticker": "AAPL"},
|
|
148
|
+
items_key="results", max_items=200):
|
|
149
|
+
print(hit)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Error Handling & Retries
|
|
153
|
+
|
|
154
|
+
The client retries automatically on `429` (honoring `Retry-After`) and transient
|
|
155
|
+
`5xx` errors with exponential backoff (configurable via `max_retries` and
|
|
156
|
+
`backoff_factor`).
|
|
157
|
+
|
|
158
|
+
```python
|
|
159
|
+
from axprism import AxPrism, AuthError, RateLimitError, TierError, NotFoundError
|
|
160
|
+
|
|
161
|
+
client = AxPrism(api_key="...", max_retries=3, backoff_factor=0.5)
|
|
162
|
+
|
|
163
|
+
try:
|
|
164
|
+
result = client.compliance("AAPL")
|
|
165
|
+
except AuthError:
|
|
166
|
+
print("Invalid API key (401)")
|
|
167
|
+
except TierError as e: # 402 / 403
|
|
168
|
+
print(f"Need {e.required_tier}. Upgrade at {e.upgrade_url}")
|
|
169
|
+
except RateLimitError as e: # 429
|
|
170
|
+
print(f"Quota exceeded: {e.used_today}/{e.daily_limit}")
|
|
171
|
+
except NotFoundError: # 404
|
|
172
|
+
print("Ticker not found")
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Examples & tests
|
|
176
|
+
|
|
177
|
+
- `examples/quickstart.py` — runnable script using the demo key.
|
|
178
|
+
- `tests/test_live.py` — read-only live tests (`pytest`).
|
|
179
|
+
|
|
180
|
+
## Documentation
|
|
181
|
+
|
|
182
|
+
- **API Reference**: [axprism.com/api-reference](https://axprism.com/api-reference)
|
|
183
|
+
- **Pricing**: [axprism.com/pricing](https://axprism.com/pricing)
|
|
184
|
+
- **Support**: support@axprism.com
|
|
185
|
+
|
|
186
|
+
## License
|
|
187
|
+
|
|
188
|
+
MIT — see [LICENSE](./LICENSE).
|
axprism-0.2.0/README.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# axprism
|
|
2
|
+
|
|
3
|
+
Official Python SDK for the [AxPrism API](https://axprism.com) — institutional
|
|
4
|
+
XBRL data, Shariah compliance screening (AAOIFI, MSCI Islamic, DJIM, FTSE, Saudi
|
|
5
|
+
CMA), SEC/EDGAR, ESEF, EDINET, and the Tadawul / Bursa Malaysia / IDX exchanges.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
> **Coming soon to PyPI.** `pip install axprism` will work once the package is
|
|
10
|
+
> published. For now, install from a local checkout of this repo:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# From the repo root:
|
|
14
|
+
pip install ./sdk/python
|
|
15
|
+
# …or for development (editable install):
|
|
16
|
+
pip install -e ./sdk/python
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Requires Python 3.8+ and [`requests`](https://pypi.org/project/requests/).
|
|
20
|
+
|
|
21
|
+
## Authentication
|
|
22
|
+
|
|
23
|
+
AxPrism authenticates with the `X-API-Key` header. Get a key at
|
|
24
|
+
[axprism.com/keys](https://axprism.com/keys). A public **read-only demo key** is
|
|
25
|
+
available for trying the API: `axmd_demo_try_axprism_2024`.
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
from axprism import AxPrism
|
|
29
|
+
|
|
30
|
+
client = AxPrism(api_key="axmd_live_...")
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
from axprism import AxPrism
|
|
37
|
+
|
|
38
|
+
client = AxPrism(api_key="axmd_demo_try_axprism_2024")
|
|
39
|
+
|
|
40
|
+
# Shariah compliance screening
|
|
41
|
+
result = client.compliance("AAPL", standard="aaoifi")
|
|
42
|
+
print(result.verdict) # "halal"
|
|
43
|
+
print(result.ratios.debt.ratio) # 0.026
|
|
44
|
+
print(result.ratios.debt.passes) # True
|
|
45
|
+
|
|
46
|
+
# Screen a full portfolio (with purification)
|
|
47
|
+
portfolio = client.portfolio([
|
|
48
|
+
{"ticker": "AAPL", "weight": 35, "shares": 120, "dividend_per_share": 0.96},
|
|
49
|
+
{"ticker": "MSFT", "weight": 25, "shares": 80, "dividend_per_share": 3.32},
|
|
50
|
+
])
|
|
51
|
+
print(portfolio.summary.halal_weight)
|
|
52
|
+
print(portfolio.purification.total_usd)
|
|
53
|
+
|
|
54
|
+
# Normalized financial statements (values are display strings; use as_number=True for floats)
|
|
55
|
+
fin = client.financials("AAPL", statement="IS", period="annual", currency="USD")
|
|
56
|
+
print(fin.get_metric("Revenue")) # "$416,161,000,000"
|
|
57
|
+
print(f"Revenue: ${fin.get_metric('Revenue', as_number=True):,.0f}")
|
|
58
|
+
|
|
59
|
+
# Price history
|
|
60
|
+
hist = client.prices("AAPL", start="2024-01-01", limit=252)
|
|
61
|
+
print(hist.prices[0].close)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Endpoint coverage
|
|
65
|
+
|
|
66
|
+
The SDK provides typed, ergonomic methods across all key groups. For any of the
|
|
67
|
+
API's 165+ operations not given a dedicated method, use the generic
|
|
68
|
+
`client.request(method, path, params=..., json=...)` escape hatch.
|
|
69
|
+
|
|
70
|
+
| Group | Methods |
|
|
71
|
+
|-------|---------|
|
|
72
|
+
| **Compliance** | `compliance`, `compliance_multi`, `compliance_trend`, `compliance_history`, `compliance_point_in_time`, `compliance_audit`, `sukuk`, `portfolio`, `screen_compliance`, `purification`, `is_halal` |
|
|
73
|
+
| **Financials** | `financials`, `ttm`, `batch_metric`, `compare`, `facts`, `segments`, `nongaap`, `restatements`, `restatement_events`, `concept_history`, `concepts_search`, `screener` |
|
|
74
|
+
| **Profile / symbols** | `profile`, `market_cap`, `symbols`, `exchanges`, `company_resolve` |
|
|
75
|
+
| **Market data** | `prices`, `estimates`, `news`, `insiders`, `holders_13f`, `etf_holdings`, `options_chain`, `corporate_actions`, `esg`, `calendar`, `fx_rates` |
|
|
76
|
+
| **Disclosures / text** | `disclosures.search`, `disclosures.recent`, `disclosures.facets`, `text.search`, `text.stats`, `text.index` |
|
|
77
|
+
| **International** | `tadawul.*`, `bursa.*`, `idx.*` (`symbols`, `profile`, `financials`, `sectors`, `shariah`) |
|
|
78
|
+
| **Filings** | `filing_index`, `filing_as_reported`, `filing_footnote_graph`, `filing_diff`, `filing_textblocks` |
|
|
79
|
+
| **Webhooks** | `webhooks.list`, `webhooks.events`, `webhooks.create`, `webhooks.delete` |
|
|
80
|
+
| **Bulk / export** | `bulk_financials` (CSV), `excel_workbook` (XLSX bytes) |
|
|
81
|
+
| **Coverage** | `coverage_core50`, `coverage_summary`, `benchmark_financials_50` |
|
|
82
|
+
| **Account** | `me`, `usage`, `pricing`, `rulesets`, `metrics_catalog`, `keys.*` |
|
|
83
|
+
|
|
84
|
+
### International exchanges
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
client.tadawul.symbols(limit=10) # Saudi Tadawul registry
|
|
88
|
+
client.tadawul.financials("2222") # Saudi Aramco
|
|
89
|
+
client.bursa.shariah() # Bursa Malaysia SC list
|
|
90
|
+
client.idx.profile("BBCA") # Indonesia Stock Exchange
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Disclosure & text search
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
client.disclosures.search("supply chain risk", ticker="AAPL", forms=["10-K", "10-Q"])
|
|
97
|
+
client.disclosures.recent("AAPL", limit=10)
|
|
98
|
+
client.text.search("revenue recognition", ticker="MSFT")
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Pagination
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
for hit in client.paginate("/api/v1/disclosures/search",
|
|
105
|
+
{"q": "climate", "ticker": "AAPL"},
|
|
106
|
+
items_key="results", max_items=200):
|
|
107
|
+
print(hit)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Error Handling & Retries
|
|
111
|
+
|
|
112
|
+
The client retries automatically on `429` (honoring `Retry-After`) and transient
|
|
113
|
+
`5xx` errors with exponential backoff (configurable via `max_retries` and
|
|
114
|
+
`backoff_factor`).
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
from axprism import AxPrism, AuthError, RateLimitError, TierError, NotFoundError
|
|
118
|
+
|
|
119
|
+
client = AxPrism(api_key="...", max_retries=3, backoff_factor=0.5)
|
|
120
|
+
|
|
121
|
+
try:
|
|
122
|
+
result = client.compliance("AAPL")
|
|
123
|
+
except AuthError:
|
|
124
|
+
print("Invalid API key (401)")
|
|
125
|
+
except TierError as e: # 402 / 403
|
|
126
|
+
print(f"Need {e.required_tier}. Upgrade at {e.upgrade_url}")
|
|
127
|
+
except RateLimitError as e: # 429
|
|
128
|
+
print(f"Quota exceeded: {e.used_today}/{e.daily_limit}")
|
|
129
|
+
except NotFoundError: # 404
|
|
130
|
+
print("Ticker not found")
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Examples & tests
|
|
134
|
+
|
|
135
|
+
- `examples/quickstart.py` — runnable script using the demo key.
|
|
136
|
+
- `tests/test_live.py` — read-only live tests (`pytest`).
|
|
137
|
+
|
|
138
|
+
## Documentation
|
|
139
|
+
|
|
140
|
+
- **API Reference**: [axprism.com/api-reference](https://axprism.com/api-reference)
|
|
141
|
+
- **Pricing**: [axprism.com/pricing](https://axprism.com/pricing)
|
|
142
|
+
- **Support**: support@axprism.com
|
|
143
|
+
|
|
144
|
+
## License
|
|
145
|
+
|
|
146
|
+
MIT — see [LICENSE](./LICENSE).
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AxPrism API client — institutional XBRL data and Shariah compliance screening.
|
|
3
|
+
|
|
4
|
+
Quick start::
|
|
5
|
+
|
|
6
|
+
pip install axprism
|
|
7
|
+
|
|
8
|
+
from axprism import AxPrism
|
|
9
|
+
|
|
10
|
+
client = AxPrism(api_key="axmd_live_...") # or the demo key below
|
|
11
|
+
|
|
12
|
+
# Screen a company for AAOIFI compliance
|
|
13
|
+
result = client.compliance("AAPL")
|
|
14
|
+
print(result.verdict) # "halal"
|
|
15
|
+
print(result.ratios.debt.ratio)
|
|
16
|
+
|
|
17
|
+
# Normalized financial statements
|
|
18
|
+
fin = client.financials("AAPL", statement="IS", period="annual")
|
|
19
|
+
print(fin.get_metric("Revenue"))
|
|
20
|
+
|
|
21
|
+
# International exchanges
|
|
22
|
+
client.tadawul.symbols(limit=10)
|
|
23
|
+
client.bursa.shariah()
|
|
24
|
+
|
|
25
|
+
A public, read-only demo key is available for testing:
|
|
26
|
+
``axmd_demo_try_axprism_2024``.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
__version__ = "0.2.0"
|
|
30
|
+
|
|
31
|
+
from .client import AxPrism
|
|
32
|
+
from .models import (
|
|
33
|
+
ComplianceResult,
|
|
34
|
+
EstimatesResult,
|
|
35
|
+
FinancialsResult,
|
|
36
|
+
PortfolioResult,
|
|
37
|
+
PriceHistory,
|
|
38
|
+
ProfileResult,
|
|
39
|
+
)
|
|
40
|
+
from .exceptions import (
|
|
41
|
+
AuthError,
|
|
42
|
+
AxPrismError,
|
|
43
|
+
BadRequestError,
|
|
44
|
+
NotFoundError,
|
|
45
|
+
RateLimitError,
|
|
46
|
+
TierError,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
__all__ = [
|
|
50
|
+
"AxPrism",
|
|
51
|
+
"ComplianceResult",
|
|
52
|
+
"PortfolioResult",
|
|
53
|
+
"FinancialsResult",
|
|
54
|
+
"PriceHistory",
|
|
55
|
+
"EstimatesResult",
|
|
56
|
+
"ProfileResult",
|
|
57
|
+
"AxPrismError",
|
|
58
|
+
"AuthError",
|
|
59
|
+
"RateLimitError",
|
|
60
|
+
"TierError",
|
|
61
|
+
"NotFoundError",
|
|
62
|
+
"BadRequestError",
|
|
63
|
+
"__version__",
|
|
64
|
+
]
|