datamule 2.3.6__py3-none-any.whl → 2.3.7__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.

Potentially problematic release.


This version of datamule might be problematic. Click here for more details.

@@ -6,8 +6,6 @@ from secsgml.parse_sgml import transform_metadata_string
6
6
  from secsgml.utils import bytes_to_str
7
7
  from ..sec.utils import headers
8
8
  import tarfile
9
- import zstandard as zstd
10
- import gzip
11
9
  import urllib.request
12
10
  from secxbrl import parse_inline_xbrl
13
11
  from company_fundamentals import construct_fundamentals
@@ -22,10 +20,19 @@ class FundamentalsAccessor:
22
20
  self._cache = {}
23
21
  self._all_data = None
24
22
 
25
- def __getattr__(self, category):
26
- if category not in self._cache:
27
- self._cache[category] = self.submission.parse_fundamentals(categories=[category])
28
- return self._cache[category]
23
+ def __getattr__(self, name):
24
+ # Try as category first
25
+ try:
26
+ if name not in self._cache:
27
+ result = self.submission.parse_fundamentals(categories=[name])
28
+ if result: # Only cache if we got actual data
29
+ self._cache[name] = result
30
+ return result
31
+ except:
32
+ pass
33
+
34
+ # Fall back to dict behavior
35
+ return getattr(self._get_all_data(), name)
29
36
 
30
37
  def _get_all_data(self):
31
38
  if self._all_data is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datamule
3
- Version: 2.3.6
3
+ Version: 2.3.7
4
4
  Summary: Work with SEC submissions at scale.
5
5
  Home-page: https://github.com/john-friedman/datamule-python
6
6
  Author: John Friedman
@@ -43,7 +43,7 @@ datamule/seclibrary/bq.py,sha256=TOP0WA6agDKu4vE1eHd62NDpAc02LDDrOP-g1bJpxbw,180
43
43
  datamule/sheet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  datamule/sheet/sheet.py,sha256=Dw979JGygS566N0Iwsvqk0h1s26GfbrIHDWiBaS2oH8,10711
45
45
  datamule/submission/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
- datamule/submission/submission.py,sha256=_dcQFZ0f8Me4-R5E92_HHNb_k2shcspRgQeN3s5-db4,16836
46
+ datamule/submission/submission.py,sha256=4UtdViw-h_4Rqt09SFe8-WWdLqaD55T3vqTUVRB0CsE,17058
47
47
  datamule/submission/tar_submission.py,sha256=lkm1neVLW2_-G26VylL6Rzx98Cavvml0Qd2wlJHD0bw,3075
48
48
  datamule/tables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
49
  datamule/tables/tables.py,sha256=Z3Eu6bdjiaNx4pgXlTMwk2Q-DhpMpEAygF2kJdp-Pu8,5722
@@ -65,7 +65,7 @@ datamule/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
65
  datamule/utils/construct_submissions_data.py,sha256=NB_hvfxlRXPyt4Fgc-5qA8vJRItkLhBedCSTaxwW7Jg,5887
66
66
  datamule/utils/format_accession.py,sha256=60RtqoNqoT9zSKVb1DeOv1gncJxzPTFMNW4SNOVmC_g,476
67
67
  datamule/utils/pdf.py,sha256=Z9xrdVhKex2YdvjYsaPaygRE_J6P_JNiUGkwflz2Hw0,735
68
- datamule-2.3.6.dist-info/METADATA,sha256=njsh6r7ekNM3iYGV1GIAns0_fMAlxYy6nOcxlRrHIeI,609
69
- datamule-2.3.6.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
70
- datamule-2.3.6.dist-info/top_level.txt,sha256=iOfgmtSMFVyr7JGl_bYSTDry79JbmsG4p8zKq89ktKk,9
71
- datamule-2.3.6.dist-info/RECORD,,
68
+ datamule-2.3.7.dist-info/METADATA,sha256=1Igs40zdVpr6XPH4s2ToG5EIyAsI1lpdA1yiuGUjsx4,609
69
+ datamule-2.3.7.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
70
+ datamule-2.3.7.dist-info/top_level.txt,sha256=iOfgmtSMFVyr7JGl_bYSTDry79JbmsG4p8zKq89ktKk,9
71
+ datamule-2.3.7.dist-info/RECORD,,