Skip to main content

ISBN - A module for working with 10- and 13-digit ISBNs

Project description

ISBN - A module for working with 10- and 13-digit ISBNs

This module supports the calculation of ISBN checksums with calculate_checksum(), the conversion between ISBN-10 and ISBN-13 with convert() and the validation of ISBNs with validate().

All the functions require ISBNs to be passed in as str types, even if it would seem reasonable to accept some int forms. The reason behind this is English speaking countries use 0 for their group identifier, and Python would treat ISBNs beginning with 0 as octal representations producing incorrect results.

The functions in this module also support 9-digit SBNs for people with older books in their collection.

Project details


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