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 ISBNs must 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. While it may be feasible to allow some cases as non-str types the complexity in design and usage isn’t worth the minimal benefit.

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

Project details


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