Skip to main content

A library to interact with comic archives

Project description

Darkseid

PyPI - Version PyPI - Python Ruff Pre-Commit

A Python library to interact with comic archives.

Installation

pip install darkseid

There are optional dependencies which can be installed by specifying one or more of them in braces e.g. darkseid[7zip]

The optional dependencies are:

  • 7zip: Provides support for reading/writing to CB7 files.

  • pillow: Provides support for getting page information that is used with ComicInfo.xml metadata.

  • pdf: Provides support for reading/writing metadata in PDF comics and exporting them to CBZ format.

    The pymupdf dependency includes pre-built wheels for most platforms. On some platforms (e.g., Linux ARM, Windows), installation may require libstdc++ and C/C++ build tools to compile libmupdf. See the pymupdf documentation for details.

Example

from pathlib import Path
from darkseid.comic import Comic, MetadataFormat

comic = Comic(Path("my_comic.cbz"))

# Check if it's a valid comic
if comic.is_valid_comic():
    print(f"Comic '{comic.name}' has {comic.get_number_of_pages()} pages")

# Read metadata
if comic.has_metadata(MetadataFormat.COMIC_INFO):
    metadata = comic.read_metadata(MetadataFormat.COMIC_INFO)
    print(f"Series: {metadata.series.name}")

# Get a page
page_data = comic.get_page(0)  # First page
if page_data:
    with open("cover.jpg", "wb") as f:
        f.write(page_data)

Documentation

Read the project documentation

Bugs/Requests

Please use the GitHub issue tracker to submit bugs or request features.

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

darkseid-7.2.3.tar.gz (113.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

darkseid-7.2.3-py3-none-any.whl (92.9 kB view details)

Uploaded Python 3

File details

Details for the file darkseid-7.2.3.tar.gz.

File metadata

  • Download URL: darkseid-7.2.3.tar.gz
  • Upload date:
  • Size: 113.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for darkseid-7.2.3.tar.gz
Algorithm Hash digest
SHA256 6720a6ab69d2c0734151c16bae20bd6ac670804396850d4a7f2afb08eb2c52a8
MD5 951c2fd978244907fbdc2a3a69c0ccb5
BLAKE2b-256 99a02338f080af1e6818bd47999a3b479a729435c9e2e99e924f674a3c979576

See more details on using hashes here.

File details

Details for the file darkseid-7.2.3-py3-none-any.whl.

File metadata

  • Download URL: darkseid-7.2.3-py3-none-any.whl
  • Upload date:
  • Size: 92.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for darkseid-7.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 184ea5cab45213c9bb9aa442560e56e9cc3cff87fe600a66050c4c90017c41d3
MD5 93635e424e85f0eaabc527f451c10325
BLAKE2b-256 449e1aa37bcadd8c4bcd8db1eabc3e007043bff63737919285c2e6d90af9fcb7

See more details on using hashes here.

Supported by

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