{ "info": { "author": "ZEDGR", "author_email": "georlema@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: Public Domain", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "pychal\n===========\n\n.. image:: https://img.shields.io/travis/ZEDGR/pychal.svg\n :target: https://travis-ci.org/ZEDGR/pychal\n\nPychal is a drop-in replacement of pychallonge\nwith some extra features and support for new Python versions.\nPychal provides python bindings for the\n`CHALLONGE! `__\n`API `__.\n\n\n\nDifferences\n===========\nThe only diffence with the pychallonge is the\ndictionary keys with dashes are now with undescores\nfor example the key 'created-at' is now 'created_at'.\n\nRequirements\n============\n\n- ``iso8601``\n- ``tzlocal``\n- ``pytz``\n- ``requests``\n\nPython version support\n======================\n\n- ``2.7``\n- ``3.4+``\n\nInstallation\n============\n\nFor the stable version\n\n::\n\n pip install pychal\n\nFor latest development\n\n::\n\n pip install -e git+http://github.com/ZEDGR/pychal#egg=pychal\n\nUsage\n=====\n\n.. code:: python\n\n import challonge\n\n # Tell pychal about your [CHALLONGE! API credentials](http://api.challonge.com/v1).\n challonge.set_credentials(\"your_challonge_username\", \"your_api_key\")\n\n # Retrieve a tournament by its id (or its url).\n tournament = challonge.tournaments.show(3272)\n\n # Tournaments, matches, and participants are all represented as normal Python dicts.\n print(tournament[\"id\"]) # 3272\n print(tournament[\"name\"]) # My Awesome Tournament\n print(tournament[\"started_at\"]) # None\n\n # Retrieve the participants for a given tournament.\n participants = challonge.participants.index(tournament[\"id\"])\n print(len(participants)) # 13\n\n # Start the tournament and retrieve the updated information to see the effects\n # of the change.\n challonge.tournaments.start(tournament[\"id\"])\n tournament = challonge.tournaments.show(tournament[\"id\"])\n print(tournament[\"started_at\"]) # 2011-07-31 16:16:02-04:00\n\nSee `challonge.com `__ for full API\ndocumentation.\n\nAPI Issues\n==========\n\nThe Challonge API has some issues with the attachments endpoints. The\n``create`` and ``update`` endpoints are not working correctly. When you\ntry to upload an attachment with asset(file) the API returns 500\ninternal server error. The same happens with asset + description.\nThis problem has been reported to Challonge.\n\nOther problems that I have noticed is that the check in process through\nthe API seems weird. When you undo check in a participant the field\n'checked_in' remains True but in the website the participant is correctly\nnot checked in. That's why I haven't write any tests on this.\n\nFixed by pychal: In the datetime fields the api returns\nrandom timezone offsets, pychal convert those\nto your machine's local time. Also you can set any timezone\nyou want with ``set_timezone`` function.\n\nRunning the unit tests\n======================\n\nPychal comes with a set of unit tests. The tests are not\ncomprehensive, but do utilize each method and verify basic\nfunctionality.\n\nIn order to test behavior of the python bindings, API calls must be made\nto CHALLONGE!, which requires a username and api key. To run the tests\nwith your credentials, set ``CHALLONGE_USER`` and ``CHALLONGE_KEY``\nappropriately in your environment.\n\n::\n\n $ git clone http://github.com/ZEDGR/pychal pychal\n $ CHALLONGE_USER=my_user CHALLONGE_KEY=my_api_key python pychal/tests.py\n ...............................\n ----------------------------------------------------------------------\n Ran 31 tests in 98.176s\n\n OK\n\nNote that several tournaments are created, published, started, and\ncompleted over the course of the unit tests. These should be cleaned up\nby the end, but if any of the tests fail they may not be cleaned up. As\nlong as the basic functions work, you can clean up errant tournaments as\nfollows.\n\n.. code:: python\n\n import challonge\n challonge.set_credentials(\"my_user\", \"my_api_key\")\n for t in challonge.tournaments.index():\n if t[\"name\"].startswith(\"pychal\"):\n challonge.tournaments.destroy(t[\"id\"])", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/ZEDGR/pychal/archive/1.8.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ZEDGR/pychal", "keywords": "tournaments,challonge", "license": "Public Domain", "maintainer": "", "maintainer_email": "", "name": "pychal", "package_url": "https://pypi.org/project/pychal/", "platform": "any", "project_url": "https://pypi.org/project/pychal/", "project_urls": { "Download": "https://github.com/ZEDGR/pychal/archive/1.8.0.tar.gz", "Homepage": "https://github.com/ZEDGR/pychal" }, "release_url": "https://pypi.org/project/pychal/1.8.1/", "requires_dist": null, "requires_python": "", "summary": "Drop-in replacement of pychallonge", "version": "1.8.1" }, "last_serial": 3326529, "releases": { "1.8.0": [ { "comment_text": "", "digests": { "md5": "41c1866d7f0ceb2625977e8eaf6703f6", "sha256": "93d761719b26cd4e8f066ce81ca7ee0f137385ce48e03990f41780ea837b3da9" }, "downloads": -1, "filename": "pychal-1.8.0.tar.gz", "has_sig": false, "md5_digest": "41c1866d7f0ceb2625977e8eaf6703f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6838, "upload_time": "2017-04-22T11:32:39", "url": "https://files.pythonhosted.org/packages/84/e5/1aad0b7c8268e766a6983cc352d8d854b1f29957005a16453ae04be2ebbd/pychal-1.8.0.tar.gz" } ], "1.8.1": [ { "comment_text": "", "digests": { "md5": "e1a7b077437df70176224a801b5cde05", "sha256": "de18700542a0a25f96e6172b72ec0c653fcbe16771721a58e6659f10adbe4b2c" }, "downloads": -1, "filename": "pychal-1.8.1.zip", "has_sig": false, "md5_digest": "e1a7b077437df70176224a801b5cde05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12921, "upload_time": "2017-11-12T16:12:18", "url": "https://files.pythonhosted.org/packages/de/7a/dd482eba4a1f5eb75c88143bc4940a0427e16619d31d4431873603a2a0a7/pychal-1.8.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e1a7b077437df70176224a801b5cde05", "sha256": "de18700542a0a25f96e6172b72ec0c653fcbe16771721a58e6659f10adbe4b2c" }, "downloads": -1, "filename": "pychal-1.8.1.zip", "has_sig": false, "md5_digest": "e1a7b077437df70176224a801b5cde05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12921, "upload_time": "2017-11-12T16:12:18", "url": "https://files.pythonhosted.org/packages/de/7a/dd482eba4a1f5eb75c88143bc4940a0427e16619d31d4431873603a2a0a7/pychal-1.8.1.zip" } ] }