Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

An (a)sync e621 API wrapper for Python.

Project description

https://travis-ci.com/rorre/Yippi.svg?branch=master https://codecov.io/gh/rorre/yippi/branch/master/graph/badge.svg

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

>>> from yippi import YippiClient
>>> client = YippiClient("MyProject", "1.0", "MyUsernameOnE621")
>>> 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

>>> from yippi import AsyncYippiClient
>>> client = AsyncYippiClient("MyProject", "1.0", "MyUsernameOnE621")
>>> 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', ... ]}

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:

Windows
set PYTEST_ADDOPTS=--cov-append
tox
Other
PYTEST_ADDOPTS=--cov-append tox

Changelog

0.0.1 (2020-04-19)

  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for yippi, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size yippi-0.1.1-py2.py3-none-any.whl (22.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size yippi-0.1.1.tar.gz (123.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page