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

Potentially problematic release.


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

@@ -12,6 +12,7 @@ from company_fundamentals import construct_fundamentals
12
12
  from decimal import Decimal
13
13
  from ..utils.format_accession import format_accession
14
14
  from .tar_submission import tar_submission
15
+ import zstandard as zstd
15
16
 
16
17
  # probably needs rework later
17
18
  class FundamentalsAccessor:
@@ -105,6 +106,10 @@ class Submission:
105
106
 
106
107
  if response.getcode() == 200:
107
108
  sgml_content=response.read()
109
+ content_type = response.headers.get('Content-Type', '')
110
+ if content_type == 'application/zstd':
111
+ dctx = zstd.ZstdDecompressor()
112
+ sgml_content = dctx.decompress(sgml_content)
108
113
  else:
109
114
  raise ValueError(f"URL: {url}, Error: {response.getcode()}")
110
115
 
@@ -116,6 +121,7 @@ class Submission:
116
121
  metadata = transform_metadata_string(metadata)
117
122
 
118
123
  self.metadata = Document(type='submission_metadata', content=metadata, extension='.json',filing_date=None,accession=None,path=None)
124
+
119
125
  self.filing_date= f"{self.metadata.content['filing-date'][:4]}-{self.metadata.content['filing-date'][4:6]}-{self.metadata.content['filing-date'][6:8]}"
120
126
 
121
127
  self.documents_obj_list = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datamule
3
- Version: 2.3.7
3
+ Version: 2.3.8
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=4UtdViw-h_4Rqt09SFe8-WWdLqaD55T3vqTUVRB0CsE,17058
46
+ datamule/submission/submission.py,sha256=I_7F658vTW1C_dsogIXdxXnV3W1Gbfj_6uzse1YHgY0,17343
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.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,,
68
+ datamule-2.3.8.dist-info/METADATA,sha256=wJ1iQL5mMQ6hyK9Wqh27ohWjZmCoZmi3XfXC5PwCwL8,609
69
+ datamule-2.3.8.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
70
+ datamule-2.3.8.dist-info/top_level.txt,sha256=iOfgmtSMFVyr7JGl_bYSTDry79JbmsG4p8zKq89ktKk,9
71
+ datamule-2.3.8.dist-info/RECORD,,