Skip to main content
Download the SEC EDGAR fillings index with python-edgar
=========

python-edgar downloads the EDGAR fillings index from the SEC FTP. The index is comprised of IDX files. An IDX file is a csv-like file that contains the following information:
- Company name (eg. ```TWITTER, INC```)
- Company CIK (eg.``` 0001418091```)
- Filling date (eg. ```2013-10-03```)
- Filling type (eg. ```S1```)
- Filling URL on EDGAR (```edgar/data/1418091/0001193125-13-390321.txt```)


python-edgar takes care of generating the index' file list, download the files and strip the headers so all you have to do is open the files with ```csv.csvreader(idxfile, delimiter="|")``` to have the data programmatically usable.


How to use python-edgar
---
Install from pip in a virtualenv
```sh
pip install python-edgar
```

Download EDGAR index
```python
import edgar
import ftplib
ftp = ftplib.FTP(edgar.FTP_ADDR)
ftp.login()
try:
edgar.download_all(ftp, "/tmp")
except Exception as e:
print e
finally:
ftp.close()

>>> INFO:edgar:downloading edgar/daily-index/master.20140417.idx file in /tmp/
INFO:edgar:downloaded edgar/daily-index/master.20140417.idx
INFO:edgar:downloading edgar/daily-index/master.20140418.idx file in /tmp/
INFO:edgar:downloaded edgar/daily-index/master.20140418.idx
INFO:edgar:downloading edgar/daily-index/master.20140421.idx file in /tmp/
```

List the index files downloaded
```python
import glob

>>> In [8]: for idx in glob.glob("/tmp/*.idx"):
...: print idx
...:
/tmp/edgar.daily-index.master.20140417.idx
/tmp/edgar.daily-index.master.20140418.idx
/tmp/edgar.daily-index.master.20140421.idx
/tmp/edgar.daily-index.master.20140422.idx
...
```

License
----

MIT

[Edouard Swiac]: edouard.swiac@gmail.com

Metadata

Release files for python-edgar 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-edgar 1.0
File Size Uploaded
python-edgar-1.0.tar.gz 3.7 kB Details

Release files / python-edgar-1.0.tar.gz

Download URL python-edgar-1.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d0dbe7501d457e21540813f3c34e3e0110e51b83e8b3ca42752af17dce5dac52
BLAKE2b-256 checksum
How to use checksums
8f32b4fb04d31b70f6fc6e032ed653014403918dcb3c6c6f41471ffacb922839
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

3.1.3

2 release files

3.1.2

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.6.1

2 release files

2.5

2 release files

2.3

3 release files

This release

1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page