Skip to main content

Danbooru post decensoring for Python

Project description


PyPI downloads PyPI version PyPI pyversions

A Python module using Decensooru data to automatically fill any Danbooru post's missing info keys.

The Decensooru id:md5.ext batches will be silently fetched and kept up-to-date in your user data directory,
e.g. ~/.local/share/pydecensooru on GNU/Linux by default.

Originally developed for transparent usage with lunafind.


>>> import requests                                                                     
>>> from pydecensooru import decensor, decensor_iter 

# Decensoring a single post if it needs to be:
>>> p2 = requests.get("").json()
>>> "file_url" in p2
>>> p2d = decensor(p2)
>>> "file_url" in p2d
>>> p2["file_ext"]

# Transparently decensoring any post that needs it in a search:
>>> posts = requests.get("").json()
>>> print(type(posts), type(posts[0]))
<class 'list'> <class 'dict'>
>>> "file_url" in posts[-2]
>>> posts = list(decensor_iter(posts))
>>> "file_url" in posts[-2]

Project details

Download files

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

Source Distribution

pydecensooru-0.2.0.tar.gz (4.0 kB view hashes)

Uploaded source

Built Distribution

pydecensooru-0.2.0-py3-none-any.whl (4.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page