Add configurable concurrency to selected filing downloads
Feature Category
- [x] Performance improvement
Problem Statement
Downloading a large batch of selected filings can take a long time. When download_filings() uses source="submission", it fetches and saves each filing before starting the next. On a connection with noticeable latency, independent requests could overlap and reduce the total wait.
Who would benefit from this feature?
- [x] Financial analysts and researchers
- [x] Advanced developers building financial applications
- [x] Data scientists working with financial datasets
Proposed Solution
Add an optional max_workers parameter to download_filings() for selected filing downloads using source="submission". A value of 4 would allow up to four downloads in flight. I propose defaulting to 1 so callers can opt in.
All workers would use the existing HTTP request helper and share EdgarTools’ rate limiter. The worker count would control how many downloads can overlap, while the rate limiter would control how often requests can start.
Alternatives considered
Users can create their own thread pool, but they would need to manage batch progress and errors themselves. Daily feed archives are also an option when downloading filings by date. The proposed option is for callers who already have a specific set of filings to download.
Use Case Example
from edgar import Company, download_filings
filings = Company("AAPL").get_filings(form="10-Q")
# Proposed API
download_filings(filings=filings, source="submission", max_workers=4)