Skip to main content

An enhanced version of sec-edgar-downloader with caching capabilities and in-memory data retrieval. Designed for efficient SEC EDGAR document processing.

Project description

sec-downloader

Install

pip install sec_downloader

Features

  • Instead of being saved to disk, files are directly downloaded into memory.
  • Use “glob” pattern to select which files are read to memory.

How to use

Downloading multiple documents:

from sec_edgar_downloader import Downloader
from sec_downloader import DownloadStorage

storage = DownloadStorage()
with storage as path:
    dl = Downloader("MyCompanyName", "email@example.com", path)
    dl.get("10-K", "GOOG", limit=2)

for path, content in storage.get_file_contents():
    print(f"Path: {path}\nContent [len={len(content)}]: {content[:30]}...\n")
Path: sec-edgar-filings/GOOG/10-K/0001652044-22-000019/full-submission.txt
Content [len=15044932]: <SEC-DOCUMENT>0001652044-22-00...

Path: sec-edgar-filings/GOOG/10-K/0001652044-23-000016/full-submission.txt
Content [len=15264470]: <SEC-DOCUMENT>0001652044-23-00...

Let’s demonstrate how to download a single file (latest 10-Q filing details in HTML format) to memory.

ONLY_HTML = "**/*.htm*"

storage = DownloadStorage(filter_pattern=ONLY_HTML)
with storage as path:
    dl = Downloader("MyCompanyName", "email@example.com", path)
    dl.get("10-Q", "AAPL", limit=1, download_details=True)

content = storage.get_file_contents()[0].content
print(f"{content[:50]}...")
<?xml version="1.0" ?><!--XBRL Document Created wi...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sec-downloader-0.0.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sec_downloader-0.0.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file sec-downloader-0.0.2.tar.gz.

File metadata

  • Download URL: sec-downloader-0.0.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for sec-downloader-0.0.2.tar.gz
Algorithm Hash digest
SHA256 aefaaebc0a596d450995249b9d21bc103554127e73b09f6c0b301f1f93aba992
MD5 357d98a9edca6f35a701c14c93441975
BLAKE2b-256 7c71a7ce340277e1fb3fb1c724cba6e3c2cb3959e98238c9db91b1e2e86a76e2

See more details on using hashes here.

File details

Details for the file sec_downloader-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: sec_downloader-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for sec_downloader-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d279734eb7252a3c8c36fb25e66139494bf36ba058b8adc191b3e9e7a4a41a3f
MD5 878bba5dce5bedfe2f8e65e344163b97
BLAKE2b-256 99f07a29d018cc1fa0cd54802a482a505cfd9fb537711c44e08ae08e2693cdd8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page