datamule: download sec filings easily
Posted by status-code-200@reddit | Python | View on Reddit | 2 comments
What My Project Does
Makes it easy and fast to download SEC filings in bulk. e.g.
downloader.download(form='10-K', ticker='META', output_dir='filings')
Potential applications
Academic research, finance, etc.
Target Audience
Programmers, academic researchers, and students.
Comparison
More than 10x as fast for bulk downloads than edgartools
.
Installation
pip install datamule
Quickstart
Either download the pre-built indices from the links in the readme and set the indices_path to the folder
from datamule import Downloader
downloader = Downloader()
downloader.set_indices_path(indices_path)
Or run the indexer
import sec_indexer
sec_index.run()
Example Downloads
# Example 1: Download all 10-K filings for Tesla using CIK
downloader.download(form='10-K', cik='1318605', output_dir='filings')
# Example 2: Download 10-K filings for Tesla and META using CIK
downloader.download(form='10-K', cik=['1318605','1326801'], output_dir='filings')
# Example 3: Download 10-K filings for Tesla using ticker
downloader.download(form='10-K', ticker='TSLA', output_dir='filings')
# Example 4: Download 10-K filings for Tesla and META using ticker
downloader.download(form='10-K', ticker=['TSLA','META'], output_dir='filings')
# Example 5: Download every form 3 for a specific date
downloader.download(form ='3', date='2024-05-21', output_dir='filings')
# Example 6: Download every 10K for a year
downloader.download(form='10-K', date=('2024-01-01', '2024-12-31'), output_dir='filings')
# Example 7: Download every form 4 for a list of dates
downloader.download(form = '4',date=['2024-01-01', '2024-12-31'], output_dir='filings')
Future
Will be integrated with an API to remove the need to download indices. Should be useful for developing lightweight applications where storage is an issue.
Links: GitHub
Lost_Blacksmith_9065@reddit
I like it!
status-code-200@reddit (OP)
Glad you like it! I just added support to download filings without indices. :)