{"id":17720335,"url":"https://github.com/xlcnd/isbnlib","last_synced_at":"2026-02-22T14:43:36.459Z","repository":{"id":18046952,"uuid":"21095538","full_name":"xlcnd/isbnlib","owner":"xlcnd","description":"python library to validate, clean, transform and get metadata of ISBN strings (for devs).","archived":false,"fork":false,"pushed_at":"2024-08-01T15:37:36.000Z","size":1784,"stargazers_count":267,"open_issues_count":15,"forks_count":36,"subscribers_count":11,"default_branch":"dev","last_synced_at":"2025-10-21T19:24:29.002Z","etag":null,"topics":["biblatex","bibliographic-references","book","csl-json","doi","ean13","endnote","google-books","isbn","metadata","open-library","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xlcnd.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.txt","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-LGPL-3.0.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT.txt","agents":null,"dco":null,"cla":null}},"created_at":"2014-06-22T14:20:45.000Z","updated_at":"2025-10-17T16:50:21.000Z","dependencies_parsed_at":"2023-01-16T21:15:36.003Z","dependency_job_id":"75f81344-a7c4-4d6f-b357-52ffa3ba383d","html_url":"https://github.com/xlcnd/isbnlib","commit_stats":{"total_commits":2123,"total_committers":11,"mean_commits":193.0,"dds":0.01837023080546396,"last_synced_commit":"82b00926598bb407ec6a7c148ee3812be2176794"},"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"purl":"pkg:github/xlcnd/isbnlib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlcnd%2Fisbnlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlcnd%2Fisbnlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlcnd%2Fisbnlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlcnd%2Fisbnlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xlcnd","download_url":"https://codeload.github.com/xlcnd/isbnlib/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlcnd%2Fisbnlib/sbom","scorecard":{"id":1239056,"data":{"date":"2025-10-13","repo":{"name":"github.com/xlcnd/isbnlib","commit":"ddc62f2b77214205a7413b5d049c2a008c5271d4"},"scorecard":{"version":"v5.3.1-0.20251012233417-af419a5f4ac8","commit":"af419a5f4ac865788a844e5a2e726681cf4ff42b"},"score":4.6,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#maintained"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#packaging"}},{"name":"Code-Review","score":1,"reason":"Found 3/24 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/basictests.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/xlcnd/isbnlib/basictests.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/basictests.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/xlcnd/isbnlib/basictests.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/basictests.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/xlcnd/isbnlib/basictests.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/basictests.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/xlcnd/isbnlib/basictests.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/basictests.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/xlcnd/isbnlib/basictests.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/basictests.yml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/xlcnd/isbnlib/basictests.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/xlcnd/isbnlib/codeql-analysis.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/xlcnd/isbnlib/codeql-analysis.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/xlcnd/isbnlib/codeql-analysis.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/xlcnd/isbnlib/codeql-analysis.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create-release.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/xlcnd/isbnlib/create-release.yaml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create-release.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/xlcnd/isbnlib/create-release.yaml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/wip.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/xlcnd/isbnlib/wip.yml/dev?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/basictests.yml:27","Warn: pipCommand not pinned by hash: .github/workflows/basictests.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/basictests.yml:40","Warn: pipCommand not pinned by hash: .github/workflows/basictests.yml:58","Warn: pipCommand not pinned by hash: .github/workflows/basictests.yml:61","Info:   0 out of  12 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/basictests.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/create-release.yaml:1","Warn: no topLevel permission defined: .github/workflows/wip.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#cii-best-practices"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: COPYRIGHT.txt:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'dev'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#branch-protection"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/af419a5f4ac865788a844e5a2e726681cf4ff42b/docs/checks.md#sast"}}]},"last_synced_at":"2025-10-21T19:35:37.177Z","repository_id":18046952,"created_at":"2025-10-21T19:35:37.177Z","updated_at":"2025-10-21T19:35:37.177Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29716358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T13:30:57.152Z","status":"ssl_error","status_checked_at":"2026-02-22T13:30:28.561Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["biblatex","bibliographic-references","book","csl-json","doi","ean13","endnote","google-books","isbn","metadata","open-library","python"],"created_at":"2024-10-25T15:26:41.934Z","updated_at":"2026-02-22T14:43:36.432Z","avatar_url":"https://github.com/xlcnd.png","language":"Python","readme":"\n.. image:: https://github.com/xlcnd/isbnlib/workflows/tests/badge.svg\n    :target: https://github.com/xlcnd/isbnlib/actions\n    :alt: Built Status\n\n.. image:: https://img.shields.io/github/issues/xlcnd/isbnlib/bug.svg?label=bugs\u0026style=flat\n    :target: https://github.com/xlcnd/isbnlib/labels/bug\n    :alt: Bugs\n\n.. image:: https://img.shields.io/pypi/dm/isbnlib.svg?style=flat\n    :target: https://pypi.org/project/isbnlib/\n    :alt: PYPI Downloads\n\n\n\nInfo\n====\n\n``isbnlib`` is a (pure) python library that provides several\nuseful methods and functions to validate, clean, transform, hyphenate and\nget metadata for ISBN strings.\n\n\n\nInstall\n-------\n\nFrom the command line, enter (in some cases you have to precede the\ncommand with ``sudo``):\n\n\n.. code-block:: bash\n\n    $ pip install isbnlib\n\n\nIf you use linux systems, you can install using your distribution package\nmanager (all major distributions have packages ``python-isbnlib``\nand ``python3-isbnlib``), however these are (usually) **very old and don't work well any more**!\n\n\n\nISBN\n----\n\n   The official form of an ISBN is something like ``ISBN 979-10-90636-07-1``. However for most\n   applications only the numbers are important, you can always 'mask' them if you need (see below).\n   This library works mainly with 'stripped' ISBNs (only digits and X) like '0826497527'. You can\n   strip an ISBN-like string by using ``canonical(isbnlike)``. You can\n   'mask' the ISBN by using ``mask(isbn)``. So in the examples below, when you see 'isbn'\n   in the argument, it is a 'stripped' ISBN, whereas when the argument is an 'isbnlike', it is a string\n   like ``ISBN 979-10-90636-07-1`` or even something dirty like ``asdf 979-10-90636-07-1 bla bla``.\n\n   Two important concepts: a **valid ISBN** should be an ISBN that was built according to the rules,\n   which is distinct from an **issued ISBN**, which is an ISBN that was already issued to a publisher\n   (this is the usage of the libraries and most of the web services).\n   However *isbn.org*, probably for legal reasons, merges the two!\n   So, according to *isbn-international.org*, '9786610326266' is not valid (because the block 978-66...\n   has not been issued yet, however if you use ``is_isbn13('9786610326266')`` you will get ``True``\n   (because '9786610326266' follows the rules of an ISBN). But the situation is even murkier,\n   try ``meta('9786610326266')`` and you will see that this ISBN was already used!\n\n   If possible, work with ISBNs in the ISBN-13 format (since 2007, only ISBNs\n   in the ISBN-13 format are issued). You can always convert ISBN-10 to ISBN-13, but **not** the reverse (read this_).\n   Read more about ISBNs at isbn-international.org_ or wikipedia_.\n\n\n\nMain Functions\n--------------\n\n``is_isbn10(isbn10like)``\n    Validates as ISBN-10.\n\n``is_isbn13(isbn13like)``\n    Validates as ISBN-13.\n\n``to_isbn10(isbn13)``\n    Transforms ISBN-13 to ISBN-10.\n\n``to_isbn13(isbn10)``\n    Transforms ISBN-10 to ISBN-13.\n\n``canonical(isbnlike)``\n    Keeps only digits and X. You will get strings like `9780321534965` and `954430603X`.\n\n``clean(isbnlike)``\n    Cleans ISBN (only legal characters).\n\n``notisbn(isbnlike, level='strict')``\n    Checks with the goal of invalidating ISBN-like.\n\n``get_isbnlike(text, level='normal')``\n    Extracts all substrings that seem like ISBNs (very useful for scraping).\n\n``get_canonical_isbn(isbnlike, output='bouth')``\n    Extracts ISBNs and transforms them to the canonical form.\n\n``ean13(isbnlike)``\n    Transforms an `isbnlike` string into an EAN13 number (validated canonical ISBN-13).\n\n``doi(isbn)``\n    Returns a DOI's ISBN-A from a ISBN-13.\n\n``mask(isbn, separator='-')``\n    `Mask` (hyphenate) a canonical ISBN.\n\n``info(isbn)``\n    Gets the language or country assigned to this ISBN.\n\n``meta(isbn, service='default')``\n    Gives you the main metadata associated with the ISBN. As the `service` parameter you can use:\n    ``'goob'`` uses the **Google Books service** (**no key is needed**) and\n    **is the default option**,\n    ``'wiki'`` uses the **wikipedia.org** API (**no key is needed**),\n    ``'openl'`` uses the **OpenLibrary.org** API (**no key is needed**).\n    You can enter API keys\n    with ``config.add_apikey(service, apikey)`` (see example below).\n    The output can be formatted as ``bibtex``, ``csl`` (CSL-JSON), ``msword``, ``endnote``, ``refworks``,\n    ``opf`` or ``json`` (BibJSON) bibliographic formats with ``registry.bibformatters``.\n    Now, you can extend the functionality of this function by adding plugins, more metadata\n    providers or new bibliographic formatters (check_ for available plugins).\n\n``editions(isbn, service='merge')``\n    Returns the list of ISBNs of editions related with this ISBN. By default\n    uses 'merge' (merges 'openl', 'thingl' and 'wiki'), but other providers are available:\n    'openl' (uses the search API from **Open Library**),\n    'thingl' (uses the service ThingISBN from **LibraryThing**),\n    'wiki' (uses the service Citation from **Wikipedia**)\n    and 'any' (first tries 'wiki', if no data then 'openl').\n\n``isbn_from_words(words)``\n    Returns the most probable ISBN from a list of words (for your geographic area).\n\n``goom(words)``\n    Returns a list of references from **Google Books multiple references**.\n\n``classify(isbn)``\n    Returns a dictionary of **classifiers** for a canonical ISBN. For the meaning of these classifiers see OCLC_.\n    Most of the data in the underlying service are for books in English. (See issue 138_).\n\n``desc(isbn)``\n    Returns a small description of the book.\n    *Almost all data available are for US books!*\n\n``cover(isbn)``\n    Returns a dictionary with the url for cover.\n    *Almost all data available are for US books!*\n\n``doi2tex(DOI)``\n    Returns metadata formatted as BibTeX for a given DOI.\n\n``ren(filename)``\n    Renames a file using metadata for an ISBN in the filename.\n\n\nSee files test_core_ and test_ext_ for **a lot of examples**.\n\n\n\nPlugins\n-------\n\nYou can extend the functionality of the library by adding plugins (for now, just\nnew metadata providers or new bibliographic formatters).\n\nFor available plugins check_ here.\n\nAfter installing, your plugin will blend transparently in ``isbnlib`` (you will have more options in ``meta`` and ``bibformatters``).\n\n\n\n\nFor Devs\n========\n\n\nAPI's Main Namespaces\n---------------------\n\nIn the namespace ``isbnlib`` you have access to the **core functions**:\n``is_isbn10``, ``is_isbn13``, ``to_isbn10``, ``to_isbn13``, ``canonical``,\n``clean``, ``notisbn``, ``get_isbnlike``, ``get_canonical_isbn``, ``mask``,\n``info``, ``check_digit10``, ``check_digit13``, ``doi`` and ``ean13``.\n\nIn addition, you have access to **metadata functions**, namely:\n``meta``, ``editions``, ``ren``, ``desc``, ``cover``,\n``goom``, ``classify``, ``doi2tex`` and ``isbn_from_words``.\n\nThe exceptions raised by these methods can all be caught using ``ISBNLibException``.\n\n\nYou can extend the lib by using the classes and functions exposed in the\nnamespace ``isbnlib.dev``, namely:\n\n* ``WEBService`` a class that handles access to web\n  services (just by passing a url) and supports ``gzip``.\n  You can subclass it to extend the functionality... but\n  you probably don't need to use it! It is used in the next class.\n\n* ``WEBQuery`` a class that uses ``WEBService`` to retrieve and parse\n  data from a web service. You can build a new provider of metadata\n  by subclassing this class.\n  Its main methods allow passing custom\n  functions (*handlers*) that specialize them to specific needs (``data_checker`` and\n  ``parser``). It implements a **throttling mechanism** with a default rate of\n  one call per second per service.\n\n* ``Metadata`` a class that structures, cleans and 'validates' records of\n  metadata. The ``merge`` method allows implementing a simple merging\n  procedure for records from different sources. The main features of this class can be\n  implemented by calling the ``stdmeta`` function instead!\n\n* ``vias`` exposes several functions to make calls to services simply by passing the name and\n  a pointer to the service's ``query`` function.\n  ``vias.parallel`` allows making threaded calls.\n  You can use ``vias.serial`` to make serial calls and\n  ``vias.multi`` to use several cores. The default is ``vias.serial``.\n\nThe exceptions raised by these methods can all be caught using ``ISBNLibDevException`` (or, more generally, ``ISBNLibException``).\nYou **shouldn't raise** this exception in your code, only raise the specific exceptions\nexposed in ``isbnlib.dev`` whose names end in Error.\n\n\nIn ``isbnlib.dev.helpers`` you can find several methods that we found very useful, some of which\nare only used in ``isbntools`` (*an app and framework* that uses ``isbnlib``).\n\n\nWith ``isbnlib.config`` you can read and set configuration options:\nchange timeouts with ``seturlopentimeout`` and ``setthreadstimeout``,\naccess API keys with ``apikeys`` and add new ones with ``add_apikey``,\naccess and set generic and user-defined options with ``options.get('OPTION1')`` and ``set_option``.\n\n\nFinally, from ``isbnlib.registry`` you can change the metadata service to be used by default\n(``setdefaultservice``),\nadd a new service (``add_service``), access bibliographic formatters for metadata (``bibformatters``),\nset the default formatter (``setdefaultbibformatter``), add new formatters (``add_bibformatter``) and\nset a new cache (``set_cache``) (e.g. to switch off the cache ``set_cache(None)``).\nThe cache only works for calls through metadata functions. These changes only work for the 'current session',\nso should always be done before calling other methods.\n\n\nLet us concretize these points with a small example.\n\nSuppose you want a small script to get metadata using ``Open Library`` formatted in BibTeX.\n\nA minimal script would be:\n\n\n.. code-block:: python\n\n    from isbnlib import meta\n    from isbnlib.registry import bibformatters\n\n    SERVICE = \"openl\"\n\n    # now you can use the service\n    isbn = \"9780446310789\"\n    bibtex = bibformatters[\"bibtex\"]\n    print(bibtex(meta(isbn, SERVICE)))\n\n\n\nPatterns of Usage\n-----------------\n\nThe library implements a very simple API with sensible defaults, but there are cases\nthat need your attention (see case 3 below).\n\n\n\nA. You only need **core functions**:\n\n\n.. code-block:: python\n\n    # import the core functions you need\n    from isbnlib import canonical, is_isbn10, is_isbn13\n\n    isbn = canonical(\"978-0446310789\")\n    if is_isbn13(isbn):\n        ...\n    ...\n\n\nB. You also need **metadata functions** with the **default config**:\n\n\n.. code-block:: python\n\n    from isbnlib import canonical, meta, description\n\n    isbn = canonical(\"978-0446310789\")\n    data = meta(isbn)\n    ...\n\nC. You also need **metadata functions** with a **special config**:\n\n   *Let's suppose you need to add an API key for a metadata plugin\n   and change the cache too*.\n\n\n.. code-block:: python\n\n    from myapp.utils import MyCache\n\n    # import the functions you need, plus 'config' and 'registry'\n    from isbnlib import canonical, config, meta, registry\n\n    # you should use 'config' first\n    config.add_apikey(\"isbndb\", \"kjshdfkjahsdflkjh\")\n\n    # then 'registry'\n    registry.set_cache(MyCache())\n\n    # Only now should you use metadata functions\n    # (there are no adaptions for core functions,\n    # so they can be used at any time)\n    isbn = canonical(\"978-0446310789\")\n    data = meta(isbn, service=\"isbndb\")\n    ...\n\n\nD. You want to build a **plugin** or use **isbnlib.dev** in your code:\n\n   You should study the **public** methods in ``dir(isbnlib.dev)`` very carefully, starting with this template_\n   and following the instructions there. For inspiration take a look at goob_.\n\n   Most of the public bibliographic catalog services return data in **SRU** or **Unimarc** format. It is very easy\n   to write a customer **plugin** for these services, just use porbase_ (SRU) or sbn_ (Unimarc) as templates\n   and consult this project_.\n\n\n\nCaveats\n-------\n\n\n1. These classes are optimized for single calls to services and not for batch calls.\n\n2. If you inspect the library, you will see that there are a lot of private modules\n   (their names start with '_'). These modules **should not** be accessed directly since\n   there's a high probability your program will break with a future version of the library!\n\n\n\nProjects using *isbnlib*\n========================\n\n**Open Library**   https://github.com/internetarchive/openlibrary\n\n**NYPL Library Simplified**  https://github.com/NYPL-Simplified\n\n**RERO ILS**  https://github.com/rero/rero-ils\n\n**CERN CDS RDM** https://github.com/CERNDocumentServer/cds-rdm\n\n**ResearchHub** https://github.com/ResearchHub/researchhub-backend\n\n**Manubot**   https://github.com/manubot\n\n**isbntools**      https://github.com/xlcnd/isbntools\n\n**isbnsrv**        https://github.com/xlcnd/isbnsrv\n\n\n\nSee the full list here_.\n\n\n\nHelp\n====\n\n\nIf you need help, please take a look at github_ or post a question on\nstackoverflow_.\n\n\n\n.. _github: https://github.com/xlcnd/isbnlib/discussions\n\n.. _range: https://www.isbn-international.org/range_file_generation\n\n.. _isbntools: https://pypi.python.org/pypi/isbntools\n\n.. _sourcegraph: http://bit.ly/ISBNLib_srcgraph\n\n.. _readthedocs: http://bit.ly/ISBNLib_rtd\n\n.. _stackoverflow: http://stackoverflow.com/search?tab=newest\u0026q=isbnlib\n\n.. _test_core: https://github.com/xlcnd/isbnlib/blob/master/isbnlib/test/test_core.py\n\n.. _test_ext: https://github.com/xlcnd/isbnlib/blob/master/isbnlib/test/test_ext.py\n\n.. _isbn-international.org: https://www.isbn-international.org/content/what-isbn\n\n.. _wikipedia: http://en.wikipedia.org/wiki/International_Standard_Book_Number\n\n.. _python-future.org: http://python-future.org/compatible_idioms.html\n\n.. _issue: https://github.com/xlcnd/isbnlib/issues/28\n\n.. _check: https://pypi.python.org/pypi?%3Aaction=search\u0026term=isbnlib_\u0026submit=search\n\n.. _template: https://github.com/xlcnd/isbnlib/blob/dev/PLUGIN.zip\n\n.. _goob: https://github.com/xlcnd/isbnlib/blob/dev/isbnlib/_goob.py\n\n.. _search: https://pypi.python.org/pypi?%3Aaction=search\u0026term=isbnlib\u0026submit=search\n\n.. _51: https://github.com/xlcnd/isbnlib/issues/51\n\n.. _here: https://github.com/xlcnd/isbnlib/network/dependents?package_id=UGFja2FnZS01MjIyODAxMQ%3D%3D\n\n.. _OCLC: http://classify.oclc.org/classify2/\n\n.. _this: http://web.archive.org/web/20211024015637/https://bisg.org/news/479346/New-979-ISBN-Prefixes-Expected-in-2020.htm\n\n.. _sbn: https://github.com/arangb/isbnlib-sbn/blob/main/isbnlib_sbn/_sbn.py\n\n.. _porbase: https://github.com/xlcnd/isbnlib-porbase/blob/dev/isbnlib_porbase/_porbase.py\n\n.. _project: https://github.com/xlcnd/isbnlib/issues?q=is%3Aissue+is%3Aopen+label%3Aproject\n\n.. _138: https://github.com/xlcnd/isbnlib/issues/138\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlcnd%2Fisbnlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxlcnd%2Fisbnlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlcnd%2Fisbnlib/lists"}