Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Python module for working with 10- and 13-digit ISBNs
Python

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
COPYING
ISBN.py
NEWS
README
docutils.css
setup.py
test_isbns.py

README

``pyisbn``
==========

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

Introduction
------------

``pyisbn`` is a `GPL v3`_ licensed module for working with various book
identification numbers.  It includes functions for conversion,
verification and generation of checksums.  It also includes basic
classes for representing ISBNs as objects.

Requirements
------------

``pyisbn`` does not depend on any modules that aren't included in
Python_'s standard library, and as such should run with Python 2.5 or
newer [#]_.  If ``pyisbn`` doesn't work with the version of Python you
have installed, drop me a mail_ and I'll endeavour to fix it.

The module have been tested on many UNIX-like systems, including Linux,
Solaris and OS X, but it should work fine on other systems too.  The
module contains a large collection of ``doctest`` tests that will be run
if executed directly or with Python's ``-m`` switch.  You can also run
the testsuite by executing ``make check`` in the source tree.

.. [#] The module may work with older Python versions, but it has only
       been tested with v2.5.

Example
-------

The simplest way to show how ``pyisbn`` works is by example, and here
goes:

.. code-block:: pycon

    >>> import ISBN
    >>> Permutation_City = "1-85798-218-5"
    >>> ISBN.validate(Permutation_City)
    True
    >>> ISBN.convert(Permutation_City)
    '9781857982183'

or to process ISBNs using the object pattern use:

.. code-block:: pycon

    >>> Permutation_City = ISBN.ISBN10("1-85798-218-5")
    >>> Permutation_City.validate()
    True
    >>> Permutation_City.convert()
    '9781857982183'

All independent functions contain hopefully useful docstrings with
``doctest``-based examples.  The ``html/`` directory contains the
preprocessed epydoc_ output for reference.

Bugs
----

If you find a bug don't hesitate to drop me a mail_ preferably including
a minimal testcase, or even better a patch!

.. _GPL v3: http://www.gnu.org/licenses/
.. _Python: http://www.python.org/
.. _epydoc: http://epydoc.sourceforge.net/
.. _mail: jnrowe@ukfsn.org

..
    :vim: set ft=rst set ts=2 sw=2 et:

Something went wrong with that request. Please try again.