- isbn_hyphenate is a Python library to add hyphens in the right place to an ISBN (International Standard Book Number). Example:
>>> import isbn_hyphenate >>> isbn_hyphenate.hyphenate("9781590593561") '978-1-59059-356-1'
Most libraries for handling ISBNs can not do hyphenation because it requires using a list of prefixes, available from the International ISBN Agency.
isbn_hyphenate can handle both 10 and 13 digit ISBNs, and will keep the number of digits. If the ISBN is malformed (wrong length or invalid characters) an IsbnMalformedError exception is raised. If the correct hyphen positions cannot be determined, an IsbnUnableToHyphenateError exception is raised. This can mean that the input ISBN is wrong, or it is in a range that is not yet in the known list.
isbn_hyphenate is compatible with both Python 2 and 3.
- To update the prefix list:
Download a new RangeMessage.xml file from https://www.isbn-international.org/range_file_generation
Convert it to Python format: ./isbn_xml2py.py RangeMessage.xml > isbn_lengthmaps.py
- These alternative Python libraries can also hyphenate:
python-stdnum http://pypi.python.org/pypi/python-stdnum
Metadata
Release files for isbn_hyphenate 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| isbn_hyphenate-1.0.4.tar.gz | 11.4 kB | Without provenance | Details |
Release files / isbn_hyphenate-1.0.4.tar.gz
| Download URL | isbn_hyphenate-1.0.4.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59c4c359dcb46b03a62ed4cf60a0999ac2dd53d8c9b0a87223efdde432b07a86
|
|
BLAKE2b-256 checksum How to use checksums |
28e0f7bec3443f5e9cd9da6d03fb684d66a91335f1186cd7830a659f8e0903a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for isbn_hyphenate 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.