p621 is a Python library that allows for easy and simple interactions with e621.net the e621 API

>>> import p621
>>> post = p621.get_post(4517306)
>>> post.created_at
'2024-01-05T23:48:13.417-05:00'
>>> post.favorite_count
75
>>> post.file.extension
'jpg'
>>> post.page_url()
'https://e621.net/posts/4517306'
>>> post.tags.dump()
['anthro', 'band-aid', 'band-aid_on_face', 'band-aid_on_nose', 'bandage', 'bandage_on_face', 'bandage_on_nose', 'black_body', 'black_fur', 'cheek_tuft', 'chest_tuft', 'emoji', 'facial_tuft', 'fur', 'grey_body', 'grey_fur', 'half-closed_eyes', 'male', 'narrowed_eyes', 'simple_background', 'solo', 'text', 'tuft', 'wide_eyed', 'xing1', 'nick_(the_xing1)', 'lagomorph', 'leporid', 'mammal', 'rabbit', '1:1', 'absurd_res', 'english_text', 'hi_res']
>>> post.open()

p621 lets you search, retrieve information and interact with posts on e621 extremely easily with Python!

source

the source can be found in the GitHub repository

contents