semvec/pypi-packages huggingface dataset:
python-ninegag 1.0
Python library to get stuff from 9gag.com
License: MIT License
Keywords: ninegag,9gag

python-ninegag
**************

.. image:: https://travis-ci.org/sashgorokhov/python-ninegag.svg?branch=master
    :target: https://travis-ci.org/sashgorokhov/python-ninegag
    
.. image:: https://badge.fury.io/py/python-ninegag.svg
    :target: https://badge.fury.io/py/python-ninegag

Python library to get stuff from 9gag.com

Installation
============

Via pip:

.. code-block:: shell

    pip install python-ninegag

Usage
=====

.. code-block:: python

    pyninegag.get_sections()

Returns dict of 9gag sections, where keys are capitalized sections names, and values are their urls.

Example output:

.. code-block:: python

    {'Fresh': 'http://9gag.com/fresh',
    'Cute Animals': 'http://9gag.com/cute',
    'Comic': 'http://9gag.com/comic',
    'Food': 'http://9gag.com/food',
    'GIF': 'http://9gag.com/gif',
    'Cosplay': 'http://9gag.com/cosplay',
    'Geeky': 'http://9gag.com/geeky',
    'Girl': 'http://9gag.com/girl',
    'Funny': 'http://9gag.com/funny',
    'Design': 'http://9gag.com/design',
    'WTF': 'http://9gag.com/wtf',
    'NSFW': 'http://9gag.com/nsfw',
    'Trending': 'http://9gag.com/trending',
    'Timely': 'http://9gag.com/timely',
    'Meme': 'http://9gag.com/meme',
    'Hot': 'http://9gag.com/hot'
    }

NOTE: NSFW section will return zero articles (empty iterable) since watching this section requires user login, which is not supported by this library.

These values are not hardcoded and will be generated on first request. Values are cached.

.. code-block:: python

    pyninegag.get_articles(url, max_pages=1)

Return iterable with all articles found on given url.
``max_pages`` - how many pages of results to parse. If None - all available. Default 1 - only first page.

.. code-block:: python

    pyninegag.get_articles(pyninegag.BASE_URL)

Will return all articles on main 9gag page.

Example output:

.. code-block:: python

    [
    {
        'id': 'a1MEzz6',
        'title': 'Jumping into the abyss',
        'data': {
            'type': 'gif',
            'url': 'http://img-9gag-fun.9cache.com/photo/a1MEzz6_460sa.gif'
        },
        'comments': '163',
        'votes': '10709',
        'url': 'http://9gag.com/gag/a1MEzz6'
    },
    {
        'id': 'agVEP3g',
        'title': 'Made of crab',
        'data': {
            'type': 'image',
            'url': 'http://img-9gag-fun.9cache.com/photo/agVEP3g_700b_v1.jpg'
        },
        'comments': '257',
        'votes': '10053',
        'url': 'http://9gag.com/gag/agVEP3g'
    }
    ]

Article type can be one of gif, image or longpost. Longpost is just a very tall image.

.. code-block:: python

    pyninegag.get_by_section(section_name, max_pages=1)

Return iterable with all articles found in given section. Section name must be one of the keys of ``pyninegag.get_sections()``. If not found, ``ValueError`` will be raised.

There is also a logger ``pyninegag`` enabled that logs exceptions and warnings of parsing errors. All errors contain article id and url in message for easier debugging of problems.
python-nnmclub 1.0
Python library to search torrents on popular russian torrent tracker.
License: MIT License
Keywords: nnm-club,nnmclub,torrent

python-nnmclub
**************

.. image:: https://badge.fury.io/py/python-nnmclub.svg
    :target: https://badge.fury.io/py/python-nnmclub

Python library to search torrents on popular russian torrent tracker.

Installation
============

Via pip:

.. code-block:: shell

    pip install python-nnmclub

Usage
=====

.. code-block:: python

    import pynnmclub
    nnmclub = pynnmclub.NNMClub()
    results = nnmclub.search("Iron Man")

