https://github.com/luquedaniel/pybooru
Pybooru is a Python package to access to the API of Danbooru/Moebooru based sites
https://github.com/luquedaniel/pybooru
api api-client danbooru moebooru python
Last synced: 7 months ago
JSON representation
Pybooru is a Python package to access to the API of Danbooru/Moebooru based sites
- Host: GitHub
- URL: https://github.com/luquedaniel/pybooru
- Owner: LuqueDaniel
- License: mit
- Created: 2012-05-29T18:47:32.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T20:54:21.000Z (about 3 years ago)
- Last Synced: 2025-07-01T14:18:15.497Z (7 months ago)
- Topics: api, api-client, danbooru, moebooru, python
- Language: Python
- Homepage:
- Size: 387 KB
- Stars: 113
- Watchers: 3
- Forks: 20
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Pybooru - Package for Danbooru/Moebooru API
[](https://pypi.python.org/pypi/Pybooru/)
[](https://pypi.python.org/pypi/Pybooru/)
[](https://raw.githubusercontent.com/LuqueDaniel/pybooru/master/LICENSE)
[](https://pybooru.readthedocs.io/en/stable/?badge=stable)
**Pybooru** is a Python package to access to the API of Danbooru/Moebooru based sites.
- Version: **4.2.2**
- Licensed under: **MIT License**
## Dependencies
- Python: >= 2.7 or Python: >= 3.3
- [requests](http://docs.python-requests.org/en/latest/)
## Installation
### from Python Package Index (Pypi)
[Pybooru on Pypi.](https://pypi.python.org/pypi/Pybooru/)
```bash
pip install --user Pybooru
```
### Manual installation
```bash
git clone git://github.com/luquedaniel/pybooru.git
cd pybooru
pip install --user -r requirements.txt
sudo python setup.py build
python setup.py install
```
## Examples of use
See [More examples](https://github.com/LuqueDaniel/pybooru/tree/master/examples).
### Danbooru
```python
from pybooru import Danbooru
client = Danbooru('danbooru')
artists = client.artist_list('ma')
for artist in artists:
print("Name: {0}".format(artist['name']))
```
#### Login example
```python
from pybooru import Danbooru
client = Danbooru('danbooru', username='your-username', api_key='your-apikey')
client.comment_create(post_id=id, body='Comment content')
```
### Moebooru
```python
from pybooru import Moebooru
client = Moebooru('konachan')
artists = client.artist_list(name='neko')
for artist in artists:
print("Name: {0}".format(artist['name']))
```
#### Login example
##### Default sites
```python
from pybooru import Moebooru
client = Moebooru('konachan', username='your-username', password='your-password')
client.comment_create(post_id=id, comment_body='Comment content')
```
##### Not default sites
```python
from pybooru import Moebooru
client = Moebooru('konachan.com', username='your-username', password='your-password',
hash_string='So-I-Heard-You-Like-Mupkids-?--{0}--')
client.comment_create(post_id=id, comment_body='Comment content')
```
## Documentation
You can consult the documentation on **[Read the Docs](https://pybooru.readthedocs.io/)**
## Status
| Platform | Master | Develop |
| :------------- | :------------- | :------- |
| [Linux & OSX (Travis CI)](https://travis-ci.com/LuqueDaniel/pybooru) | [](https://travis-ci.com/LuqueDaniel/pybooru) | [](https://travis-ci.com/LuqueDaniel/pybooru) |
| [Windows (AppVeyor)](https://ci.appveyor.com/project/LuqueDaniel/pybooru) | [](https://ci.appveyor.com/project/LuqueDaniel/pybooru) | [](https://ci.appveyor.com/project/LuqueDaniel/pybooru) |
## Contributing
Feel free to contribute, take a look at **[CONTRIBUTING](https://github.com/LuqueDaniel/pybooru/blob/master/CONTRIBUTING.md)**.
## License
- **[See MIT License](https://github.com/LuqueDaniel/pybooru/blob/master/LICENSE)**