secblast 0.1.8__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.
- secblast/__init__.py +117 -0
- secblast/async_client.py +622 -0
- secblast/client.py +188 -0
- secblast/endpoints/__init__.py +15 -0
- secblast/endpoints/documents.py +123 -0
- secblast/endpoints/entities.py +117 -0
- secblast/endpoints/filings.py +186 -0
- secblast/endpoints/financials.py +337 -0
- secblast/endpoints/search.py +108 -0
- secblast/exceptions.py +52 -0
- secblast/models/__init__.py +60 -0
- secblast/models/entity.py +46 -0
- secblast/models/filing.py +100 -0
- secblast/models/financials.py +275 -0
- secblast/models/search.py +39 -0
- secblast/py.typed +0 -0
- secblast-0.1.8.dist-info/METADATA +234 -0
- secblast-0.1.8.dist-info/RECORD +20 -0
- secblast-0.1.8.dist-info/WHEEL +4 -0
- secblast-0.1.8.dist-info/licenses/LICENSE +21 -0
secblast/__init__.py
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SecBlast - Python SDK for the SecBlast SEC Filing API.
|
|
3
|
+
|
|
4
|
+
Example:
|
|
5
|
+
```python
|
|
6
|
+
from secblast import SecBlastClient
|
|
7
|
+
|
|
8
|
+
client = SecBlastClient(api_key="your-api-key")
|
|
9
|
+
|
|
10
|
+
# Look up a company
|
|
11
|
+
entity = client.get_entity(ticker="AAPL")
|
|
12
|
+
|
|
13
|
+
# Search filings
|
|
14
|
+
filings = client.lookup_filings(
|
|
15
|
+
tickers=["AAPL"],
|
|
16
|
+
form_types=["10-K"],
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
# Full-text search
|
|
20
|
+
results = client.fulltext_search("material contract")
|
|
21
|
+
|
|
22
|
+
# Get financial data
|
|
23
|
+
balance_sheet = client.get_balance_sheet(cik="320193")
|
|
24
|
+
|
|
25
|
+
# Get financial data in table format for easy rendering
|
|
26
|
+
balance_table = client.get_balance_sheet(cik="320193", format="table")
|
|
27
|
+
for row in balance_table.rows:
|
|
28
|
+
print(f"{row.label}: {row.values}")
|
|
29
|
+
```
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
from secblast.async_client import AsyncSecBlastClient
|
|
33
|
+
from secblast.client import SecBlastClient
|
|
34
|
+
from secblast.exceptions import (
|
|
35
|
+
AuthenticationError,
|
|
36
|
+
NotFoundError,
|
|
37
|
+
RateLimitError,
|
|
38
|
+
SecBlastError,
|
|
39
|
+
ServerError,
|
|
40
|
+
ValidationError,
|
|
41
|
+
)
|
|
42
|
+
from secblast.models import (
|
|
43
|
+
Address,
|
|
44
|
+
AllFinancialsResponse,
|
|
45
|
+
BalanceSheet,
|
|
46
|
+
CashFlow,
|
|
47
|
+
DocumentInfo,
|
|
48
|
+
EntityInfo,
|
|
49
|
+
FactValue,
|
|
50
|
+
FilingInfo,
|
|
51
|
+
FinancialFiling,
|
|
52
|
+
FinancialStatement,
|
|
53
|
+
FinancialStatementTable,
|
|
54
|
+
FormerName,
|
|
55
|
+
HistoricalValue,
|
|
56
|
+
HistoryResponse,
|
|
57
|
+
IncomeStatement,
|
|
58
|
+
Item8K,
|
|
59
|
+
LineItem,
|
|
60
|
+
Period,
|
|
61
|
+
RawFact,
|
|
62
|
+
RawStatement,
|
|
63
|
+
RawXbrlResponse,
|
|
64
|
+
SearchHit,
|
|
65
|
+
SearchResult,
|
|
66
|
+
Section,
|
|
67
|
+
TableRow,
|
|
68
|
+
XBRLFact,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
__version__ = "0.2.0"
|
|
72
|
+
|
|
73
|
+
__all__ = [
|
|
74
|
+
# Client
|
|
75
|
+
"SecBlastClient",
|
|
76
|
+
"AsyncSecBlastClient",
|
|
77
|
+
# Exceptions
|
|
78
|
+
"SecBlastError",
|
|
79
|
+
"AuthenticationError",
|
|
80
|
+
"RateLimitError",
|
|
81
|
+
"ValidationError",
|
|
82
|
+
"NotFoundError",
|
|
83
|
+
"ServerError",
|
|
84
|
+
# Models - Entity
|
|
85
|
+
"EntityInfo",
|
|
86
|
+
"Address",
|
|
87
|
+
"FormerName",
|
|
88
|
+
# Models - Filing
|
|
89
|
+
"FilingInfo",
|
|
90
|
+
"DocumentInfo",
|
|
91
|
+
"Item8K",
|
|
92
|
+
"Section",
|
|
93
|
+
# Models - Search
|
|
94
|
+
"SearchHit",
|
|
95
|
+
"SearchResult",
|
|
96
|
+
# Models - Financials (Statements)
|
|
97
|
+
"FinancialStatement",
|
|
98
|
+
"FinancialStatementTable",
|
|
99
|
+
"BalanceSheet",
|
|
100
|
+
"IncomeStatement",
|
|
101
|
+
"CashFlow",
|
|
102
|
+
"AllFinancialsResponse",
|
|
103
|
+
# Models - Financials (Components)
|
|
104
|
+
"Period",
|
|
105
|
+
"FactValue",
|
|
106
|
+
"LineItem",
|
|
107
|
+
"TableRow",
|
|
108
|
+
"FinancialFiling",
|
|
109
|
+
"XBRLFact",
|
|
110
|
+
# Models - Financials (History)
|
|
111
|
+
"HistoricalValue",
|
|
112
|
+
"HistoryResponse",
|
|
113
|
+
# Models - Financials (Raw)
|
|
114
|
+
"RawFact",
|
|
115
|
+
"RawStatement",
|
|
116
|
+
"RawXbrlResponse",
|
|
117
|
+
]
|