{ "info": { "author": "Rune Lain Knudsen", "author_email": "rune.knudsen@uib.no", "bugtrack_url": null, "classifiers": [], "description": "Python Client for the URN PID service by the National Library of Norway\n=======================================================================\n\nThis is a library and a set of command line tools for communicating with\nthe SOAP ID service available at the National Library of Norway.\n\nFor more information (in Norwegian) about the service: \\* Regarding URN:\nhttp://www.nb.no/idtjeneste/about\\_urn.jsf \\* Regarding the SOAP API:\nhttp://www.nb.no/idtjeneste/about\\_urn\\_webservice.jsf\n\nInstallation\n------------\n\nThe library is available as\n`NbUrnClient `__ on PyPI. To\ninstall it to your desired python environment:\n``pip install NbUrnClient``\n\nThe command line utilities are not included. As long as you have the\nNbUrnClient library installed, all you need to do is to download the\n**bin** and **config** directories and follow the instructions under\n**Configuration**.\n\nConfiguration\n-------------\n\nThe **config** directory contains an example of the YAML config file\nused by the client (**config.yml.example**). Copy this to e.g.\n**config.yml** and replace the dummy entries with the information you\nhave received from the National Library.\n\nCommand Line Tools\n------------------\n\nThe **bin** directory contains a set of command line tools that make use\nof the library.\n\nUsage examples:\n~~~~~~~~~~~~~~~\n\nNB: Most of these examples (except ``find_urn`` and\n``find_urns_for_url``) require a valid user account.\n\nTo reserve the next available urn in some series, use\n``reserve_next_urn``:\n\n::\n\n ./bin/reserve_next_urn --series-code urn:series:code\n\nThe service will return information about the newly generated URN. To\nadd a URL to the newly generated URN (where **foo** is the new URN\nadress returned from the previous step), use ``add_url``:\n\n::\n\n ./bin/add_url --urn foo --url http://www.someurl.com\n\nYou can add more than one URL to a URN. To register one of them as the\ndefault URL for a URN, use ``set_default_url``:\n\n::\n\n ./bin/set_default_url --urn foo --url http://www.someurl.com\n\nYou can combine the previous steps using ``create_urn``:\n\n::\n\n ./bin/create_urn --series-code urn:series:code --url http://www.someurl.com/\n\nThe service will return the created URN, with the specified URL\nregistered and set as default.\n\nYou can request information about some previously registered URN using\n``find_urn``:\n\n::\n\n ./bin/find_urn --urn foo\n\nYou can also request information for all URNs containing a specific URL\nwith ``find_urns_for_url``:\n\n::\n\n ./bin/find_urns_for_url --url http://www.someurl.com\n\nLibrary\n-------\n\nThe **nb\\_urn\\_client** directory contains the library for communicating\nwith the SOAP API. It is a thin wrapper around the SOAP API calls. To\nsee how it's used, take a look at the commands in the **bin** directory.\n\nLibrary usage example:\n~~~~~~~~~~~~~~~~~~~~~~\n\nThe following example makes use of the library to do more or less the\nsame as in the command line tools examples:\n\n.. code:: python\n\n import nb_urn_client\n\n # Instantiate a client with some config file\n c = nb_urn_client.NbUrnClient(config_file=\"config.yml\")\n\n # You need to login first\n c.login()\n\n # Reserve the next available URN in the given series\n new_urn = c.reserve_next_urn('urn:series:code')\n\n # Register some valid URL for the newly created URN\n c.add_url(new_urn.URN, \"http://www.someurl.com/\")\n\n # Register another URL for the same URN\n c.add_url(new_urn.URN, \"http://www.someotherurl.com/\")\n\n # Set one of the registered URLs to be the default URL\n c.set_default_url(new_urn.URN, \"http://www.someurl.com/\")\n\n ####################################################\n # ALTERNATIVE: Using create_urn:\n # new_urn = c.create_urn('urn:series:code', 'http://www.someurl.com/')\n # c.add_url(new_urn.URN, 'http://www.someotherurl.com/')\n ####################################################\n\n # Retrieve the URN you just created and have a look\n print c.find_urn(new_urn.URN)\n\n # Retrieve all URNs containing some URL and have a look\n print c.find_urns_for_url(\"http://www.someurl.org\")\n\n # Logout when you're done\n c.logout()\n\nDependencies\n------------\n\n- `suds 0.4 `__\n- `PyYAML `__", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/runelk/NB_URN_Client_Python", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "NbUrnClient", "package_url": "https://pypi.org/project/NbUrnClient/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/NbUrnClient/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/runelk/NB_URN_Client_Python" }, "release_url": "https://pypi.org/project/NbUrnClient/0.8.0/", "requires_dist": null, "requires_python": null, "summary": "Python Client for the URN PID service at the National Library of Norway", "version": "0.8.0" }, "last_serial": 1138320, "releases": { "0.8.0": [ { "comment_text": "", "digests": { "md5": "96f784bd6f1e4359b18477921f4cf79d", "sha256": "5cd2bcd8311f0bdf30f5f56b4894559ae12abb2f6aa93993c4d3f1b0c4199c4c" }, "downloads": -1, "filename": "NbUrnClient-0.8.0.tar.gz", "has_sig": false, "md5_digest": "96f784bd6f1e4359b18477921f4cf79d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5545, "upload_time": "2014-06-26T12:51:18", "url": "https://files.pythonhosted.org/packages/78/be/429216a35d7e6f4d4208c1435aecf71de797c8d227b2095c6c55ddef22fa/NbUrnClient-0.8.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "96f784bd6f1e4359b18477921f4cf79d", "sha256": "5cd2bcd8311f0bdf30f5f56b4894559ae12abb2f6aa93993c4d3f1b0c4199c4c" }, "downloads": -1, "filename": "NbUrnClient-0.8.0.tar.gz", "has_sig": false, "md5_digest": "96f784bd6f1e4359b18477921f4cf79d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5545, "upload_time": "2014-06-26T12:51:18", "url": "https://files.pythonhosted.org/packages/78/be/429216a35d7e6f4d4208c1435aecf71de797c8d227b2095c6c55ddef22fa/NbUrnClient-0.8.0.tar.gz" } ] }