项目作者: csparpa

项目描述 :
Exercise on Last.fm data aggregation
高级语言: Python
项目地址: git://github.com/csparpa/last.fm-stats.git
创建时间: 2014-10-14T10:06:38Z
项目社区:https://github.com/csparpa/last.fm-stats

开源协议:MIT License

下载


last.fm-stats

Exercise on Last.fm data aggregation

Works on

Python 2.7

How to use it

  1. Clone source code into a folder the Python interpreter can write into (eg. your
    home directory):

    1. $ git clone git@github.com:csparpa/last.fm-stats.git
  2. Install dependencies:

    1. $ cd last.fm_stats
    2. $ sudo pip install -r requirements.txt

    (omit sudo if on Windows)

  3. Launch the script replacing <username> with the username you want stats for:
    ```bash
    $ python lastfm_stats.py

You have listened to a total of 254 tracks.
Your top 5 favorite artists: U2, Led Zeppelin, Rolling Stones, Bob Marley, Kasabian.
You listen to an average of 32 tracks a day.
Your most active day is Tuesday.

  1. How to run the test suites
  2. --------------------------
  3. Make sure you are inside the git-cloned folder and execute:
  4. ```bash
  5. $ python -m unittest discover

What you need to know

  • Only unit tests have been provided, using mocks where needed for the
    external components:
    • Last.fm web API
    • SQLite database
  • Average tracks per day are rounded to the lowest integer value