Skip to main content

A python3 library to generate custom epub books.

Project description

pypub

Create epub's using Python. Pypub is a Python library to create epub files quickly, without having to worry about the intricacies of the epub specification.

This package was originally forked and re-written based on WCember's Python 2 version, but due to a lack of response has been re-released as a new package to support Python 3.

The codebase has since gone through a few substantial rewrites and operates as its own library moving forward.

Installation

pip install pypub3

Quickstart

import pypub

my_first_epub = pypub.Epub('My First Epub')
my_first_chapter = pypub.create_chapter_from_url('https://en.wikipedia.org/wiki/EPUB')
my_first_epub.add_chapter(my_first_chapter)
my_first_epub.create('./my-first-epub.epub')

Features

  • Pypub is easy to install and has minimal dependencies.
  • Pypub abstracts the epub specification. Create epubs without worrying about what an NCX is.
  • Pypub can create epubs from websites, html files, strings, or a combination of all three.
  • Pypub can clean up poorly formatted and complicated html, so it will show cleanly as a chapter in your book.
  • Pypub creates epubs specifically so they can be converted into Amazon Kindle mobi or azw3 files. Don't know which tags Amazon supports? Don't worry about it because pypub does.
  • Pypub is customizable. Don't like the way pypub sanitizes html files for you ebook? Pypub can be configured with your own sanitation function.
  • Pypub is licensed under the MIT license. Do what you want with it.

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

pypub3-2.0.6.tar.gz (413.3 kB view details)

Uploaded Source

Built Distribution

pypub3-2.0.6-py3-none-any.whl (415.4 kB view details)

Uploaded Python 3

File details

Details for the file pypub3-2.0.6.tar.gz.

File metadata

  • Download URL: pypub3-2.0.6.tar.gz
  • Upload date:
  • Size: 413.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.20

File hashes

Hashes for pypub3-2.0.6.tar.gz
Algorithm Hash digest
SHA256 7caab30fbfc315024087cc57ba7884d55c4bb74368712fe5e2d394b777784860
MD5 c12363ef601b24e6c4a54b8d3bafa921
BLAKE2b-256 d29e1fc1b5fb07a71fd04c14313f9c431dd6de02d08d007159237b6fa5e626a2

See more details on using hashes here.

File details

Details for the file pypub3-2.0.6-py3-none-any.whl.

File metadata

  • Download URL: pypub3-2.0.6-py3-none-any.whl
  • Upload date:
  • Size: 415.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.20

File hashes

Hashes for pypub3-2.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 654b09ab0999260d1b19bba9684e91b4e9a6899d031d9e0e5b4e462f9b8a336c
MD5 8a6ccb7ac2bef88feca57ac910d052ca
BLAKE2b-256 00518a6596a3bbcb177707d27833c197c58dea486f3ce0a28cdc48b89beb7c72

See more details on using hashes here.

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