semvec/pypi-packages huggingface dataset:
iface 0.1.2
Implementable interfaces for Python.
License: Apache 2.0

=====
iface
=====

*Implementable interfaces for Python.*

Example Usage
=============

Testing
=======

All tests suites are paired one-to-one with the module they test and live
directly adjacent to that same module. All tests are expected to pass for
Python 3.3 and above. To run tests use tox with the included tox.ini file or
create a virtualenv and install the '[testing]' extras.

License
=======

    Copyright 2015 Kevin Conway

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

Contributing
============

Firstly, if you're putting in a patch then thank you! Here are some tips for
getting your patch merged:

Style
-----

As long as the code passes the PEP8 and PyFlakes gates then the style is
acceptable.

Docs
----

The PEP257 gate will check that all public methods have docstrings. If you're
adding something new, like a helper function, try out the
`napoleon style of docstrings <https://pypi.python.org/pypi/sphinxcontrib-napoleon>`_.

Tests
-----

Make sure the patch passes all the tests. If you're adding a new feature don't
forget to throw in a test or two. If you're fixing a bug then definitely add
at least one test to prevent regressions.
requests-raven 0.0.1
Requests wrapper to log onto Raven (University of Cambridge).
License: Apache 2.0

Requests-Raven
==============

Requests-Raven is a custom `Requests <http://requests.readthedocs.org/en/latest/>`_ class to log onto `Raven <https://raven.cam.ac.uk>`_, the University of Cambridge's central
web authentication service.


Installation
------------
	
.. code-block:: bash

	$ pip install requests_raven


Documentation
-------------

Detailed documentation available at `erinhengel.com/software/requests_raven <http://www.erinhengel.com/software/requests-raven/>`_. 


Quickstart
----------

The ``Raven`` class logs onto Raven and establishes a connection with the host. The ``session`` attribute
returns a `Request Session object <http://requests.readthedocs.org/en/latest/user/advanced/#session-objects>`_
with all the methods of the main `Requests API <http://requests.readthedocs.org/en/latest/>`_.


.. code-block:: python

    >>> from requests_raven import Raven
	
    # Establish Raven connection object for the website qje.oxfordjournals.org.
    >>> deets = {'userid': 'ab123', 'pwd': 'XXXX'}
    >>> conn = Raven(url='http://qje.oxfordjournals.org', login=deets)
	
    # The final destination url looks something like this.
    >>> conn.url
    'http://libsta28.lib.cam.ac.uk:2314'
	
    # Use session attribute to access Requests methods.
    >>> url = '{}/content/130/4/1623.full'.format(conn.url)
    >>> request = conn.session.get(url)
    >>> request.status_code
    200
	
    # Do stuff with your request object.
    >>> from bs4 import BeautifulSoup
    >>> soup = BeautifulSoup(request.text, 'html.parser')
    >>> soup.title
    <title>Behavioral Hazard in Health Insurance </title>


``JSTOR``, ``EBSCOhost`` and ``Wiley`` are ``Raven`` subclasses specifically for logging onto `jstor.org <http://www.jstor.org>`_,
`ebscohost.com <http://www.ebscohost.com>`_ and `onlinelibrary.wiley.com <http://onlinelibrary.wiley.com/>`_, respectively.
They include the ``html``, ``pdf`` and ``ref`` methods to download the webpage HTML, PDF and bibliographic
information of a particular document.

.. code-block:: python
    
    >>> from requests_raven import JSTOR
	
    # Establish Raven connection object for the website jstor.org.
    >>> conn = JSTOR(login=deets)
	
    # Download the HTML of the JSTOR webpage for the article with document id 10.1068/682574.
    >>> doc_id = '10.1086/682574'
    >>> html = conn.html(id=doc_id)
	
    # Download the document PDF.
    >>> pdf = conn.pdf(id=doc_id, file='article.pdf')
    
    # Download the bibliographic information.
    >>> biblio = conn.ref(id=doc_id)
    >>> biblio['authors']
    [{'name': 'Per Krusell'}, {'name': 'Anthony A. Smith'}]