{ "info": { "author": "Niek Keijzer", "author_email": "info@niekkeijzer.com", "bugtrack_url": null, "classifiers": [], "description": "# CodeStats\n\n[![Build Status](https://travis-ci.org/NiekKeijzer/CodeStats.svg?branch=master)](https://travis-ci.org/NiekKeijzer/CodeStats)\n[![Coverage Status](https://coveralls.io/repos/github/NiekKeijzer/CodeStats/badge.svg?branch=master)](https://coveralls.io/github/NiekKeijzer/CodeStats?branch=master)\n\nA simple wrapper around the [Code::Stats][1] API. Currently this wrapper only supports getting information from the API \nand presenting it in a 'Pythonic' way. Posting new stats to the API is a feature that might be added in the future. \n\n## Sync Usage\n\n```python\nfrom codestats.api import User\n\nuser = User('niekkeijzer')\n```\n\nOr if you prefer to call the `load` method yourself, you can disable `auto_load`.\n\n```python\nfrom codestats.api import User\n\nuser = User('niekkeijzer', auto_load=False)\n```\n\nYou can also get a single language or machine instance by using the `get` method.\n\n```python\nfrom codestats.api import User\nfrom codestats.bases import Language\n\nuser = User('niekkeijzer')\npython = user.get('Python', Language)\n```\n\nOr by using the shorthands\n\n```python\nfrom codestats.api import User\n\nuser = User('niekkeijzer')\npython = user.get_language('python')\nwork_pc = user.get_machine('work')\n```\n\n## Async usage\n\nAs of version 1.1.0 the library can be used in a non blocking manner as well. For this [asyncio][3] and [aiohttp][4] \n should be installed. The `User` object should be loaded differently, however the other methods work the same as the \n synchronous object. \n\n```python\nfrom codestats.async_api import User\n\nasync def load_user(name):\n async with User(name) as user:\n print(user)\n```\n\nOr without auto loading enabled. \n\n```python\nfrom codestats.async_api import User\n\nasync def load_user(name):\n async with User(name, auto_load=False) as user:\n await user.load()\n```\n\n`User`, `Machine` and `Language` instances each have properties to calculate the level based on the current level as well as \nthe progress to the next level. The formula used to calculate these values is the same as is used by the official \n[API][2].\n\n## License\n\nThis code is released under the MIT license, see the included LICENSE file for more information.\n\n\n[1]: https://codestats.net/\n[2]: https://github.com/code-stats/code-stats/blob/master/lib/code_stats/xp_calculator.ex\n[3]: https://asyncio.readthedocs.io/en/latest/\n[4]: http://aiohttp.readthedocs.io", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/NiekKeijzer/CodeStats/archive/1.1..tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.github.com/niekkeijzer/codestats/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "CodeStats", "package_url": "https://pypi.org/project/CodeStats/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/CodeStats/", "project_urls": { "Download": "https://github.com/NiekKeijzer/CodeStats/archive/1.1..tar.gz", "Homepage": "https://www.github.com/niekkeijzer/codestats/" }, "release_url": "https://pypi.org/project/CodeStats/1.1.0/", "requires_dist": null, "requires_python": null, "summary": "Wrapper around the Code::Stats API", "version": "1.1.0" }, "last_serial": 2928766, "releases": { "1.0.2": [ { "comment_text": "", "digests": { "md5": "db96287a626b3dbb30e94338d2b60bca", "sha256": "2b36edf0301b182309ef4409fb673a20f48b49a0665917d7c2d6b889257c7234" }, "downloads": -1, "filename": "CodeStats-1.0.2.tar.gz", "has_sig": false, "md5_digest": "db96287a626b3dbb30e94338d2b60bca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3852, "upload_time": "2017-06-02T12:00:58", "url": "https://files.pythonhosted.org/packages/82/bd/d3e71eba128e1dd2a98dd0e459c67e92bd9859d1f7589e16c24b6aab80c8/CodeStats-1.0.2.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "88bf0150537bdf4aa97e894bc00c7aae", "sha256": "8310d92c7d305ab7bf0ccd8f476fa0cf5b17f18e3e1319b9874826ccfb81c667" }, "downloads": -1, "filename": "CodeStats-1.0.4.tar.gz", "has_sig": false, "md5_digest": "88bf0150537bdf4aa97e894bc00c7aae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4193, "upload_time": "2017-06-02T13:00:19", "url": "https://files.pythonhosted.org/packages/39/c1/db16bd6c3d37b5ea257c6d0e0138f715f6732cd3795b80207a3197024e88/CodeStats-1.0.4.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "aff9891c002465822fadfe078782ec46", "sha256": "bc85d8faf4e3eabd6e3bab9c9e6e7d5d9bd234f09122782e9869f6db09a44ddd" }, "downloads": -1, "filename": "CodeStats-1.1.0.tar.gz", "has_sig": false, "md5_digest": "aff9891c002465822fadfe078782ec46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4794, "upload_time": "2017-06-06T10:05:41", "url": "https://files.pythonhosted.org/packages/d8/1b/d0a917d83a0d5d5755fa98a798089ade1895c040d9df4e5120924f8d8258/CodeStats-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aff9891c002465822fadfe078782ec46", "sha256": "bc85d8faf4e3eabd6e3bab9c9e6e7d5d9bd234f09122782e9869f6db09a44ddd" }, "downloads": -1, "filename": "CodeStats-1.1.0.tar.gz", "has_sig": false, "md5_digest": "aff9891c002465822fadfe078782ec46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4794, "upload_time": "2017-06-06T10:05:41", "url": "https://files.pythonhosted.org/packages/d8/1b/d0a917d83a0d5d5755fa98a798089ade1895c040d9df4e5120924f8d8258/CodeStats-1.1.0.tar.gz" } ] }