Cached Information
Metadata Class
- class edgar.Metadata(data_dir, *arg, **kw)
Track the application of EDGAR functions, and hold the metadata attributes of files as they are accessed.
- file_set_processed(tikr: str, submission: str, filename: str, val: bool)
Set the status for file_was_processed function.
- file_was_processed(tikr: str, submission: str, filename: str)
Return True if file has a loaded copy available locally.
Notes
This indicates whether there is any extra information available for download from the SEC EDGAR database, but does not track new releases.
- find_sequence_of_file(tikr: str, submission: str, filename: str)
Return the Official SEC numerical indexing for a submitted file.
Notes
Each submission has an associated collection of documents that are identified by their sequence.
Sequence counts upwards from 1, but may skip numbers. It is typical but not guaranteed that the primary file has sequence 1 and the supplementary materials ascend in sequence.
- get_10q_name(tikr, submission)
Get the primary document name of an 10-Q filing.
- Parameters
tikr (str) – a company identifier to query
submission – the associated company filing for which to find a 10-Q form
- Returns
filename – The name of the submission’s 10-Q file, or None
- Return type
str, None
- get_8k_name(tikr, submission)
Get the primary document name of an 8-K filing.
- Parameters
tikr (str) – a company identifier to query
submission – the associated company filing for which to find a 8-K form
- Returns
filename – The name of the submission’s 8-K file, or None
- Return type
str, None
- get_doctype(tikr, submission, filename)
Return the document type of a file.
Notes
While a 10-Q filing has a 10-Q file associated, a 10-Q filing may have several supplementary materials included of different document types.
- get_primary_doc_name(tikr: str, submission: str, document_type: Optional[str] = None)
Get the name of the primary document in a submission.
- Parameters
tikr (str) – a company identifier to query
submission (str) – The associated company filing to find the primary form for.
implemented (TODO not) –
- get_submissions(tikr)
Get a list of filing submissions under a company.
- Parameters
tikr (str) – a company identifier to query
- get_tikr_list()
Download list of all companies in the SEC database if not already present. Return list of valid company ticker targets for download.
- Returns
tikr – All SEC filing company public stock tickers.
- Return type
list[str]
- initialize_submission_metadata(tikr, submission)
Generate a submission entry for a company tikr if not present.
- initialize_tikr_metadata(tikr)
Generate a company entry in metadata if not yet present.
- is_downloaded(tikr: str)
Return True if TIKR has local results of bulk download.
Notes
This indicates whether there is any extra information available for download from the SEC EDGAR database, but does not track new releases.
- is_unpacked(tikr: str, document_type: str)
Return True if TIKR had previously unpacked all instances of this document type, and they are present locally.
- Parameters
document_type (str or DocumentType) – The document type in question
- load_keys()
Load APIKEYs from local directory.
- load_tikr_metadata(tikr)
Load previously generated metadata and add to current.
- offload_submission_file(tikr: str, submission: str)
Delete submission from local dataset, removing it from disk.
- reset(keep_api_header: bool = True)
Delete stored metadata about investigated companies.
- Parameters
keep_api_header (Bool, default True) – If True, then does not delete api-header information.
- save_keys()
Save current APIKEYs to local directory.
- save_tikr_metadata(tikr)
Offload metadata to file, for later loading.
- set_downloaded(tikr: str, value: bool = True)
Set the status for is_downloaded function.
- set_unpacked(tikr, document_type, value=True)
Set the status for is_unpacked function.