Skip to content

Commit

Permalink
Updated rst README
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyism committed Oct 19, 2019
1 parent 432045a commit 88c6fbe
Showing 1 changed file with 87 additions and 51 deletions.
138 changes: 87 additions & 51 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,103 +1,139 @@

EDGAR
=====

A small library to access files from SECs edgar.
A small library to access files from SEC's edgar.

Installation
------------

pip install edgar
..
pip install edgar


Example
-------

To get a company’s latest 5 10-Ks, run
To get a company's latest 5 10-Ks, run

.. code-block:: python
from edgar import Company
company = Company("Oracle Corp", "0001341439")
tree = company.getAllFilings(filingType = "10-K")
docs = edgar.getDocuments(tree, noOfDocuments=5)
or

.. code-block:: python
.. code:: python
from edgar import Company, TXTML
import edgar
company = edgar.Company("Oracle Corp", "0001341439")
tree = company.getAllFilings(filingType = "10-K")
docs = edgar.getDocuments(tree, noOfDocuments=5)
company = Company("INTERNATIONAL BUSINESS MACHINES CORP", "0000051143")
doc = company.get10K()
text = TXTML.parseFull10K(doc)
To get all companies and find a specific one, run

.. code:: python
.. code-block:: python
import edgar
edgar = edgar.Edgar()
possible_companies = edgar.findCompanyName("Cisco System")
from edgar import Edgar
edgar = Edgar()
possible_companies = edgar.findCompanyName("Cisco System")
API
---

Company
~~~~~~~
^^^^^^^

The **Company** class has two fields:

- name (company name)
- cik (company CIK number)

* name (company name)
* cik (company CIK number)

getFilingsUrl
'''''''''''''
"""""""""""""

Returns a url to fetch filings data


* **Input**

Returns a url to fetch filings data \* **Input** \* filingType: The type
of document you want. i.e. 10-K, S-8, 8-K. If not specified, it’ll
return all documents \* priorTo: Time prior which documents are to be
retrieved. If not specified, it’ll return all documents \* ownership:
defaults to include. Options are include, exclude, only. \* noOfEntries:
defaults to 100. Returns the number of entries to be returned. Maximum
is 100.
* filingType: The type of document you want. i.e. 10-K, S-8, 8-K. If not specified, it'll return all documents
* priorTo: Time prior which documents are to be retrieved. If not specified, it'll return all documents
* ownership: defaults to include. Options are include, exclude, only.
* noOfEntries: defaults to 100. Returns the number of entries to be returned. Maximum is 100.

getAllFilings
'''''''''''''
"""""""""""""

Returns the HTML in the form of
`lxml.html <http://lxml.de/lxmlhtml.html>`__ \* **Input** \* filingType:
The type of document you want. i.e. 10-K, S-8, 8-K. If not specified,
it’ll return all documents \* priorTo: Time prior which documents are to
be retrieved. If not specified, it’ll return all documents \* ownership:
defaults to include. Options are include, exclude, only. \* noOfEntries:
defaults to 100. Returns the number of entries to be returned. Maximum
is 100.
Returns the HTML in the form of `lxml.html <http://lxml.de/lxmlhtml.html>`_

.. edgar-1:

* **Input**

* filingType: The type of document you want. i.e. 10-K, S-8, 8-K. If not specified, it'll return all documents
* priorTo: Time prior which documents are to be retrieved. If not specified, it'll return all documents
* ownership: defaults to include. Options are include, exclude, only.
* noOfEntries: defaults to 100. Returns the number of entries to be returned. Maximum is 100.

Edgar
~~~~~
^^^^^

Gets all companies from EDGAR

Gets all companies from EDGAR ##### getCikByCompanyName \* **Input** \*
name: name of the company
getCikByCompanyName
"""""""""""""""""""


* **Input**

* name: name of the company

getCompanyNameByCik
'''''''''''''''''''
"""""""""""""""""""


- **Input**
* **Input**

- cik: cik of the company
* cik: cik of the company

findCompanyName
'''''''''''''''
"""""""""""""""

- **Input**

- words: input words to search the company
* **Input**

* words: input words to search the company

getDocuments
~~~~~~~~~~~~
^^^^^^^^^^^^

Returns a list of strings, each string contains the body of the specified document from input


Returns a list of strings, each string contains the body of the
specified document from input \* **Input** \* tree: lxml.html form that
is returned from Company.getAllFilings \* noOfDocuments: number of
document returned. If it is 1, the returned result is just one string,
instead of a list of strings. Defaults to 1.
* **Input**

* tree: lxml.html form that is returned from Company.getAllFilings
* noOfDocuments: number of document returned. If it is 1, the returned result is just one string, instead of a list of strings. Defaults to 1.

Release Notes
-------------

**0.3.0** \* Added findCompanyName to Edgar
**0.3.0**


* Added findCompanyName to Edgar

**0.2.0**


* Added Edgar

**0.1.0**

**0.2.0** \* Added Edgar

**0.1.0** \* First release
* First release

0 comments on commit 88c6fbe

Please sign in to comment.