Async client for the REST API of EDGAR which returns data structured into pydantic schemas and SEC filings
Project description
This project provides a async client for the EDGAR REST API which structures the responses into pydantic schemas.
The following purposes include adding financial statement reader classes, computing common metrics such as FCF, and adding classes to spot investment red flags.
Finally, perhaps adding, as a fallback to the EDGAR REST API, the pipeline of downloading, extracting and loading into the pydantic schemas the data directly from edgar txt/xbrl submissions.
Examples of CLI usage.
- Find submissions
python -m edgarito.cli submissions --cik 320193 --type 10-K
[2025-03-01 12:37:41,330][INFO][edgarito.services.edgar_rest_client.submissions_client] Got 1000 filings for CIK 320193
[2025-03-01 12:37:41,330][INFO][edgarito.services.edgar_rest_client.submissions_client] Getting additional filings for name='CIK0000320193-submissions-001.json' filingCount=1125 filingFrom=datetime.date(1994, 1, 26) filingTo=datetime.date(2014, 5, 28)
[2025-03-01 12:37:41,330][INFO][edgarito.services.edgar_rest_client.submissions_client] Got 1125 additional filings for name='CIK0000320193-submissions-001.json' filingCount=1125 filingFrom=datetime.date(1994, 1, 26) filingTo=datetime.date(2014, 5, 28)
[2025-03-01 12:37:41,346][INFO][Cli] 1994-12-13 0000320193-94-000016 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 1995-12-19 0000320193-95-000016 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 1996-12-19 0000320193-96-000023 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 1997-12-05 0001047469-97-006960 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 1999-12-22 0000912057-99-010244 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 2000-12-14 0000912057-00-053623 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 2002-12-19 0001047469-02-007674 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 2003-12-19 0001047469-03-041604 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 2004-12-03 0001047469-04-035975 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 2005-12-01 0001104659-05-058421 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 2006-12-29 0001104659-06-084288 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 2007-11-15 0001047469-07-009340 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 2008-11-05 0001193125-08-224958 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 2009-10-27 0001193125-09-214859 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 2010-10-27 0001193125-10-238044 10-K (10-K)
[2025-03-01 12:37:41,346][INFO][Cli] 2011-10-26 0001193125-11-282113 10-K (10-K)
[2025-03-01 12:37:41,347][INFO][Cli] 2012-10-31 0001193125-12-444068 10-K (10-K)
[2025-03-01 12:37:41,347][INFO][Cli] 2013-10-30 0001193125-13-416534 10-K (10-K)
[2025-03-01 12:37:41,347][INFO][Cli] 2014-10-27 0001193125-14-383437 10-K (10-K)
[2025-03-01 12:37:41,347][INFO][Cli] 2015-10-28 0001193125-15-356351 10-K (10-K)
[2025-03-01 12:37:41,347][INFO][Cli] 2016-10-26 0001628280-16-020309 10-K (10-K)
[2025-03-01 12:37:41,347][INFO][Cli] 2017-11-03 0000320193-17-000070 10-K (10-K)
[2025-03-01 12:37:41,347][INFO][Cli] 2018-11-05 0000320193-18-000145 10-K (10-K)
[2025-03-01 12:37:41,347][INFO][Cli] 2019-10-31 0000320193-19-000119 10-K (XBRL)
[2025-03-01 12:37:41,347][INFO][Cli] 2020-10-30 0000320193-20-000096 10-K (XBRL)
[2025-03-01 12:37:41,347][INFO][Cli] 2021-10-29 0000320193-21-000105 10-K (XBRL)
[2025-03-01 12:37:41,347][INFO][Cli] 2022-10-28 0000320193-22-000108 10-K (XBRL)
[2025-03-01 12:37:41,347][INFO][Cli] 2023-11-03 0000320193-23-000106 10-K (XBRL)
[2025-03-01 12:37:41,347][INFO][Cli] 2024-11-01 0000320193-24-000123 10-K (XBRL)
- Download last 10-K for AAPL
python -m edgarito.cli download --ticker aapl --type 10-K --limit 5
[2025-03-01 12:37:03,588][INFO][Cli] CIK: 320193
[2025-03-01 12:37:03,590][INFO][edgarito.services.edgar_rest_client.submissions_client] Got 1000 filings for CIK 320193
[2025-03-01 12:37:03,590][INFO][edgarito.services.edgar_rest_client.submissions_client] Getting additional filings for name='CIK0000320193-submissions-001.json' filingCount=1125 filingFrom=datetime.date(1994, 1, 26) filingTo=datetime.date(2014, 5, 28)
[2025-03-01 12:37:03,592][INFO][edgarito.services.edgar_rest_client.submissions_client] Got 1125 additional filings for name='CIK0000320193-submissions-001.json' filingCount=1125 filingFrom=datetime.date(1994, 1, 26) filingTo=datetime.date(2014, 5, 28)
[2025-03-01 12:37:03,601][INFO][Cli] 2020-10-30 0000320193-20-000096 10-K (XBRL)
[2025-03-01 12:37:03,601][INFO][Cli] 2021-10-29 0000320193-21-000105 10-K (XBRL)
[2025-03-01 12:37:03,602][INFO][Cli] 2022-10-28 0000320193-22-000108 10-K (XBRL)
[2025-03-01 12:37:03,602][INFO][Cli] 2023-11-03 0000320193-23-000106 10-K (XBRL)
[2025-03-01 12:37:03,602][INFO][Cli] 2024-11-01 0000320193-24-000123 10-K (XBRL)
[2025-03-01 12:37:03,602][INFO][DownloadService] Fetching https://www.sec.gov/Archives/edgar/data/320193/000032019320000096/0000320193-20-000096.txt
[2025-03-01 12:37:03,604][INFO][DownloadService] Fetching https://www.sec.gov/Archives/edgar/data/320193/000032019321000105/0000320193-21-000105.txt
[2025-03-01 12:37:03,604][INFO][DownloadService] Fetching https://www.sec.gov/Archives/edgar/data/320193/000032019322000108/0000320193-22-000108.txt
[2025-03-01 12:37:03,605][INFO][DownloadService] Fetching https://www.sec.gov/Archives/edgar/data/320193/000032019323000106/0000320193-23-000106.txt
[2025-03-01 12:37:03,605][INFO][DownloadService] Fetching https://www.sec.gov/Archives/edgar/data/320193/000032019324000123/0000320193-24-000123.txt
You can find more commands in edgarito.cli.__main__
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file edgarito-0.1.0.tar.gz.
File metadata
- Download URL: edgarito-0.1.0.tar.gz
- Upload date:
- Size: 30.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3950b64ad4fd174cf7ee6e3a2d4474a2cf8f744e836743cd2c1207f9dd122591
|
|
| MD5 |
e1bf8430556b762085893749e7b97b7c
|
|
| BLAKE2b-256 |
a2fbeffceb0d06aa7571d81ecffb68d344fc4a7e00e894b59925a6017cd122b0
|
File details
Details for the file edgarito-0.1.0-py3-none-any.whl.
File metadata
- Download URL: edgarito-0.1.0-py3-none-any.whl
- Upload date:
- Size: 32.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6a7bd7208f760c1026e312e3c2e7527e1678c9aa6ddbad0918c64b50e27cdea
|
|
| MD5 |
9312a8e8fc21186384ae54ff63b08356
|
|
| BLAKE2b-256 |
fd37d1ae2c91ed9038bfce408cf84abcf4fd5d2a80176420f092d17c6e5da395
|