{ "info": { "author": "Matt Boulanger", "author_email": "celeodor@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Environment :: Web Environment", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries" ], "description": "Prest\n=====\n\nSummary\n-------\n\nPrest is a Python library for accessing EVE Online's CREST API.\n\nInstallation\n------------\n\nFrom `pip `__:\n\n.. code:: bash\n\n pip install eveprest\n\nUse\n---\n\nInitialization\n~~~~~~~~~~~~~~\n\n.. code:: python\n\n from prest import Prest\n\n prest = Prest()\n\nAttributes and calls\n~~~~~~~~~~~~~~~~~~~~\n\n- Calling\n- on ``prest.Prest``: reload the base URL data\n\n - ``prest()`` -> the same ``prest.Prest``\n\n- on ``prest.APIElement``: navigate to a new page\n\n - ``prest.foo()`` -> ``prest.APIElement``\n\n- Getting attribute by text or item by index\n- from ``prest.Prest``: return a data subset or navigate to a new page\n\n - ``prest.foo`` -> ``str``, ``int``, ``float``, ``prest.APIElement``\n of data subset, ``prest.APIElement`` to new page\n\n- from ``prest.APIElement``: return a data subset\n\n - ``prest.foo.bar`` -> ``str``, ``int``, ``float``,\n ``prest.APIElement``\n\nTo reduce typing, ``prest.Prset.__getattr__`` combines the functionality\nof ``prest.APIElement.__getattr__`` and ``prest.APIElement.__call__`` so\nthat calls can be made like ``prest.foo`` instead of ``prest().foo``.\n\nIf you wanted to access the X position of the Kimoto constellation, the\ncall would be:\n\n.. code:: python\n\n prest.constellations().items.find(name='Kimotoro')().position.x\n\nFrom the `base url `__ \"constellations\"\nis a root-level dictionary item with a \"href\" item, which can be called\nto navigate to `that\npage `__.\n\nFrom there, the ``.items`` attribute dives into the ``items`` dictionary\nkey and then a ``find`` method is used to get an element from the list\nof dictionaries (you could loop through the items yourself, but ``find``\nis for convenience). This dictionary has a \"href\" element, so call the\nattribute to navigate\n`there `__.\n\nNow on the final page, access the \"position\" key and finally its \"x\"\nkey, which is ``-134996400468185440``.\n\nExamples\n~~~~~~~~\n\n1. Market types -> page count\n\n.. code:: python\n\n prest.marketTypes().pageCount\n\n2. \"Jump Through a Wormhole\" opportunity description\n\n.. code:: python\n\n prest.opportunities.tasks().items.find(name='Jump Through a Wormhole').description\n\n3. Jita 4-4 moon name\n\n.. code:: python\n\n prest.systems().items.find(name='Jita')().planets[3].moons[3]().name\n\nUsing the cache\n~~~~~~~~~~~~~~~\n\nWhen you make a call to ``prest.foo``, the root CREST URL data stored\nlocally will be checked for an expired cache timer (the root URL's data\nis loaded when instantiating a new ``prest.Prest`` object, you don't\nneed to do it manually). If it's expired, the root URL will be gotten\nanew and cached. This is similar for ``prest.foo().bar().baz()`` - if\nall of ``foo``, ``bar``, and ``baz`` were dictionaries with ``'href'``\nkeys that pointed to new pages, each would use the cache to retrieve the\npage, only making a new request to CREST if the local copy of the page\nis either non-existent or expired.\n\nHowever, when getting attributes from a page, like\n``prest.foo().bar.baz``, neither ``bar`` or ``baz`` on the page will be\nusing the cache. Thus, in order to make the same call multiple times\nover a period of time and using the cache, either make the full\n``prest.foo().bar.baz`` call again, or save the last-called element as a\nlocal variable and call that:\n\n.. code:: python\n\n foo = prest.foo\n\n print(foo().bar.baz)\n\n # later:\n print(foo().bar.baz)\n\n # later:\n print(foo().bar.baz)\n\nAuthentication\n~~~~~~~~~~~~~~\n\nAccessing the authenticated parts of CREST is done through\nauthenticating Prest:\n\n.. code:: python\n\n from prest import *\n\n prest = Prest(client_id='', client_secret='', client_callback='')\n prest.get_authorize_url()\n auth = prest.authenticate(code)\n\nIn the code above, ``get_authorize_url`` returns a URL to redirect a web\napp client to so they can log into EVE's SSO. Once they've redirected\nback to your web application, pass the code in the returning URL from\nEVE to the ``authenticate`` call and assign the resulting\n``prest.AuthPrest`` object.\n\nThis ``prest.AuthPrest`` object works the same as the unathenticated\n``prest.Prest`` object: use attributes and calls to navigate and load\nCREST data, respectively.\n\nExample of accessing a character's location:\n\n.. code:: python\n\n print(auth.decode().character().location())\n\nRefresh tokens\n^^^^^^^^^^^^^^\n\nWhen you authenticate for accessing CREST using a scope, Prest will get\ntwo tokens back: the access token, which is a temporary (20 minutes)\ntoken used for accessing CREST, and a refresh token that doesn't expire\nbut cannot be used to directly access CREST. When the access token\nexpires, Prest will get another access token from CREST using the\nrefresh token.\n\nSince the refresh token doesn't expire, you'll want to keep that\nsomewhere safe. Prest doesn't handle this for you.\n\nTo start an authenticated session with Prest using a previously-fetched\nrefresh token (you can get the existing refresh token with\n``prest.AuthPrest.refresh_token`` as a ``str``), do the following:\n\n.. code:: python\n\n prest = Prest(client_id='', client_secret='', client_callback='')\n auth = prest.use_refresh_token('previous-refresh-token')\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Celeo/Prest", "keywords": "eve online,crest,api", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "EVEPrest", "package_url": "https://pypi.org/project/EVEPrest/", "platform": "any", "project_url": "https://pypi.org/project/EVEPrest/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Celeo/Prest" }, "release_url": "https://pypi.org/project/EVEPrest/1.3.5/", "requires_dist": null, "requires_python": null, "summary": "EVE CREST access tool", "version": "1.3.5" }, "last_serial": 2212311, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "9478b7c46ca04b9630807404bfab6586", "sha256": "0a03d1d4283c622713322b1feecff043219597ede4761d089dc4d635b00eacad" }, "downloads": -1, "filename": "EVEPrest-1.0.0.tar.gz", "has_sig": false, "md5_digest": "9478b7c46ca04b9630807404bfab6586", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3369, "upload_time": "2016-06-24T05:26:30", "url": "https://files.pythonhosted.org/packages/e6/c5/07baec3b0942348e4094b5877179bea020ec96930fc4b31e732843745d48/EVEPrest-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "7edc3a78c7d10e6b4eb6f4aae53b2f2f", "sha256": "50334765bedde929df439acee63b1d3b5d913329064bb37f631ac211c688b92f" }, "downloads": -1, "filename": "EVEPrest-1.1.0.tar.gz", "has_sig": false, "md5_digest": "7edc3a78c7d10e6b4eb6f4aae53b2f2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3933, "upload_time": "2016-06-26T20:28:18", "url": "https://files.pythonhosted.org/packages/ad/e1/5281ba0307f8bc2d2173bea69044305ef868f8b31ae32fd9d88e2ceb962a/EVEPrest-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "6d752169e9754e7713b09038ea96d379", "sha256": "430945916e26b7b3a90787f2c038e20233bc326d80e8862af5dc03d47d94d8d1" }, "downloads": -1, "filename": "EVEPrest-1.2.0.tar.gz", "has_sig": false, "md5_digest": "6d752169e9754e7713b09038ea96d379", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5658, "upload_time": "2016-06-26T23:29:27", "url": "https://files.pythonhosted.org/packages/f0/9d/3e0d60015a3f313aeafc673f76e388104c2951be010dde0aaf7500f66870/EVEPrest-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "d1f780a16f1db3a3791a1170d029eece", "sha256": "4e142a2b1e740a06eedd797b8431177d8492563da1b8adf986c71722e31b7664" }, "downloads": -1, "filename": "EVEPrest-1.2.1.tar.gz", "has_sig": false, "md5_digest": "d1f780a16f1db3a3791a1170d029eece", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5643, "upload_time": "2016-06-27T04:28:16", "url": "https://files.pythonhosted.org/packages/ff/61/29efb9ea0bf406c7e7ae1e314d6aafd74433b36d44328e5f0a3b576d027f/EVEPrest-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "55cdd97cbe95d1317c82c938b89e1244", "sha256": "a7b3a3969d3a92298c56e0a8a351ad27a6efa58a543b3511f3cb01c7e4b1cb77" }, "downloads": -1, "filename": "EVEPrest-1.2.2.tar.gz", "has_sig": false, "md5_digest": "55cdd97cbe95d1317c82c938b89e1244", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5647, "upload_time": "2016-06-27T05:22:47", "url": "https://files.pythonhosted.org/packages/2b/78/86f331f218c6620fe67a88ccf309be7fa7d3561d354e4e465913c1de16fb/EVEPrest-1.2.2.tar.gz" } ], "1.2.3": [ { "comment_text": "", "digests": { "md5": "68f47c7d94390d6f924bf043fc6e7185", "sha256": "699a85be121a315811bb86869c31228b0bea8a4aed73f1fbc1b21fb3e1cf80a8" }, "downloads": -1, "filename": "EVEPrest-1.2.3.tar.gz", "has_sig": false, "md5_digest": "68f47c7d94390d6f924bf043fc6e7185", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5661, "upload_time": "2016-06-28T15:47:52", "url": "https://files.pythonhosted.org/packages/30/d7/19c9265df48f06953cabcc7b0d4f55fd5e25c41dda72f12b5c5de5b3bb3e/EVEPrest-1.2.3.tar.gz" } ], "1.2.4": [ { "comment_text": "", "digests": { "md5": "c9e353ed9a2b701cb0afd47aba15d1bb", "sha256": "6f8cdfda8bd10c8faa1b14051a93b616613da82b2982cc1ab64ce1f854c73f70" }, "downloads": -1, "filename": "EVEPrest-1.2.4.tar.gz", "has_sig": false, "md5_digest": "c9e353ed9a2b701cb0afd47aba15d1bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7228, "upload_time": "2016-06-29T20:00:02", "url": "https://files.pythonhosted.org/packages/ba/15/5188332e594875053bd175c8b1e89f9a3a8a50d2b3d52cf2792882af6467/EVEPrest-1.2.4.tar.gz" } ], "1.2.5": [ { "comment_text": "", "digests": { "md5": "c2c687d15b8de36fbd52b7ceaeb41764", "sha256": "1396d40de79e8180360e8215cb1345d8eb8e3c720e737139b40dd044a6c330f5" }, "downloads": -1, "filename": "EVEPrest-1.2.5.tar.gz", "has_sig": false, "md5_digest": "c2c687d15b8de36fbd52b7ceaeb41764", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7296, "upload_time": "2016-06-29T20:21:16", "url": "https://files.pythonhosted.org/packages/a1/b9/cd586f54f585828a2f72eb621592316955186875ef6923a4d6f4b1884304/EVEPrest-1.2.5.tar.gz" } ], "1.2.6": [ { "comment_text": "", "digests": { "md5": "9bf800a32464f73cb4b3c11a1752c337", "sha256": "b9a609ece3f8da4ea754e74523f67867c9a71d3761bcd80831dbf6179c818c16" }, "downloads": -1, "filename": "EVEPrest-1.2.6.tar.gz", "has_sig": false, "md5_digest": "9bf800a32464f73cb4b3c11a1752c337", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7241, "upload_time": "2016-06-29T20:26:14", "url": "https://files.pythonhosted.org/packages/07/94/aac4de7ae05b57dc3fb4cb4004470a70e7a1d9d1ab71b9694b4e8c6d1853/EVEPrest-1.2.6.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "43f5afe8cb89748ddb56036127fd191e", "sha256": "19ba946a85e75659a3fe71aa231d9c15807909ed630ff83898d94e8895cc3180" }, "downloads": -1, "filename": "EVEPrest-1.3.0.tar.gz", "has_sig": false, "md5_digest": "43f5afe8cb89748ddb56036127fd191e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6167, "upload_time": "2016-07-03T03:56:25", "url": "https://files.pythonhosted.org/packages/b8/a5/30630fd8e5896b2089c1686eb5be370778153f6d7743480dce09f935bedb/EVEPrest-1.3.0.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "dae93bbf64fa736551dbe0052e6b133e", "sha256": "89ef29783641ee91a3ccc202b42eb10c3cd5ce274a5fe36e75b7309f8c24b6ee" }, "downloads": -1, "filename": "EVEPrest-1.3.1.tar.gz", "has_sig": false, "md5_digest": "dae93bbf64fa736551dbe0052e6b133e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8095, "upload_time": "2016-07-03T04:00:38", "url": "https://files.pythonhosted.org/packages/50/30/cc2da33e70a883758e2ab5dfea092d062b278a22f041c80bbe12282e3dcf/EVEPrest-1.3.1.tar.gz" } ], "1.3.2": [ { "comment_text": "", "digests": { "md5": "ba53fb405896a939311799c7f0bb7b08", "sha256": "636f46569f3e76c5dc8f0621291faeea42063f74639d0129caa043820d73de5b" }, "downloads": -1, "filename": "EVEPrest-1.3.2.tar.gz", "has_sig": false, "md5_digest": "ba53fb405896a939311799c7f0bb7b08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8097, "upload_time": "2016-07-09T17:29:08", "url": "https://files.pythonhosted.org/packages/98/0f/54e4769105655f7266817497bf7784c5afa3ab1a4e5886cd4a5b56fa583e/EVEPrest-1.3.2.tar.gz" } ], "1.3.3": [ { "comment_text": "", "digests": { "md5": "ced1f59c84e8f14a7bf02b8b6b73a3f3", "sha256": "2b569f6532f1c7d06de02b52d03b1362244bfbb4c9f9953ffe9d322ce7485698" }, "downloads": -1, "filename": "EVEPrest-1.3.3.tar.gz", "has_sig": false, "md5_digest": "ced1f59c84e8f14a7bf02b8b6b73a3f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8094, "upload_time": "2016-07-09T18:01:25", "url": "https://files.pythonhosted.org/packages/c2/5e/3aa2cc3c5679abaa6ac2a11553fc5f6f600a0b1c6a37756955c6d16c1702/EVEPrest-1.3.3.tar.gz" } ], "1.3.4": [ { "comment_text": "", "digests": { "md5": "d789571ce24428fbc3e397bba8f25183", "sha256": "b876506809a8ff97508ff2cf5d392438238b9c99092670f2fd54b2f5167962c7" }, "downloads": -1, "filename": "EVEPrest-1.3.4.tar.gz", "has_sig": false, "md5_digest": "d789571ce24428fbc3e397bba8f25183", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8102, "upload_time": "2016-07-09T18:20:10", "url": "https://files.pythonhosted.org/packages/13/e0/9600938776cc00406370769250e7a3547ee2005b9d6d7de3c3d035e6f67f/EVEPrest-1.3.4.tar.gz" } ], "1.3.5": [ { "comment_text": "", "digests": { "md5": "91bca4d8f8eb23aebca82a41f58283ae", "sha256": "d78b2bc7da9ef52b20846b2bdc6995082d68f8aa37a610c0f45c9bf861a59aaf" }, "downloads": -1, "filename": "EVEPrest-1.3.5.tar.gz", "has_sig": false, "md5_digest": "91bca4d8f8eb23aebca82a41f58283ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8107, "upload_time": "2016-07-10T01:21:19", "url": "https://files.pythonhosted.org/packages/a1/d2/64c4359571b64d7aabe5d49c19e1efc177e0018e42814c7e23cd5817a847/EVEPrest-1.3.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "91bca4d8f8eb23aebca82a41f58283ae", "sha256": "d78b2bc7da9ef52b20846b2bdc6995082d68f8aa37a610c0f45c9bf861a59aaf" }, "downloads": -1, "filename": "EVEPrest-1.3.5.tar.gz", "has_sig": false, "md5_digest": "91bca4d8f8eb23aebca82a41f58283ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8107, "upload_time": "2016-07-10T01:21:19", "url": "https://files.pythonhosted.org/packages/a1/d2/64c4359571b64d7aabe5d49c19e1efc177e0018e42814c7e23cd5817a847/EVEPrest-1.3.5.tar.gz" } ] }