an oversimplified wrapper and interactivity for the e621 API
Project description
unfinished!
p621
an oversimplified wrapper and interactivity for the e621 API
features
current
- searching posts
- listing favorites
- listing popular posts
- getting posts
- downloading posts
- opening posts
future
- creating and updating posts
- creating and updating pools
- favoriting and unfavoriting posts
- voting posts
- listing tags
installation
$ python -m pip install p621
documentation
documentation can be found here
examples
retrieving a post
>>> 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()
searching posts
>>> import p621
>>> posts = p621.search_posts(limit = 10, tags = ['male/male', 'cat', 'bird'])
>>> for post in posts:
... print(post.id, post.file.extension)
... post.download()
...
4689397 jpg
4689236 jpg
4683029 png
4681267 jpg
4679249 png
4671358 png
4660654 png
4657220 png
4650173 jpg
4642501 jpg
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
p621-0.2.0.tar.gz
(6.1 kB
view details)
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
p621-0.2.0-py3-none-any.whl
(5.2 kB
view details)
File details
Details for the file p621-0.2.0.tar.gz.
File metadata
- Download URL: p621-0.2.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
551800f788d08fdbfd9a17787900c8a2f6a3d34faed1d0c500ab3b2887be09ee
|
|
| MD5 |
c44d790f6c29582d64617040c4198adc
|
|
| BLAKE2b-256 |
1d02ba9c76d11b510bfacd26375e30bc691a5f5408646cf59fd149f994937ae7
|
File details
Details for the file p621-0.2.0-py3-none-any.whl.
File metadata
- Download URL: p621-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed7f5c31ba966c761d08eb61aae3ea79a0b3a5f9a3659cae22eefbc86c9503ba
|
|
| MD5 |
2a9a23c9dc284f9a27608a540882620f
|
|
| BLAKE2b-256 |
7b0b8b04730df3ffd02efc1a7a6e98d5cea4224ce9d0ca1d9a7fa9968b2bc615
|