{ "info": { "author": "Damian Maggio Esne", "author_email": "dmaggioesne@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet", "Topic :: Utilities" ], "description": "# Anipy\n[![Build Status](https://travis-ci.org/twissell-/anipy.svg?branch=master)](https://travis-ci.org/twissell-/anipy)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d811779af6ee4c14a03137894930bb04)](https://www.codacy.com/app/dmaggioesne/anipy?utm_source=github.com&utm_medium=referral&utm_content=twissell-/anipy&utm_campaign=Badge_Grade)\n[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/d811779af6ee4c14a03137894930bb04)](https://www.codacy.com/app/dmaggioesne/anipy?utm_source=github.com&utm_medium=referral&utm_content=twissell-/anipy&utm_campaign=Badge_Coverage)\n[![Python Version](https://img.shields.io/badge/python-3.5-blue.svg)]()\n[![Project License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/twissell-/anipy/master/LICENSE)\n\n\nAnipy is a python library that wraps and organize the [Anilist] rest api into modules, classes and functions so it can be used quick, easy, and right out of the box. You can take a look at the api [official docs]. **Anilist is a [Josh Star]'s project**\n\n\n## Table of contents\n\n * [Installation](#installation)\n * [Usage](#usage)\n * [Authentication](#authentication)\n * [Resources](#resources)\n * [Roadmap](#roadmap)\n\n\n## Installation\n\nFor now the only available versions are alphas. You can Instaled the las by:\n```bash\n$ git clone https://github.com/twissell-/anipy.git\n$ cd anipy\n$ python setup.py # Be sure using Python 3\n```\n\n## Usage\n\nI've tried to keep the developer interface as simple as possible.\n\n### Authentication\n\nBefore you can access any Anilist resource you have to get authenticated. Once you have [created a client] you must configure ```auth.AuthenticationProvider``` class with your credentials.\n\nNow you can get authenticated with any of the available [grant types]. Aditionaly, Anipy have a ```GrantType.refreshToken``` in case you have saved a refresh token from a previous authentication. *Note that only code and pin authentication gives you a refresh token.*\n\n```python\nfrom anipy import AuthenticationProvider\nfrom anipy import Authentication\nfrom anipy import GrantType\n\nAuthenticationProvider.config('your-client-id', 'your-client-secret', 'your-redirect-uri')\n\nauth = Authentication.fromCredentials()\n# or\nauth = Authentication.fromCode('code')\n# or\nauth = Authentication.fromPin('pin')\n\n# Now you can save the refresh token\nrefresh_token = auth.refreshToken\n\nauth = Authentication.fromRefreshToken(refresh_token)\n```\n\nAuthentication expires after one hour and will refresh automatically, nevertheless you can do it manually at any time, ie.:\n\n```python\nif auth.isExpired:\n auth.refresh()\n\n```\n\n### Resources\n\nResources are one of the most important parts of the library. They are in charge of go an get the data from the Anilist API. Each domain class have a resource, you can compare them to *Data Access Objects*. All resouces are **Singletons**.\n\nIn order to keep things simple you can access the resource from class it serves\n\n```python\n# Current logged user\nuser = User.resource().principal()\n# A user for his Id or Display Name\nuser = User.resource().byId(3225)\nuser = User.resource().byDisplayName('demo')\n```\n\nSome resources are injected in other classes also in order to keep things simple (ie. ```AnimeListResource```). So if you want to get de watching list of a user you can do:\n\n```python\n# The long way\nresource = AnimeListResource()\nwatching_list = resource.byUserId(user.id)\n# Or the short way\nwatching_list = user.watching\n```\n\n## Roadmap\n\nHere is a sumary of the project state.\n\n### Next Release: 0.1\n\n - [x] **Authentication**\n - [x] Authorization Code\n - [x] Authorization Pin\n - [x] Client Credentials\n - [x] **User**\n - [x] Basics\n - [ ] **User Lists**\n - [ ] Animelist\n - [x] Update watched episodes\n - [x] Update rewatched\n - [x] Update notes\n - [x] Update list status\n - [ ] Update score (simple)\n - [ ] Create a entry\n - [ ] Remove entry\n - [ ] Mangalist\n - [ ] List Scores types\n - [ ] **Anime**\n - [ ] Basics\n - [ ] Airing\n - [ ] Search\n - [ ] **Manga**\n - [ ] Basics\n - [ ] Search\n\n### Out of Scope\n\nThing that I'm going to do soon.\n\n - Advance rating score\n - Custom lists\n\n[Anilist]: http://Anilist.co\n[official docs]: https://anilist-api.readthedocs.io\n[Josh Star]: https://github.com/joshstar\n\n[created a client]: https://anilist-api.readthedocs.io/en/latest/introduction.html#creating-a-client\n[grant types]:https://anilist-api.readthedocs.io/en/latest/authentication.html#which-grant-type-to-use\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/twissell-/anipy", "keywords": "anipy twissell anime anilist manga", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "anipy", "package_url": "https://pypi.org/project/anipy/", "platform": "", "project_url": "https://pypi.org/project/anipy/", "project_urls": { "Homepage": "https://github.com/twissell-/anipy" }, "release_url": "https://pypi.org/project/anipy/0.1a1/", "requires_dist": [ "requests", "urllib3", "urllib3-mock" ], "requires_python": "", "summary": "A python library for the Anilist.co API.", "version": "0.1a1" }, "last_serial": 2561148, "releases": { "0.1a1": [ { "comment_text": "", "digests": { "md5": "e59886f0ea20fe745a69b1898fb03fd4", "sha256": "83ff2c1cc9e483d376c10f00e8d135e58d4df712faee2e1a8cb0c13b94e9219f" }, "downloads": -1, "filename": "anipy-0.1a1-py3-none-any.whl", "has_sig": false, "md5_digest": "e59886f0ea20fe745a69b1898fb03fd4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11922, "upload_time": "2017-01-08T21:39:06", "url": "https://files.pythonhosted.org/packages/b8/36/4dfef18111a27ffb0f2f958dc0b09b303606f629cb0bcd985c199b7e4761/anipy-0.1a1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "15ec67c494cb132aacf4e601d9c58f18", "sha256": "19bf8db3f9892feb3a11eea659107630c542406329ddf0bf168b98b490db8d5b" }, "downloads": -1, "filename": "anipy-0.1a1.tar.gz", "has_sig": false, "md5_digest": "15ec67c494cb132aacf4e601d9c58f18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8701, "upload_time": "2017-01-08T21:39:07", "url": "https://files.pythonhosted.org/packages/9d/d7/4a2a6ccd66590ef997d809e09b23f5db5552fadf68ea391c574c9111cdb1/anipy-0.1a1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e59886f0ea20fe745a69b1898fb03fd4", "sha256": "83ff2c1cc9e483d376c10f00e8d135e58d4df712faee2e1a8cb0c13b94e9219f" }, "downloads": -1, "filename": "anipy-0.1a1-py3-none-any.whl", "has_sig": false, "md5_digest": "e59886f0ea20fe745a69b1898fb03fd4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11922, "upload_time": "2017-01-08T21:39:06", "url": "https://files.pythonhosted.org/packages/b8/36/4dfef18111a27ffb0f2f958dc0b09b303606f629cb0bcd985c199b7e4761/anipy-0.1a1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "15ec67c494cb132aacf4e601d9c58f18", "sha256": "19bf8db3f9892feb3a11eea659107630c542406329ddf0bf168b98b490db8d5b" }, "downloads": -1, "filename": "anipy-0.1a1.tar.gz", "has_sig": false, "md5_digest": "15ec67c494cb132aacf4e601d9c58f18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8701, "upload_time": "2017-01-08T21:39:07", "url": "https://files.pythonhosted.org/packages/9d/d7/4a2a6ccd66590ef997d809e09b23f5db5552fadf68ea391c574c9111cdb1/anipy-0.1a1.tar.gz" } ] }