Add directions + package description to usage/index docs

This commit is contained in:
Cameron Yick
2017-08-27 00:26:58 -04:00
parent 89029b6af8
commit d490fd3841
4 changed files with 70 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ Types of Contributions
Report Bugs Report Bugs
~~~~~~~~~~~ ~~~~~~~~~~~
Report bugs at https://github.com/hydrosquall/tiingo/issues. Report bugs at https://github.com/hydrosquall/tiingo-python/issues.
If you are reporting a bug, please include: If you are reporting a bug, please include:
@@ -45,7 +45,7 @@ articles, and such.
Submit Feedback Submit Feedback
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
The best way to send feedback is to file an issue at https://github.com/hydrosquall/tiingo/issues. The best way to send feedback is to file an issue at https://github.com/hydrosquall/tiingo-python/issues.
If you are proposing a feature: If you are proposing a feature:
@@ -62,12 +62,12 @@ Ready to contribute? Here's how to set up `tiingo` for local development.
1. Fork the `tiingo` repo on GitHub. 1. Fork the `tiingo` repo on GitHub.
2. Clone your fork locally:: 2. Clone your fork locally::
$ git clone git@github.com:your_name_here/tiingo.git $ git clone git@github.com:your_name_here/tiingo-python.git
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
$ mkvirtualenv tiingo $ mkvirtualenv tiingo-python
$ cd tiingo/ $ cd tiingo-python/
$ python setup.py develop $ python setup.py develop
4. Create a branch for local development:: 4. Create a branch for local development::
@@ -102,7 +102,7 @@ Before you submit a pull request, check that it meets these guidelines:
your new functionality into a function with a docstring, and add the your new functionality into a function with a docstring, and add the
feature to the list in README.rst. feature to the list in README.rst.
3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check 3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check
https://travis-ci.org/hydrosquall/tiingo/pull_requests https://travis-ci.org/hydrosquall/tiingo-python/pull_requests
and make sure that the tests pass for all supported Python versions. and make sure that the tests pass for all supported Python versions.
Tips Tips

View File

@@ -1,6 +1,25 @@
Welcome to Tiingo Python's documentation! Welcome to Tiingo Python's documentation!
====================================== ======================================
.. image:: https://img.shields.io/pypi/v/tiingo.svg
:target: https://pypi.python.org/pypi/tiingo
.. image:: https://img.shields.io/travis/hydrosquall/tiingo-python.svg
:target: https://travis-ci.org/hydrosquall/tiingo-python
.. image:: https://readthedocs.org/projects/tiingo-python/badge/?version=latest
:target: https://tiingo-python.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/hydrosquall/tiingo-python/shield.svg
:target: https://pyup.io/repos/github/hydrosquall/tiingo-python/
:alt: Updates
.. image:: https://codecov.io/gh/hydrosquall/tiingo-python/branch/master/graph/badge.svg
:target: https://codecov.io/gh/hydrosquall/tiingo-python
:alt: Coverage
Contents: Contents:
.. toctree:: .. toctree::
@@ -14,6 +33,14 @@ Contents:
authors authors
history history
Tiingo is a financial data platform that makes high quality financial tools available to all. They have a RESTful and Real-Time Data API. Presently, the API includes support for the following endpoints:
* Stock Market Ticker Closing Prices + Metadata. Data includes full distribution details and is validated using a proprietary EOD Price Engine.
* Mutual Funds Metadata + Metrics updated daily. Supports over 26,500 Mutual Funds and ETFs.
* (Coming Soon): Curated news from top financial news sources + curated blogs. Stories are tagged by Tiingo's algorithms.
Indices and tables Indices and tables
================== ==================

1
docs/requirements.txt Normal file
View File

@@ -0,0 +1 @@
tiingo

View File

@@ -5,3 +5,39 @@ Usage
To use Tiingo Python in a project:: To use Tiingo Python in a project::
import tiingo import tiingo
Now you can use the ``TiingoClient`` to make your API calls. (Other parameters are available for each endpoint beyond what has been written below, see docs for full details.)
.. code-block:: python
from tiingo import TiingoClient
# Set TIINGO_API_KEY in your environment variables in your .bash_profile, OR
# pass a dictionary with 'api_key' as a key into the TiingoClient.
# With environment variable
client = TiingoClient()
# With hardcoded dictionary key
client = TiingoClient({'api_key': "MY_SECRET_API_KEY"})
# Get Ticker
# See official docs for list of all supported tickers + date ranges
ticker_metadata = client.get_ticker_metadata("GOOGL")
# Get latest prices, based on 3+ sources, as CSV or JSON, sampled weekly
ticker_price = client.get_ticker_price("GOOGL", frequency="weekly")
# WARNING: These will only work if your account has access to the
# Mutual Funds portion of the API.
# Get mutual fund metadata
fund_metadata = client.get_fund_metadata("VFINX")
# Get mutual fund Expenses and Shareholder Fee Data for June 2017
fund_metrics = client.get_fund_metrics("VFINX", "2017-06-01", "2017-06-30")
# Get news articles about given tickers or search terms from given domains
# Coming soon!
Further Docs
--------
* Official Tiingo Documentation: https://api.tiingo.com
* Tiingo-Python Documentation (Under Construction): https://tiingo-python.readthedocs.io.