{ "info": { "author": "Erin Hengel", "author_email": "erin.hengel@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Requests-Raven\r\n==============\r\n\r\nRequests-Raven is a custom `Requests `_ class to log onto `Raven `_, the University of Cambridge's central\r\nweb authentication service.\r\n\r\n\r\nInstallation\r\n------------\r\n\t\r\n.. code-block:: bash\r\n\r\n\t$ pip install requests_raven\r\n\r\n\r\nDocumentation\r\n-------------\r\n\r\nDetailed documentation available at `erinhengel.com/software/requests_raven `_. \r\n\r\n\r\nQuickstart\r\n----------\r\n\r\nThe ``Raven`` class logs onto Raven and establishes a connection with the host. The ``session`` attribute\r\nreturns a `Request Session object `_\r\nwith all the methods of the main `Requests API `_.\r\n\r\n\r\n.. code-block:: python\r\n\r\n >>> from requests_raven import Raven\r\n\t\r\n # Establish Raven connection object for the website qje.oxfordjournals.org.\r\n >>> deets = {'userid': 'ab123', 'pwd': 'XXXX'}\r\n >>> conn = Raven(url='http://qje.oxfordjournals.org', login=deets)\r\n\t\r\n # The final destination url looks something like this.\r\n >>> conn.url\r\n 'http://libsta28.lib.cam.ac.uk:2314'\r\n\t\r\n # Use session attribute to access Requests methods.\r\n >>> url = '{}/content/130/4/1623.full'.format(conn.url)\r\n >>> request = conn.session.get(url)\r\n >>> request.status_code\r\n 200\r\n\t\r\n # Do stuff with your request object.\r\n >>> from bs4 import BeautifulSoup\r\n >>> soup = BeautifulSoup(request.text, 'html.parser')\r\n >>> soup.title\r\n Behavioral Hazard in Health Insurance \r\n\r\n\r\n``JSTOR``, ``EBSCOhost`` and ``Wiley`` are ``Raven`` subclasses specifically for logging onto `jstor.org `_,\r\n`ebscohost.com `_ and `onlinelibrary.wiley.com `_, respectively.\r\nThey include the ``html``, ``pdf`` and ``ref`` methods to download the webpage HTML, PDF and bibliographic\r\ninformation of a particular document.\r\n\r\n.. code-block:: python\r\n \r\n >>> from requests_raven import JSTOR\r\n\t\r\n # Establish Raven connection object for the website jstor.org.\r\n >>> conn = JSTOR(login=deets)\r\n\t\r\n # Download the HTML of the JSTOR webpage for the article with document id 10.1068/682574.\r\n >>> doc_id = '10.1086/682574'\r\n >>> html = conn.html(id=doc_id)\r\n\t\r\n # Download the document PDF.\r\n >>> pdf = conn.pdf(id=doc_id, file='article.pdf')\r\n \r\n # Download the bibliographic information.\r\n >>> biblio = conn.ref(id=doc_id)\r\n >>> biblio['authors']\r\n [{'name': 'Per Krusell'}, {'name': 'Anthony A. Smith'}]", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.erinhengel.com/software/requests-raven/", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "requests-raven", "package_url": "https://pypi.org/project/requests-raven/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/requests-raven/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.erinhengel.com/software/requests-raven/" }, "release_url": "https://pypi.org/project/requests-raven/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "Requests wrapper to log onto Raven (University of Cambridge).", "version": "0.0.1" }, "last_serial": 1880415, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "8114c9cd69145db7119afa02b118e8d4", "sha256": "d24bba1b4d44b5c7e9b273153d1748ee2973be1b778483bf21e02f11c45e71fd" }, "downloads": -1, "filename": "requests-raven-0.0.1.tar.gz", "has_sig": false, "md5_digest": "8114c9cd69145db7119afa02b118e8d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8513, "upload_time": "2015-12-24T19:37:44", "url": "https://files.pythonhosted.org/packages/c3/75/3da9bc5ed710c1855d24ad1ffebcb62973550130fd31cf612a6efc2a3471/requests-raven-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8114c9cd69145db7119afa02b118e8d4", "sha256": "d24bba1b4d44b5c7e9b273153d1748ee2973be1b778483bf21e02f11c45e71fd" }, "downloads": -1, "filename": "requests-raven-0.0.1.tar.gz", "has_sig": false, "md5_digest": "8114c9cd69145db7119afa02b118e8d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8513, "upload_time": "2015-12-24T19:37:44", "url": "https://files.pythonhosted.org/packages/c3/75/3da9bc5ed710c1855d24ad1ffebcb62973550130fd31cf612a6efc2a3471/requests-raven-0.0.1.tar.gz" } ] }