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-8.1.0.tar.gz (114.6 kB view details)

Uploaded Source

Built Distribution

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

darkseid-8.1.0-py3-none-any.whl (93.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: darkseid-8.1.0.tar.gz
  • Upload date:
  • Size: 114.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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-8.1.0.tar.gz
Algorithm Hash digest
SHA256 2d785a2be79d34de934527a42012a16f9672ada344e2c60d7b3415b9999e4703
MD5 5a7b4d1c2730b141f5828efaab0eb543
BLAKE2b-256 ba9aed845c354c1cc4888d6863c82f0a0f653d0aa8ec0719d526ef068550b3c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: darkseid-8.1.0-py3-none-any.whl
  • Upload date:
  • Size: 93.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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-8.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e96ef8145a745d5ec4ddf149b47aceaefd522f73bc0528146b5e452615e649e5
MD5 3bb9e3f095a3838dc6d072f3de790766
BLAKE2b-256 b7e2262ffe5d948473ffc74778445c1a7aaeb2eca6cf83a7cdd0bdb8d8056b9b

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