An (a)sync e621 API wrapper for Python.
Project description
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.
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 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yippi-0.2.0.1.tar.gz.
File metadata
- Download URL: yippi-0.2.0.1.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.4 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c82cf67f3cce5146c5ac6b292e6ffac11d502230ea68fb513f847502150c6615
|
|
| MD5 |
c157d9a0a4bc48b56fffa83ad60b2918
|
|
| BLAKE2b-256 |
8b3f97fe9dd699feaa43d44da1d8c27e569747eeb316bafb16d96066012ae87b
|
File details
Details for the file yippi-0.2.0.1-py3-none-any.whl.
File metadata
- Download URL: yippi-0.2.0.1-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.4 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92947d1224ae8b008567e95e0749334ebd6029fd58dd1cf91cfb5c5856782a88
|
|
| MD5 |
ecd233cbc57a05fb3dfb6ec2c803ed86
|
|
| BLAKE2b-256 |
caf9a2b987fc51eddf836a232a18bdf9fa99850668dc0303872e3e63f96f741f
|