Metadata-Version: 2.1
Name: yippi
Version: 0.2.0.1
Summary: An (a)sync e621 API wrapper for Python.
Home-page: https://github.com/rorre/Yippi
License: LGPL-3.0-only
Author: Rendy Arya Kemal
Author-email: rendyarya22@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Utilities
Requires-Dist: Sphinx[docs] (>=4.0.2,<5.0.0)
Requires-Dist: aiohttp (>=3.6.2,<4.0.0)
Requires-Dist: pyrate-limiter (>=2.3.4,<3.0.0)
Requires-Dist: requests (>=2.23.0,<3.0.0)
Requires-Dist: sphinx-rtd-theme[docs] (>=0.5.2,<0.6.0)
Requires-Dist: sphinxcontrib-napoleon[docs] (>=0.7,<0.8)
Project-URL: Documentation, https://yippi.readthedocs.io/
Project-URL: Repository, https://github.com/rorre/Yippi
Description-Content-Type: text/x-rst

========
Overview
========

An (a)sync e621 API wrapper library.

* Free software: GNU Lesser General Public License v3 (LGPLv3)

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

::

    pip install yippi

You can also install the in-development version with::

    pip install git+ssh://git@github.com/rorre/yippi.git@master

Quickstart
==========

Sync
----

::

    >>> import requests
    >>> from yippi import YippiClient
    >>>
    >>> session = requests.Session()
    >>> client = YippiClient("MyProject", "1.0", "MyUsernameOnE621", session)
    >>> posts = client.posts("m/m zeta-haru rating:s") # or ["m/m", "zeta-haru", "rating-s"], both works.
    [Post(id=1383235), Post(id=514753), Post(id=514638), Post(id=356347), Post(id=355044)]
    >>> posts[0].tags
    {'artist': ['zeta-haru'],
     'character': ['daniel_segja', 'joel_mustard'],
     'copyright': ['patreon'],
     'general': ['5_fingers', ..., 'spooning'],
     'invalid': [],
     'lore': [],
     'meta': ['comic'],
     'species': ['bird_dog', ... ]}

Async
-----

::

    >>> import aiohttp
    >>> from yippi import AsyncYippiClient
    >>>
    >>> session = aiohttp.ClientSession()
    >>> client = AsyncYippiClient("MyProject", "1.0", "MyUsernameOnE621", session)
    >>> posts = await client.posts("m/m zeta-haru rating:s") # or ["m/m", "zeta-haru", "rating-s"], both works.
    [Post(id=1383235), Post(id=514753), Post(id=514638), Post(id=356347), Post(id=355044)]
    >>> posts[0].tags
    {'artist': ['zeta-haru'],
     'character': ['daniel_segja', 'joel_mustard'],
     'copyright': ['patreon'],
     'general': ['5_fingers', ..., 'spooning'],
     'invalid': [],
     'lore': [],
     'meta': ['comic'],
     'species': ['bird_dog', ... ]}

Examples are available in `examples directory <https://github.com/rorre/Yippi/tree/master/examples>`_.
    
Documentation
=============

Documentation is available on readthedocs: https://yippi.readthedocs.io/


Development
===========

To run the all tests run::

    tox

Note, to combine the coverage data from all the tox environments run:

.. list-table::
    :widths: 10 90
    :stub-columns: 1

    - - Windows
      - ::

            set PYTEST_ADDOPTS=--cov-append
            tox

    - - Other
      - ::

            PYTEST_ADDOPTS=--cov-append tox

