{ "info": { "author": "Danny Goodall", "author_email": "danny@onebloke.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "PythonTop40\n===========\n\nThe **PythonTop40** library is designed to be used in UK schools to provide students with access to data that describes\nthe UK Top 40 singles and albums.\n\nThis is part of a wider initiative that I'm referring to as **Code-Further**. The hope is that by providing simple\ninterfaces to information that is relevant to students, they will be able to relate to the data and imagine more\nways in which they could consume and use it in their code - and hopefully **Code-Further**.\n\nThe data that **PythonTop40** accesses is provided by the excellent work by\n`@Ben Major `_ and his\n`UK Top 40 Charts API `_.\n\n**PythonTop40** is under active development visit\n`this blog post `_\nfor more information. and licensed under the `Apache2 license `_,\nso feel free to `contribute `_ and\n`report errors and suggestions `_.\n\n.. note::\n The **PythonTop40** library is designed to be used in UK schools to provide programmatic access to data that\n describes the UK Top 40 singles and albums. The hope is that by providing simple interfaces to access\n information that students may have an interest in, they may be inspired to **code-further**.\n This documentation will therefore most likely be aimed at teachers and education professionals, who may not have a\n deep knowledge of Python.\n\n.. warning::\n **PythonTop40** is currently designed to work with Python version 3. I have recently carried out some work to make\n it run on Python 2, but this does need to be more thoroughly tested that my current Nose tests allow. If you\n `encounter any issues `_, or you'd like to `submit a pull\n request `_, please contact me on BitBucket.\n\nUsage\n-----\n**PythonTop40** exposes a very simple API to developers. It is accessed by importing the :class:`~top40.Top40`\nclass into your module and creating an instance of this class, like so::\n\n from pythontop40 import Top40\n top40 = Top40()\n\nThe ``top40`` instance exposes a number of properties to the programmer. These include:\n\n* :py:attr:`top40.albums `\n* :py:attr:`top40.singles `\n* :py:attr:`top40.albums_chart `\n* :py:attr:`top40.singles_chart `\n\nThe example code below shows how you can use one of these properties to get a list of the current Top 40 albums.::\n\n from pythontop40 import Top40\n\n top40 = Top40()\n\n albums = top40.albums\n\n for album in albums:\n print(\n album.position,\n album.title,\n \"BY\",\n album.artist\n )\n\nThis short program uses the :py:attr:`~top40.Top40.albums` property of the :class:`~top40.Top40`\nclass to obtain the Python :class:`list` of the current Top 40 UK albums. It then loops through this list, and at each\niteration of the loop the variable `album` is set to the next album entry in the list.\n\nA :func:`print` function then prints the :py:attr:`~top40.Entry.position`,\n:py:attr:`~top40.Entry.title` and :py:attr:`~top40.Entry.artist` attributes of the album\n:py:class:`entry ` resulting in something like this:::\n\n 1 Never Been Better BY Olly Murs\n 2 X BY Ed Sheeran\n 3 FOUR BY One Direction\n 4 In The Lonely Hour BY Sam Smith\n 5 The Endless River BY Pink Floyd\n .\n .\n .\n 40 The London Sessions BY Mary J. Blige\n\n\nI hope it's pretty clear what is going on, but a more detailed discussion of what the program does on can be found\n:doc:`here `.\n\nFeatures\n========\n**PythonTop40** provides:\n\n* a list of the current Top 40 UK singles using the :py:attr:`singles ` property of the\n :py:class:`~top40.Top40` class.\n* a list of the current Top 40 UK albums using the :py:attr:`albums ` property of the\n :py:class:`~top40.Top40` class.\n* a :py:class:`chart ` object relating to either singles or albums. The\n :py:class:`chart ` object contains the:\n\n * :py:attr:`~top40.Chart.date` that the chart was published\n * the date that the chart was :py:attr:`~top40.Chart.retrieved` from the server\n * a :py:class:`list` containing an :py:class:`~top40.Entry` for each Top 40 single or album\n\n* **PythonTop40** will also cache the results, so that once a result type (singles or albums) has been retrieved from\n the remote server, it will be returned on subsequent requests from the cache without refreshing from the remote\n server.\n\n * **PythonTop40** will use a persistent cache by default. This should ensure that the remote server is not hammered\n with requests when the data is unlikely to change too frequently. The default duration for the cache is 3600\n seconds (1 hour). Unlike the in-memory cache, the persistent cache will survive after the Python interpreter run\n session ends. The duration can be changed by passing a ``cache_duration`` value to the :py:class:`Top40`\n constructor. Using a value of ``None`` for ``cache_duration`` will disable the persistent cache and rely on the\n in-memory cache only.\n * The cache can be reset using the :py:func:`~top40.Top40.reset_cache` method, so that the next request for\n albums or singles information will be forced to obtain it by connecting to the remote server.\n\nInstallation\n============\n\n**PythonTop40** can be found on the Python Package Index `PyPi here. `_\nIt can be installed using ``pip``, like so. ::\n\n pip install pythontop40\n\nDocumentation\n=============\nThe documentation for **PythonTop40** can be found on the\n`ReadTheDocs site `_.\n\nAPI - Application Programming Interface\n=======================================\nThe full documentation of the classes and functions that make up **PythonTop40** can be found :doc:`here `, and\nthe errors and exceptions can be found :doc:`here `.\n\nTests\n-----\nTo run the **PythonTop40** test suite, you should install the test and development requirements and then run nosetests.\n\n.. code-block:: bash\n\n $ pip install -r dev-requirements.txt\n $ nosetests tests\n\nChanges\n-------\n\nSee :doc:`Changes `.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/dannygoodall/pythontop40", "keywords": null, "license": "Apache v2.0", "maintainer": null, "maintainer_email": null, "name": "pythontop40", "package_url": "https://pypi.org/project/pythontop40/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pythontop40/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/dannygoodall/pythontop40" }, "release_url": "https://pypi.org/project/pythontop40/0.1.6/", "requires_dist": null, "requires_python": null, "summary": "A Python API to access the UK Top 40 album and single charts (Intended to be used as a teaching aid in UK schools)", "version": "0.1.6" }, "last_serial": 1369056, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a8fd4046c8840f191562c86dc602df45", "sha256": "ceb03720db5b5a5fdcf33d2e7813dd3778a1861a0fcf4bba4fc32b2402759b1e" }, "downloads": -1, "filename": "pythontop40-0.1.0.zip", "has_sig": false, "md5_digest": "a8fd4046c8840f191562c86dc602df45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21519, "upload_time": "2014-12-14T16:30:05", "url": "https://files.pythonhosted.org/packages/80/28/5f5833b5046d283f6d446668184811ce79ebd0d89c517bb4990d529f8649/pythontop40-0.1.0.zip" } ], "0.1.0.dev2": [ { "comment_text": "", "digests": { "md5": "899476b9ebbabb920b18772074a072b3", "sha256": "ff59db4b88193c9eaa53c5952845fab1ae73e084d20f83f3ec9f872612acf3cf" }, "downloads": -1, "filename": "pythontop40-0.1.0.dev2.zip", "has_sig": false, "md5_digest": "899476b9ebbabb920b18772074a072b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17233, "upload_time": "2014-12-06T13:02:10", "url": "https://files.pythonhosted.org/packages/06/3e/6f2a19790c1e464b33ecb91331eb07583037b317c4586d42296243838626/pythontop40-0.1.0.dev2.zip" } ], "0.1.0.dev4": [ { "comment_text": "", "digests": { "md5": "0caa83ce4e9138af34de8d7e278011a8", "sha256": "aec0f4ab535e0a6bffdb47aaa81324baa1679f75599477d91b0547d8bb3baf04" }, "downloads": -1, "filename": "pythontop40-0.1.0.dev4.zip", "has_sig": false, "md5_digest": "0caa83ce4e9138af34de8d7e278011a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21575, "upload_time": "2014-12-06T17:46:45", "url": "https://files.pythonhosted.org/packages/81/c8/f6a79e616c1aa8ae5cd342482e492726638d85f48f2e02466c76c3a0e721/pythontop40-0.1.0.dev4.zip" } ], "0.1.0.dev5": [ { "comment_text": "", "digests": { "md5": "2e8fbab709d35d68f9213d8b89fe7eb1", "sha256": "565e6c009620f7b788121c4766bbf9049cf632e824de48bf2d69c825565b2b1d" }, "downloads": -1, "filename": "pythontop40-0.1.0.dev5.zip", "has_sig": false, "md5_digest": "2e8fbab709d35d68f9213d8b89fe7eb1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21843, "upload_time": "2014-12-11T12:42:47", "url": "https://files.pythonhosted.org/packages/e7/35/af386c581a02ea59664a2043a6c7e4103ea2d695a60bbcee6020fa774c95/pythontop40-0.1.0.dev5.zip" } ], "0.1.0.dev6": [ { "comment_text": "", "digests": { "md5": "07b4898ad36f8c33e590e5e2b30f87cb", "sha256": "fd9b9e0726c8b5847f82a6a668af88f4b2711b00a8bec73f0c2e456325a48761" }, "downloads": -1, "filename": "pythontop40-0.1.0.dev6.zip", "has_sig": false, "md5_digest": "07b4898ad36f8c33e590e5e2b30f87cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21976, "upload_time": "2014-12-11T13:30:39", "url": "https://files.pythonhosted.org/packages/0e/d6/95b0c8b7eb4581927ebb3bdcbc43a929bf582f16df2952bb1a9500f83d89/pythontop40-0.1.0.dev6.zip" } ], "0.1.0.dev7": [ { "comment_text": "", "digests": { "md5": "30a1a951dc39af97181fba10fb0c08e9", "sha256": "75e521a69c3a676da459e0c23a213dc9cbf8a68683f42158b3905bbcfe77090f" }, "downloads": -1, "filename": "pythontop40-0.1.0.dev7.zip", "has_sig": false, "md5_digest": "30a1a951dc39af97181fba10fb0c08e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22008, "upload_time": "2014-12-11T13:44:12", "url": "https://files.pythonhosted.org/packages/23/04/3073ed39fd117bb0e580503b76bb02c31ca98a931336bd6f41ae4d7d73ba/pythontop40-0.1.0.dev7.zip" } ], "0.1.0.dev8": [ { "comment_text": "", "digests": { "md5": "772d31ab19d504d4deb06ffda4661261", "sha256": "ff5a8ad2cb571c63375ecb2653dd21beb6dd292cad3375cf87dd3c3f859af2db" }, "downloads": -1, "filename": "pythontop40-0.1.0.dev8.zip", "has_sig": false, "md5_digest": "772d31ab19d504d4deb06ffda4661261", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22245, "upload_time": "2014-12-12T16:36:20", "url": "https://files.pythonhosted.org/packages/bd/98/9032146905a926f4a9507da556387542386119ca7d65f25108873d7ffa60/pythontop40-0.1.0.dev8.zip" } ], "0.1.0.dev9": [ { "comment_text": "", "digests": { "md5": "cf3bb218c002592343c722a5e581bdd5", "sha256": "0ab16cd696323d5e56d7036baed05f489c9f1ebd565f66f90dc478dc02151831" }, "downloads": -1, "filename": "pythontop40-0.1.0.dev9.zip", "has_sig": false, "md5_digest": "cf3bb218c002592343c722a5e581bdd5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21624, "upload_time": "2014-12-12T22:55:11", "url": "https://files.pythonhosted.org/packages/fb/35/c3614ed193a41d9ce7109e9413793737fa2264d8831abb2437d1ee2f4c27/pythontop40-0.1.0.dev9.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a553eb1c9f4526eab396873439b0e8a6", "sha256": "14d5dad404a31a524f28dea4304972f8bcfe8faefc89263e20dbafb56ebe1bf4" }, "downloads": -1, "filename": "pythontop40-0.1.1.zip", "has_sig": false, "md5_digest": "a553eb1c9f4526eab396873439b0e8a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21521, "upload_time": "2014-12-14T18:04:12", "url": "https://files.pythonhosted.org/packages/b4/94/8661dd1ae319063d62c9a20bd8acdfd115ffa1750245c0afeb49469fd208/pythontop40-0.1.1.zip" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "f329c41bc02b8529bd7b4f35c84c60de", "sha256": "33fcbe6b85821447f2512f9b2b4a71107b8d0fe4ea22c7c2e8ed4ca79c5dbba3" }, "downloads": -1, "filename": "pythontop40-0.1.5.zip", "has_sig": false, "md5_digest": "f329c41bc02b8529bd7b4f35c84c60de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23078, "upload_time": "2014-12-31T14:52:15", "url": "https://files.pythonhosted.org/packages/43/3e/68164119e5b805178ae926d3899d01ca82a3841f7af804e70e5b132b6c9a/pythontop40-0.1.5.zip" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "375bd5a773f982000aad5cfdbd103677", "sha256": "a75d9b588976ae588f630b34ff4448987f404ade672f996abd2c017d72169164" }, "downloads": -1, "filename": "pythontop40-0.1.6.zip", "has_sig": false, "md5_digest": "375bd5a773f982000aad5cfdbd103677", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23164, "upload_time": "2015-01-03T10:24:06", "url": "https://files.pythonhosted.org/packages/af/47/9d0dd77955cdb029513cd605dfc74c4f64dbe0892368be0f0d5f1378ec6e/pythontop40-0.1.6.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "375bd5a773f982000aad5cfdbd103677", "sha256": "a75d9b588976ae588f630b34ff4448987f404ade672f996abd2c017d72169164" }, "downloads": -1, "filename": "pythontop40-0.1.6.zip", "has_sig": false, "md5_digest": "375bd5a773f982000aad5cfdbd103677", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23164, "upload_time": "2015-01-03T10:24:06", "url": "https://files.pythonhosted.org/packages/af/47/9d0dd77955cdb029513cd605dfc74c4f64dbe0892368be0f0d5f1378ec6e/pythontop40-0.1.6.zip" } ] }