datamule 0.421__cp311-cp311-win_amd64.whl → 0.423__cp311-cp311-win_amd64.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: mulebot
19
+ Requires-Dist: openai; extra == "mulebot"
20
+ Provides-Extra: mulebot-server
21
+ Requires-Dist: flask; extra == "mulebot-server"
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"
18
26
  Provides-Extra: all
19
27
  Requires-Dist: flask; extra == "all"
20
28
  Requires-Dist: psutil; extra == "all"
21
- Requires-Dist: pandas; extra == "all"
22
29
  Requires-Dist: openai; extra == "all"
30
+ Requires-Dist: pandas; extra == "all"
23
31
  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
- Provides-Extra: mulebot
29
- Requires-Dist: openai; extra == "mulebot"
30
- Provides-Extra: mulebot_server
31
- Requires-Dist: flask; extra == "mulebot-server"
32
-
@@ -3,7 +3,7 @@ datamule/document.py,sha256=6xEaI-32AQiBxX3gZcX4Qr49bgvcvLviFAwUGpTwtr0,5273
3
3
  datamule/helper.py,sha256=8HOjB3Y7svw_zjEY-AY5JKOJ-LrBiuQMPyok3MH6CCg,4716
4
4
  datamule/monitor.py,sha256=WVds1HGV_ojYgWmo0b4Dsiv9mzZ85HHnCucH-7XoUw8,9350
5
5
  datamule/packageupdater.py,sha256=qVabK4YwSd62OjIvNY59hcQNgZCi4R2PRgCenq7THgE,9790
6
- datamule/portfolio.py,sha256=T6V04T0WmN4Wy7cudiv3c2BbSxpUTt3mI3jZOsM6kUM,730
6
+ datamule/portfolio.py,sha256=OOlu_05S88uwg5Me_EpY3C7BQ93Yq9eE0_tMY_Gqyrw,1117
7
7
  datamule/submission.py,sha256=sB6tidsAdaqP5VIQEFPq6PjLTgmD-crgdNviaOpiqlU,2558
8
8
  datamule/data/company_former_names.csv,sha256=zTBWdV12_JE3aROFOMrFNTHLPW_M4TDruxtl15-XfA0,714528
9
9
  datamule/data/company_metadata.csv,sha256=X7uSIwConqC0sz-moIhXIISg6FI7GLGSlvAfDDf8Sd0,3078648
@@ -47,8 +47,8 @@ datamule/parser/document_parsing/n_port_p_parser.py,sha256=T6GliMm-TETPsFM-hDKt1
47
47
  datamule/parser/document_parsing/sec_parser.py,sha256=YewOdOsi0P25teQuxS5DNEND9ZCyxE2ewK1DoP9mPto,2788
48
48
  datamule/parser/document_parsing/sgml_parser.py,sha256=ASpe1SzgPj4qk0VOmmuMiEQeatjcwZzsuO3MvsYCHhc,3410
49
49
  datamule/parser/sgml_parsing/sgml_parser_cy.c,sha256=vxLnjpUgZ5LLvBvzYI_CZVxjpgRpulnzj3EFQG5eB8g,797203
50
- datamule/parser/sgml_parsing/sgml_parser_cy.cp311-win_amd64.pyd,sha256=Mc1QYbFOL0VSH7CAdmRO96pv-tiVstkgN2sXQf02SHg,122368
51
- datamule-0.421.dist-info/METADATA,sha256=i1oi8xSJc1SeXOoLdgf2gvHM7JhAT2utpXk3t7Bvu64,1039
52
- datamule-0.421.dist-info/WHEEL,sha256=y4n9_669c4ZQLyT56MHjc_JUbnwtaZfMVMycweN557o,102
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.cp311-win_amd64.pyd,sha256=tSF4wifCaeYt0k5FaphWD2UvdvujDzaYhgl_-rG_PM4,122368
51
+ datamule-0.423.dist-info/METADATA,sha256=3Pp8DmOMKNHmVQIc50199wNCJH9Lu2g_s9KQZ3ztzbw,1037
52
+ datamule-0.423.dist-info/WHEEL,sha256=nkBcd8Ko0v5sEcSagm2-x_RVrb8gBSkTa8VFFZ0Mr1o,101
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-win_amd64
5
5