datamule 0.421__cp311-cp311-macosx_10_9_universal2.whl → 0.423__cp311-cp311-macosx_10_9_universal2.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/portfolio.py CHANGED
@@ -4,13 +4,23 @@ from concurrent.futures import ProcessPoolExecutor
4
4
  from .submission import Submission
5
5
 
6
6
  class Portfolio:
7
- def __init__(self, path):
7
+ @classmethod
8
+ def create(cls, path):
9
+ # This method handles the process pool lifecycle
10
+ with ProcessPoolExecutor() as executor:
11
+ portfolio = cls(path, executor)
12
+ return portfolio
13
+
14
+ def __init__(self, path, executor=None):
8
15
  self.path = Path(path)
9
16
  folders = [f for f in self.path.iterdir() if f.is_dir()]
10
17
  print(f"Loading {len(folders)} submissions")
11
- # Load submissions in parallel
12
- with ProcessPoolExecutor() as executor:
13
- # Show progress while loading
18
+
19
+ if executor is None:
20
+ # Fall back to sequential loading if no executor
21
+ self.submissions = [Submission(f) for f in tqdm(folders, desc="Loading submissions")]
22
+ else:
23
+ # Use provided executor for parallel loading
14
24
  self.submissions = list(tqdm(
15
25
  executor.map(Submission, folders),
16
26
  total=len(folders),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datamule
3
- Version: 0.421
3
+ Version: 0.423
4
4
  Summary: Making it easier to use SEC filings.
5
5
  Home-page: https://github.com/john-friedman/datamule-python
6
6
  Author: John Friedman
@@ -8,25 +8,24 @@ Requires-Dist: aiohttp
8
8
  Requires-Dist: aiolimiter
9
9
  Requires-Dist: tqdm
10
10
  Requires-Dist: requests
11
- Requires-Dist: nest-asyncio
11
+ Requires-Dist: nest_asyncio
12
12
  Requires-Dist: aiofiles
13
13
  Requires-Dist: polars
14
14
  Requires-Dist: setuptools
15
15
  Requires-Dist: selectolax
16
16
  Requires-Dist: pytz
17
17
  Requires-Dist: zstandard
18
- Provides-Extra: all
19
- Requires-Dist: flask; extra == "all"
20
- Requires-Dist: openai; extra == "all"
21
- Requires-Dist: psutil; extra == "all"
22
- Requires-Dist: pandas; extra == "all"
23
- Requires-Dist: google-generativeai; extra == "all"
24
- Provides-Extra: dataset_builder
25
- Requires-Dist: pandas; extra == "dataset-builder"
26
- Requires-Dist: google-generativeai; extra == "dataset-builder"
27
- Requires-Dist: psutil; extra == "dataset-builder"
28
18
  Provides-Extra: mulebot
29
19
  Requires-Dist: openai; extra == "mulebot"
30
- Provides-Extra: mulebot_server
20
+ Provides-Extra: mulebot-server
31
21
  Requires-Dist: flask; extra == "mulebot-server"
32
-
22
+ Provides-Extra: dataset-builder
23
+ Requires-Dist: pandas; extra == "dataset-builder"
24
+ Requires-Dist: google-generativeai; extra == "dataset-builder"
25
+ Requires-Dist: psutil; extra == "dataset-builder"
26
+ Provides-Extra: all
27
+ Requires-Dist: pandas; extra == "all"
28
+ Requires-Dist: google-generativeai; extra == "all"
29
+ Requires-Dist: psutil; extra == "all"
30
+ Requires-Dist: flask; extra == "all"
31
+ Requires-Dist: openai; extra == "all"
@@ -3,7 +3,7 @@ datamule/document.py,sha256=Yn8UqUjKwYPE29MrMjreHK_HY9eTqOSjPyM5B1VBrHQ,5144
3
3
  datamule/helper.py,sha256=tr3AQWus9dHNZFKpLSglWjcb8zmm5qDXjOWACMhvMxQ,4594
4
4
  datamule/monitor.py,sha256=mRaM8v5NgcMF9DJ1s_YBzucjrbr-3yFwW422MVml-_Q,9114
5
5
  datamule/packageupdater.py,sha256=rw4hTnQGjZttee8QmTadg9vlhEjVp_dwdSFv8uQNvss,9584
6
- datamule/portfolio.py,sha256=Qd_j3gGUi95Ad0g-PpjfJ3ozg-92VohMvCOvcEb0Kbw,710
6
+ datamule/portfolio.py,sha256=uj6-NhFKUufepvywsBjhx783UiMeIagEKX4zoq8P8yU,1087
7
7
  datamule/submission.py,sha256=LlwHJL3CIMHOlaHqCfDH7UBiKCFu0tPYV-g92uPvfcY,2492
8
8
  datamule/data/company_former_names.csv,sha256=HE9cAv-_QKFX6jT-_-D0rHmaDyQuAzL4MJwank5O1U8,706380
9
9
  datamule/data/company_metadata.csv,sha256=yPovrCVjYwLWTU_hBUFJymp8iNO0NBYuq_QwOkRLoN8,3068599
@@ -47,8 +47,8 @@ datamule/parser/document_parsing/n_port_p_parser.py,sha256=GmmQFkCZt57WikUZ5Daht
47
47
  datamule/parser/document_parsing/sec_parser.py,sha256=AS8H4h1sfUAdWP2gotULcjbylsYN_nHgTfkeVRyENPo,2716
48
48
  datamule/parser/document_parsing/sgml_parser.py,sha256=tC1cL3cdVQPWbc9QtoRUYSo2wRuYNaglFaCmP57oEfA,3317
49
49
  datamule/parser/sgml_parsing/sgml_parser_cy.c,sha256=UwXSuLGSBLKfO5bM7xTzjFLnGDV3-NNnCjgUCPAY1gk,796689
50
- datamule/parser/sgml_parsing/sgml_parser_cy.cpython-311-darwin.so,sha256=r8IdjH3GFrInYMSqILT2i-UNPDyt3gf4RxElvjauG0s,362376
51
- datamule-0.421.dist-info/METADATA,sha256=JS06uGn3bvIgLo3SWpQlgF4ZjMBQ6uhabt5CMu_3zZY,1007
52
- datamule-0.421.dist-info/WHEEL,sha256=vrdZjlh4exCGuOeHFVGYgW_9eYEDoByDCp4vVTWiG0w,115
53
- datamule-0.421.dist-info/top_level.txt,sha256=iOfgmtSMFVyr7JGl_bYSTDry79JbmsG4p8zKq89ktKk,9
54
- datamule-0.421.dist-info/RECORD,,
50
+ datamule/parser/sgml_parsing/sgml_parser_cy.cpython-311-darwin.so,sha256=-sGeTIG08lWELwJMzRDaURnDvg8r6SBcli9HKNomt3c,362376
51
+ datamule-0.423.dist-info/METADATA,sha256=Z6UKihhZ3xFmKOotzTzjPbMLK8ySXf-hyAw7t1ETcNA,1006
52
+ datamule-0.423.dist-info/WHEEL,sha256=SAXwsvUnStmqZDZIFc0R93dpIgZzQCxgSCg6H6Io4Og,114
53
+ datamule-0.423.dist-info/top_level.txt,sha256=iOfgmtSMFVyr7JGl_bYSTDry79JbmsG4p8zKq89ktKk,9
54
+ datamule-0.423.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.45.1)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp311-cp311-macosx_10_9_universal2
5
5