Insider is a transaction-tracking application written in Python_ using the Django_ framework. Install ======= Download -------- Insider is published as a Git_ repository. See `insider's web interface`__ for more information. __ insider_ Dependencies ------------ Outside of Django_ and the Python_ standard libraries, the only required dependency is `django-tables2`_ (docs__). For some of the scraping libraries (`insider/scrape/*`), you'll also need BeautifulSoup_. __ dt2-docs_ Quick-start =========== If you don't have a Django project and you just want to run insider as a stand-alone service, you can use the example project written up in `example`. Set up the project (once):: $ python example/manage.py syncdb See the `Django documentation`_ for more details. Run === Run the app on your local host (as many times as you like):: $ python example/manage.py runserver You may need to add the current directory to `PYTHONPATH` so `python` can find the `insider` package. If you're running `bash`, that will look like $ PYTHONPATH=".:$PYTHONPATH" python example/manage.py runserver Scraping ======== Entering transaction data by hand can be tedious and error prone. To automate the task, you should write scrapers to look up and enter transaction data automatically. To get you started, I've written `insider/scrape/nasdaq.py`, which scrapes `NASDAQ's interface`__ to `EDGAR`_\'s data. Use the scraper with something like:: $ export PYTHONPATH='.' $ export DJANGO_SETTINGS_MODULE='example.settings' $ python insider/scrape/nasdaq.py NYSE:RHT NASDAQ:GOOG __ NASDAQ_ If the scraper doesn't extract company names (`nasdaq.py` does not), it's probably a good idea to add the relevant `Company` and `Ticker` to the database before running the scraper. Otherwise you may get tickers from several exchanges all pointing to the company `UNKNOWN`. Hacking ======= This project was largely build following the `Django tutorial`_. That's a good place to start if you're new to Django. .. _Python: http://www.python.org/ .. _Django: https://www.djangoproject.com/ .. _Git: http://git-scm.com/ .. _insider: http://git.tremily.us/?p=insider.git .. _django-tables2: https://github.com/bradleyayers/django-tables2/ .. _dt2-docs: http://django-tables2.readthedocs.org/en/latest/ .. _BeautifulSoup: http://www.crummy.com/software/BeautifulSoup/ .. _Django documentation: https://docs.djangoproject.com/ .. _NASDAQ: http://www.nasdaq.com/reference/ownership.stm .. _EDGAR: http://www.edgar-online.com/ .. _Django tutorial: https://docs.djangoproject.com/en/1.3/intro/tutorial01/