Downloads various SEC EDGAR files converting many to CSV files
Project description
EDGARquery
Table of Contents
NOT YET only in test.pypi for now
pip install edgarquery
-[Usage]
Right now, three environmental variables are needed: EQDIR - the location of the python scripts used only by x.sh
EQODIR - the location to store the output EQEMAIL - required by the SEC to download some of the files with curl.
Each script is standalone although some depend upon data downloaded by edgarqyery.py or by something like curl. The x.sh(I know) test script shows some of the usage
Use doquery.py as a command to retrieve EDGAR files, then use the appropriate *tocsv.py file as a command to generate CSV file(s)
doquery.py retrieves files described in https://www.sec.gov/edgar/sec-api-documentation
query SEC EDGAR site NOTE thæt EQEMAIL env variable is required and must contain a valid User-Agent such as your email address
options: -h, --help show this help message and exit --cik CIK 10-digit Central Index Key leading 0s are added if necessary --cy CY calendar year e.g. CY2023, CY2023Q1, CY2023Q4I --frame FRAME reporting frame e.g us-gaap, ifrs-full, dei, srt --units UNITS USD or shares --fact FACT fact to collect e.g AccountsPayableCurrent, AssetsCurrent, DebtCurrent shares --tf TF file in which to store the output argument allowed for each query type defaults provided for each download in /tmp --companyconcept returns all the XBRL disclosures from a single company --cik required --frame - default us-gaap --fact - default USD-per-shares --companyfacts aggregates one fact for each reporting entity that is last filed that most closely fits the calendrical period requested --cik required --xbrlframes returns all the company concepts data for a CIK --cy required --companyfactsarchivezip returns daily companyfacts index in a zip file --cik required --submissionszip returns daily index of submissions in a zip file
doquery.py contains the class EDGARquery
EDGARquery.gency generates a CY type I value for the previous quarter
EDGARquery.query retrieves a url and returns the response
EDGARquery.storequery stores a url response in a file
EDGARquery.companyconcept - all xbrl disclosures for one company in JSON cik - 10-digit Central Index Key - required leading zeros are added if necessary frame - reporting frame e.g us-gaap, ifrs-full, dei, srt fact - fact to collect e.g AccountsPayableCurrent
EDGARquery.companyfacts - all the company concepts data for a company cik - 10-digit Central Index Key required leading zeros are added if necessary
EDGARquery.xbrlframes - aggregates one fact for each reporting entity that was last filed that most closely fits the calendrical period requested. This API supports for annual, quarterly and instantaneous data: frame - reporting frame e.g us-gaap, ifrs-full, dei, srt fact - fact to collect cy - calendar year e.g. CY2023, CY2023Q1, CY2023Q4I only the I version seems to be available
EDGARquery.companyfactsearchzip - all the data from the XBRL Frame API and the XBRL Company Facts in a zip file
EDGARquery.submissionzip - public EDGAR filing history for all filers
EDGARquery.financialstatementandnotesdataset - numeric summariæs of financial statements.
edgarcompanyfactstocsv.py EDGARCompanyFactstoCSV class generates csv files from the json file returned by EDGARquery.companyfacts. Note that a somewhat large number of csv files are generated
edgarcompanyconceptstocsv.py EDGARCompanyConcepttoCSV convert the companyconcepts.json file retrieved by doquery.py and convert to csv files
edgarxbrlframestocsv.py EDGARXBRLFramestoCSV class generates a csv file for the json file returned by EDGARquery.xbrlframes
edgarcompanyfactsziptocsv.py EDGARCompanyFactsziptoCSV - not yet implemented
edgarsubmissionsziptocsv.py EDGARSubmissionsziptoCSV convert the json files in the submissions.zip EDGAR file to csv files for each submitter
edgarlatest10k.py EDGARLatest10K class find the url to the latest 10-K for a CIK
edgarlatestsubmissions.py EDGARLatest10K class return the latest submissions for a CIK
edgarsubmissions.py EDGARSubmissions class to return links to submissions for a CIK for a year
edgartickerstocsv.py EDGARTickerstoCSV class to convert EDGAR company_tickers.json company_tickers_exchange.json and company_tickers_mf.json to csv files
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file edgarquery-0.0.39.tar.gz
.
File metadata
- Download URL: edgarquery-0.0.39.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d323eeeb0928085becfbc9f3def6961cc7174e2f356cd71a84c707814801990 |
|
MD5 | 5cd7cdd438f5fdc8698166057bea0ad9 |
|
BLAKE2b-256 | b621bffbc856199b88b066a634c2292e6f6af75dd0aa382aa6f188b5a7817c5b |
File details
Details for the file edgarquery-0.0.39-py3-none-any.whl
.
File metadata
- Download URL: edgarquery-0.0.39-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd3a48b42f0250ce3f4e6b66b3933ac8e705e9291a3824514af91076b4b278ed |
|
MD5 | 4ea5e63c1bc5e08e4e5851cc2c5a6171 |
|
BLAKE2b-256 | 91712a622e69a8408fab2ef879e3c86a925aee38fb4bc37dc012b642ee101661 |