Return an iterable with dicts of all torrents found.

Torrent dict is:

.. code-block:: python

    {
        'topic',
        'detail_url',
        'download_url',
        'size',  # in bytes
        'seeders',
        'leechers',
        'added',  # type: datetime.datetime
        'views',
        'messages',
        'rating_number',  # how many people rated this,
        'rating',  # rating. float from 0 to 5
        'thanks',  # how many people thanked this torrent
    }

NOTE: With unathorized client you will be able to fetch only first 50 results of search.

Create an authorized client:

.. code-block:: python

    nnmclub = pynnmclub.NNMClub(username, password)

Or using previously created nnmclub client:

.. code-block:: python

    nnmclub.login(username, password)

If username or password are invalid, whis will raise an ``pynnmclub.InvalidCredentials`` error
(which is child to ``pynnmclub.NNMClubError``)

There is also a logger ``pynnmclub`` enabled that logs exceptions and warnings of parsing errors.
It also includes a full HTML of errored context as a DEBUG message.

.. :changelog:

History
-------

1.0.0 (2016-05-13)
++++++++++++++++++

* Fixed setup.py requires option (changed to install_requires)
* Version bump

0.1.0 (2016-04-11)
++++++++++++++++++

* Initial PyPI release
python-vkontakte 1.1.2
Python library to access vkontakte social network api.
License: MIT License
Keywords: vkontakte,api,vkontakte api

python-vkontakte
****************

.. image:: https://badge.fury.io/py/python-vkontakte.svg
    :target: https://badge.fury.io/py/python-vkontakte

Python library to access vkontakte social network api.

Installation
============

Via pip:

.. code-block:: shell

    pip install python-vkontakte

Api
===

.. code-block:: python

    import pyvkontakte
    api = pyvkontakte.VkontakteApi()
    api.call('users.get', user_ids=1) # [{'last_name': 'Дуров', 'id': 1, 'first_name': 'Павел'}]

or calling method via class attribute:

.. code-block:: python

    api.users_get(user_ids=1) # [{'last_name': 'Дуров', 'id': 1, 'first_name': 'Павел'}]

Are both the same. In a second form, it is a method name where dots replaced with underscores - ``wall.getById`` will be ``wall_getById`` and so on.

If you want to call some private api, which require access token, just create a api class with it:

.. code-block:: python

    pyvkontakte.VkontakteApi('access token')

Using different api version:

.. code-block:: python

    pyvkontakte.VkontakteApi(v='5.50')

If some error occures after api request (response json contains ``error`` insead of ``response`` key), ``pyvkontakte.VkontakteApiError`` will be raised.
Special attribute ``json`` will be avaible on exception object, additionally exception str representation will contain error description and error code.

Authorization
=============

For obtaining access token, you can use ``pyvkontakte.auth`` method.

.. code-block:: python

    pyvkontakte.auth(login, password, client_id, scope)

which will return dict with keys access_token, expires_in, user_id. If login or password is invalid, ``pyvkontakte.InvalidCredentials`` will be raised.
If some parsing error occurs, ``pyvkontakte.ParsingError`` will be raised.
Both ``pyvkontakte.InvalidCredentials`` and ``pyvkontakte.ParsingError`` are subclasses of ``pyvkontakte.VkontakteAuthError``.

There is also a logger ``pyvkontakte`` (``pyvkontakte.auth`` and ``pyvkontakte.api``) enabled.
``pyvkontakte.api`` logs an INFO every request made with request params, and DEBUG with json of response


.. :changelog:

History
-------

1.1.2 (2016-05-13)
++++++++++++++++++

* Fixed setup.py requires option (changed to install_requires)

1.1.1 (2016-04-27)
++++++++++++++++++

* Some refactoring for easier VkontakteApi extending

1.1.0 (2016-04-21)
++++++++++++++++++

* Fixed auth issue

1.0.0 (2016-04-16)
++++++++++++++++++

* First PyPi release

0.1.0 (2016-04-16)
++++++++++++++++++

* Initial release