eoan-ermine / e621-py

A feature-rich high-level e621 and e926 API wrapper.
MIT License
19 stars 4 forks source link
api e621 e926 furry yiff

e621

e621 is a feature-rich high-level e621 and e926 API wrapper.

It provides access to almost all of the endpoints available. The only exceptions are unstable and admin-only endpoints.

e621 API documentation is currently highly undocumented, unstable, and sometimes even untruthful. We tried to wrap it in a sanest possible way, properly documenting all the possible ways to interact with it. However, if you still have any questions, bugs to report, or features to request -- please, create an issue on our github page and we will reply as soon as we can.

Installation

$ pip install e621

Quickstart

We translate everything the API returns to python data types created with pydantic. Everything is 100% typehinted so you get autocomplete everywhere and your IDE will warn you if you are sending invalid arguments or using nonexistent attributes.

Creating the api client

api = E621()


* If you wish to get information about your account, use your blacklist or create/update/delete any of the e621's entities, you will have to create an api key and put it into the API client as such:
```python
api = E621(("your_e621_login", "your_e621_api_key"))

Searching

The majority of the endpoints allow you to query for a list of their entities, be it posts, pools or tags.

api.posts.create( tag_string="canine 3d rick_roll", file=Path("path/to/rickroll.webm"), rating="s", sources=[], description="Rick roll?" )



## FAQ
* For more information on these and other api endpoints, please, visit our [endpoint reference](TODO)