datamule 1.1.1__py3-none-any.whl → 1.1.5__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.
- datamule/__init__.py +5 -1
- datamule/index.py +62 -0
- datamule/{book/book.py → sheet.py} +3 -3
- {datamule-1.1.1.dist-info → datamule-1.1.5.dist-info}/METADATA +1 -1
- {datamule-1.1.1.dist-info → datamule-1.1.5.dist-info}/RECORD +7 -7
- datamule/book/__init__.py +0 -0
- {datamule-1.1.1.dist-info → datamule-1.1.5.dist-info}/WHEEL +0 -0
- {datamule-1.1.1.dist-info → datamule-1.1.5.dist-info}/top_level.txt +0 -0
datamule/__init__.py
CHANGED
@@ -3,6 +3,8 @@ from .portfolio import Portfolio
|
|
3
3
|
from .document import Document
|
4
4
|
from .helper import _load_package_csv, load_package_dataset
|
5
5
|
from .config import Config
|
6
|
+
from .sheet import Sheet
|
7
|
+
from .index import Index
|
6
8
|
|
7
9
|
|
8
10
|
# Keep the notebook environment setup
|
@@ -32,5 +34,7 @@ __all__ = [
|
|
32
34
|
'Portfolio',
|
33
35
|
'Submission',
|
34
36
|
'Document',
|
35
|
-
'Config'
|
37
|
+
'Config',
|
38
|
+
'Sheet',
|
39
|
+
'Index',
|
36
40
|
]
|
datamule/index.py
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
from pathlib import Path
|
2
|
+
from .sec.submissions.textsearch import query
|
3
|
+
from .helper import _process_cik_and_metadata_filters, load_package_dataset
|
4
|
+
|
5
|
+
class Index:
|
6
|
+
def __init__(self, path=None):
|
7
|
+
self.path = Path(path) if path else None
|
8
|
+
|
9
|
+
def search_submissions(
|
10
|
+
self,
|
11
|
+
text_query,
|
12
|
+
start_date=None,
|
13
|
+
end_date=None,
|
14
|
+
submission_type=None,
|
15
|
+
cik=None,
|
16
|
+
ticker=None,
|
17
|
+
requests_per_second=5.0,
|
18
|
+
quiet=True,
|
19
|
+
**kwargs
|
20
|
+
):
|
21
|
+
"""
|
22
|
+
Search SEC filings for the given text query.
|
23
|
+
|
24
|
+
Args:
|
25
|
+
text_query (str): Text to search for in SEC filings.
|
26
|
+
start_date (str or date, optional): Start date for filing search.
|
27
|
+
end_date (str or date, optional): End date for filing search.
|
28
|
+
submission_type (str, optional): Type of SEC submission to search.
|
29
|
+
cik (str, int, or list, optional): CIK(s) to filter by.
|
30
|
+
ticker (str or list, optional): Ticker(s) to filter by.
|
31
|
+
requests_per_second (float, optional): Rate limit for SEC API requests.
|
32
|
+
quiet (bool, optional): Whether to suppress output.
|
33
|
+
**kwargs: Additional filters to apply.
|
34
|
+
|
35
|
+
Returns:
|
36
|
+
dict: Search results from the query function.
|
37
|
+
"""
|
38
|
+
# Process CIK and ticker filters if provided
|
39
|
+
if cik is not None or ticker is not None:
|
40
|
+
cik_list = _process_cik_and_metadata_filters(cik, ticker, **kwargs)
|
41
|
+
# Add CIK filter to the query if we have results
|
42
|
+
if cik_list:
|
43
|
+
# Implementation note: Update as needed - this assumes your query function
|
44
|
+
# can accept a cik parameter, otherwise you may need additional logic here
|
45
|
+
kwargs['cik'] = cik_list
|
46
|
+
|
47
|
+
# Execute the search query
|
48
|
+
results = query(
|
49
|
+
f'{text_query}',
|
50
|
+
filing_date=(start_date, end_date),
|
51
|
+
requests_per_second=requests_per_second,
|
52
|
+
quiet=quiet,
|
53
|
+
submission_type=submission_type,
|
54
|
+
**kwargs
|
55
|
+
)
|
56
|
+
|
57
|
+
# Save results to path if specified
|
58
|
+
if self.path:
|
59
|
+
self._save_results(results, text_query)
|
60
|
+
|
61
|
+
return results
|
62
|
+
|
@@ -1,8 +1,8 @@
|
|
1
1
|
from pathlib import Path
|
2
|
-
from
|
3
|
-
from
|
2
|
+
from .helper import _process_cik_and_metadata_filters, load_package_dataset
|
3
|
+
from .sec.xbrl.downloadcompanyfacts import download_company_facts
|
4
4
|
|
5
|
-
class
|
5
|
+
class Sheet:
|
6
6
|
def __init__(self, path):
|
7
7
|
self.path = Path(path)
|
8
8
|
|
@@ -1,11 +1,11 @@
|
|
1
|
-
datamule/__init__.py,sha256=
|
1
|
+
datamule/__init__.py,sha256=l6YlwT5EeRxPlCtO5Jd4I8l266rSRUJyfFe97cRtSCM,991
|
2
2
|
datamule/config.py,sha256=Y--CVv7JcgrjJkMOSLrvm2S8B9ost6RMSkGviP-MKtg,883
|
3
3
|
datamule/document.py,sha256=BC8jdVy9pMOA9ghIqV5N2XJidmVNThqbBohsuSAnVoY,10813
|
4
4
|
datamule/helper.py,sha256=xgOVnea-lUlQ5I-U0vYUp0VeKPNZehNhqjJvegA3lYE,3342
|
5
|
+
datamule/index.py,sha256=0txvbzPcvY1GsdxA-wGdLzAByxSeE_1VyyBp9mZEQRM,2292
|
5
6
|
datamule/portfolio.py,sha256=JmZlTrom_g7FXKXxWp_CiQTyC7p6_cDP08G0kFUja48,6982
|
7
|
+
datamule/sheet.py,sha256=WwumRdniClGU7W3AXVLOpCdMnepLC7KMrRpQlA6_NUY,1022
|
6
8
|
datamule/submission.py,sha256=JsxYlEz1Ywu6eC32OS15p4p-p8qB6SWd_rXuf2p5UfY,1247
|
7
|
-
datamule/book/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
datamule/book/book.py,sha256=QWiowVNqb84o-JcVo0fpKumxnIbBge2ZeKwHxqkVMqw,1023
|
9
9
|
datamule/mapping_dicts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
datamule/mapping_dicts/txt_mapping_dicts.py,sha256=DQPrGYbAPQxomRUtt4iiMGrwuF7BHc_LeFBQuYBzU9o,6311
|
11
11
|
datamule/mapping_dicts/xml_mapping_dicts.py,sha256=Z22yDVwKYonUfM5foQP00dVDE8EHhhMKp0CLqVKV5OI,438
|
@@ -29,7 +29,7 @@ datamule/sec/xbrl/xbrlmonitor.py,sha256=TKFVfSyyUUfUgFQw4WxEVs4g8Nh-2C0tygNIRmTq
|
|
29
29
|
datamule/seclibrary/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
30
30
|
datamule/seclibrary/downloader.py,sha256=Zb1TxsIz887tO3MJVP66siYVtNus89ti-g9oZ6VywrM,11500
|
31
31
|
datamule/seclibrary/query.py,sha256=qGuursTERRbOGfoDcYcpo4oWkW3PCBW6x1Qf1Puiak4,7352
|
32
|
-
datamule-1.1.
|
33
|
-
datamule-1.1.
|
34
|
-
datamule-1.1.
|
35
|
-
datamule-1.1.
|
32
|
+
datamule-1.1.5.dist-info/METADATA,sha256=9Q8YzsBipVuGYN4eWmH49sF5oyouyZvVdJ6rncDa0VE,512
|
33
|
+
datamule-1.1.5.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
34
|
+
datamule-1.1.5.dist-info/top_level.txt,sha256=iOfgmtSMFVyr7JGl_bYSTDry79JbmsG4p8zKq89ktKk,9
|
35
|
+
datamule-1.1.5.dist-info/RECORD,,
|
datamule/book/__init__.py
DELETED
File without changes
|
File without changes
|
File without changes
|