{ "info": { "author": "Arnaud Grausem", "author_email": "arnaud.grausem@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "=============\nbritney-utils\n=============\n\nBritney-utils comes with some utilities to create and manage clients build by Britney.\n\n.. image:: https://secure.travis-ci.org/unistra/britney-utils.png?branch=master\n :target: https://travis-ci.org/unistra/britney-utils\n\n \n.. image:: https://coveralls.io/repos/unistra/britney-utils/badge.png\n :target: https://coveralls.io/r/unistra/britney-utils\n\nInstall\n=======\n\nbritney-utils is working on Python 2.7 and Python >= 3.2. To install the module, use pip ::\n\n $> pip install britney-utils\n\n\nUse it...\n=========\n\n\n... to create a basic client\n----------------------------\n\nYou can easily create a client with the **get_client** function. It will create and save the client to retrieve it later with his name, acting as a cache ::\n\n import britney_utils\n\n client = britney_utils.get_client('my_client',\n '/path/to/spore/description.json',\n base_url='http://my-rest-api.org/v1/')\n\n\n... to reset an instance\n------------------------\n\nIf an instance is already created with a name you gave in first place, you can easily reset and rebuild it. In this example, we except that the **my_client** SPORE client already exist ::\n\n client = britney_utils.get_client('my_client',\n '/path/to/spore/description.json',\n reset=True)\n\n\nA new instance is created with the **my_client** name and saved\n\n\n... to create a pre-build instance with middlewares\n---------------------------------------------------\n\nCreating a rich client with all middlewares needed activated is useful. You can do this like this ::\n\n from britney.middleware import auth, format\n import britney_utils\n\n middlewares = (\n (format.Json, {'predicate': lambda env: env['format'] == 'json'}),\n (auth.Basic, {'username': 'toto', 'password': 'xxxxxx'}\n )\n\n client = britney_utils.get_client('my_client',\n '/path/to/spore/description.json',\n middlewares=middlewares)", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/pypi/britney-utils", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/unistra/britney-utils", "keywords": "SPORE,REST Api,client,britney", "license": "PSF", "maintainer": null, "maintainer_email": null, "name": "britney-utils", "package_url": "https://pypi.org/project/britney-utils/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/britney-utils/", "project_urls": { "Download": "http://pypi.python.org/pypi/britney-utils", "Homepage": "https://github.com/unistra/britney-utils" }, "release_url": "https://pypi.org/project/britney-utils/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Utilities for the Python SPORE client called Britney", "version": "0.1.2" }, "last_serial": 937486, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "8345b9f68bac51eac991b0d59667ac5f", "sha256": "41d36177389465f7c671f208dc29bb990d7419a1ce954d11de5d106193f4a3e9" }, "downloads": -1, "filename": "britney-utils-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8345b9f68bac51eac991b0d59667ac5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2853, "upload_time": "2013-12-06T09:55:21", "url": "https://files.pythonhosted.org/packages/88/14/7fe7b33d29da82882891a8a764b40ece20802eeb3ee5426ebb1a31f958a9/britney-utils-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8345b9f68bac51eac991b0d59667ac5f", "sha256": "41d36177389465f7c671f208dc29bb990d7419a1ce954d11de5d106193f4a3e9" }, "downloads": -1, "filename": "britney-utils-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8345b9f68bac51eac991b0d59667ac5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2853, "upload_time": "2013-12-06T09:55:21", "url": "https://files.pythonhosted.org/packages/88/14/7fe7b33d29da82882891a8a764b40ece20802eeb3ee5426ebb1a31f958a9/britney-utils-0.1.2.tar.gz" } ] }