Skip to main content

pyDoujinshiInfo

Unofficial Python3 REST API wrapper for doujinshi.info.
Work in progress. In particular, the data structure may change significantly in the future.

Install

If you're an adventurer, now you can install it with the following command from pypi:

$ pip install pyDoujinshiInfo

Or directly from the github repo:

$ pip install git+https://github.com/layolu/pyDoujinshiInfo

Some of the usage

Create an API instance with login

>>> from pyDoujinshiInfo import API
>>> api = API('your@email.address', 'your_password')

Tags

get tag types

>>> tag_types = api.tag.types()
>>> tag_types
[{'id': 'J5KBm80mEPpr', 'name': {'japanese': '検閲', 'romaji': 'Kenetsu', 'english': 'Censoring'}, 'slug': 'censoring'}, {'id': 'PBRN40y60nZQ', 'name': {'japanese': 'キャラクター', 'romaji': 'Kyarakuta', 'english': 'Character'}, 'slug': 'character'}, {'id': 'lJyp4obm271L', 'name': {'japanese': 'サークル', 'romaji': 'Sakuru', 'english': 'Circle'}, 'slug': 'circle'}, {'id': 'Z3lAm5J4oyxg', 'name': {'japanese': 'コレクション', 'romaji': 'Korekushon', 'english': 'Collection'}, 'slug': 'collection'}, {'id': 'OMbP6nM4jYBn', 'name': {'japanese': 'コンテンツ', 'romaji': 'Kontentsu', 'english': 'Content'}, 'slug': 'content'}, {'id': 'LYAn4lL4Gljz', 'name': {'japanese': 'イベント', 'romaji': 'Ibento', 'english': 'Convention'}, 'slug': 'convention'}, {'id': 'oWYqmql9lJPj', 'name': {'japanese': 'シリーズ', 'romaji': 'Shirizu', 'english': 'Series'}, 'slug': 'series'}, {'id': 'JYB3my24XqGN', 'name': {'japanese': '作家', 'romaji': 'Sakka', 'english': 'Artist'}, 'slug': 'artist'}, {'id': 'R8AZ4G2mvWw2', 'name': {'japanese': '言語', 'romaji': 'Gengo', 'english': 'Language'}, 'slug': 'language'}]
>>> tag_types[1].id
'PBRN40y60nZQ'
>>> tag_types[1].slug
'character'
>>> tag_types[1].name.english
'Character'
>>> tag_types[1].name.japanese
'キャラクター'

get a specific tag with slug

>>> pmmm = api.tag.one('series', 'mahou-shoujo-madoka-magika')
# or shortly
>>> pmmm = api.tag('series', 'mahou-shoujo-madoka-magika')
>>> pmmm
<pyDoujinshiInfo.paginator.PaginatedResults object at 0x76834d50>

get basic data of the tag

>>> pmmm()
{'id': 'R8AZ4GRXmvWw', 'type': {'id': 'oWYqmql9lJPj', 'name': {'japanese': 'シリーズ', 'romaji': 'Shirizu', 'english': 'Series'}, 'slug': 'series'}, 'name': {'japanese': '魔法少女まどかマギカ', 'romaji': 'Mahou Shoujo Madoka Magika', 'english': 'Puella Magi Madoka Magica'}, 'slug': 'mahou-shoujo-madoka-magika', 'created_at': '2019-01-22 02:35:52', 'updated_at': '2019-01-22 02:35:52', 'tags': {'data': []}}
>>> pmmm().id
'R8AZ4GRXmvWw'
>>> pmmm().slug
'mahou-shoujo-madoka-magika'
>>> pmmm().name.japanese
'魔法少女まどかマギカ'
>>> pmmm().name.romaji
'Mahou Shoujo Madoka Magika'
>>> pmmm().name.english
'Puella Magi Madoka Magica'

get doujinshi list of the tag

total doujinshi count with that tag
>>> pmmm.total_num
1815
get 100 doujinshi data with that tag

results() returns a generator so iterable, but needs to be casted if you want a list

>>> books = list(pmmm.results(limit=100))
>>> len(books)
100
>>> books[99]
{'id': 'A7D9JdAyW4yX', 'name': {'japanese': '大事なものはあなただけ', 'romaji': 'Daiji Namonohaanatadake', 'english': None}, 'slug': 'daiji-namonohaanatadake', 'date_released': '2017-08-13', 'pages': 188, 'price': 1900, 'is_adult': False, 'is_copybook': False, 'is_anthology': False, 'is_novel': False, 'created_at': '2019-02-02 14:43:24', 'updated_at': '2019-04-17 19:08:17', 'cover': 'https://files.doujinshi.info/A7D9JdAyW4yX/2019-02-02/cover-HTKZ.jpg'}
>>> books[99].id
'A7D9JdAyW4yX'
>>> books[99].slug
'daiji-namonohaanatadake'
>>> books[99].name.japanese
'大事なものはあなただけ'

Doujinshi

not written yet.

Library

not written yet.

Official API docs

Metadata

Release files for pyDoujinshiInfo 0.1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyDoujinshiInfo 0.1.0.5
File Size Uploaded Provenance Actions
pyDoujinshiInfo-0.1.0.5.tar.gz 10.5 kB Without provenance Details for pyDoujinshiInfo-0.1.0.5.tar.gz

Release files / pyDoujinshiInfo-0.1.0.5.tar.gz

Download URL pyDoujinshiInfo-0.1.0.5.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2b11d098b2f7438abee650173cacbbe737988de3ef8056f221b079fc48b8c9d1
BLAKE2b-256 checksum
How to use checksums
ea5f2aa8cf86df9e1a18e1b93ba9bf013ae38a8ad810b847938dce27665656d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.3

Security for pyDoujinshiInfo 0.1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0.5 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page