{ "info": { "author": "StackHut", "author_email": "client@stackhut.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Software Development" ], "description": "=======================\nStackHut Client Library\n=======================\n\n.. image:: https://img.shields.io/travis/stackhut/client-python.svg\n :target: https://travis-ci.org/stackhut/client-python\n\n.. image:: https://img.shields.io/pypi/v/stackhut-client.svg\n :target: https://pypi.python.org/pypi/stackhut-client\n\nStackHut client library to call dev, local, and hosted StackHut services dynamically and asynchronously from your Python code as if it were a local function.\n\n* Homepage: https://www.stackhut.com\n* Free software: Apache license\n* Documentation: https://stackhut.readthedocs.org.\n\n\nDescription\n-----------\n\nThere are 3 main objects in the library,\n\nSHService\n^^^^^^^^^\n\nThis is the main library you create per service to communicate with it. It takes several parameters on construction, where those in square brackets are optional,\n\n.. code:: python\n\n import stackhut_client as client\n client.SHService(author, service_name, [service_version], [auth], [host])\n\n* author - The author of the service\n* service_name - The service name\n* version - The specific verion of the service (is `latest` if left blank)\n* auth - An `SHAuth` object used to authenticate requests for private services\n* host - URL for the StackHut API server, can be set to point to local servers during development, is `https://api.stackhut.com` if left blank\n\nTo make a remote call, just call the interface and method name on the service object, e.g.,\n\n.. code:: python\n\n result = service.Interface.method(params, ...)\n\n\nSHAuth\n^^^^^^\n\nAn optional object used to authenticate requests to a service,\n\n.. code:: python\n\n client.SHAuth(user, [hash], [token])\n\n* user - Username of a registered StackHut user\n* hash - Hash of the user's password (you can find this in ~/.stackhut.cfg). Be careful not to use in public-facing code.\n* token - A valid API token created for the user\n\nOne of `hash` or `token` must be present in the `auth` object to authorise a request by the given user.\n\nSHError\n^^^^^^^\n\nReturned in the event of a remote service error in the catch block of a rejected promise.\n\nThe object has 3 parameters,\n\n* code - The RPC error code\n* message - A string describing the error\n* data - An optional object that may contain additional structured data for handling the error\n\nExample\n-------\n\nUsing the existing service called `demo-nodejs` by user `stackhut`, we create the main service object,\n\n.. code:: python\n\n import stackhut_client as client\n service = client.SHService('stackhut', 'web-tools')\n\nFrom here we can call any functions on any interfaces exposed by the hosted `stackhut/demo-nodejs` service, as follows,\n\n.. code:: python\n\n result = service.Default.renderWebpage(\"http://www.stackhut.com\", 1024, 768)\n print(\"Page render at {}\".format(result))\n\n\nNotes\n^^^^^\n\n* Python 3+ only currently (built on 3.4), looking into python-future for 2.x compatibility.\n* Calls are currently synchronous but we will switch to an async-based solution following the release of Python 3.5.\n\n\n\n\n=======\nCredits\n=======\n\nDevelopment Leads\n-----------------\n\n* Mandeep Gill \n* Leo Anthias \n\n.. Contributors\n.. ------------\n..\n.. None yet. Why not be the first?\n..", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/stackhut/client-python", "keywords": "stackhut", "license": "Apache", "maintainer": null, "maintainer_email": null, "name": "stackhut-client", "package_url": "https://pypi.org/project/stackhut-client/", "platform": "POSIX", "project_url": "https://pypi.org/project/stackhut-client/", "project_urls": { "Homepage": "https://github.com/stackhut/client-python" }, "release_url": "https://pypi.org/project/stackhut-client/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "StackHut client-side Python library", "version": "0.1.1" }, "last_serial": 1698351, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "4945411ce3c2bd3ee47aeaaacced0280", "sha256": "a65cd18133b0b4b4128dc53e23b9230a04a7d22094f425d19eb891b68a3d50dc" }, "downloads": -1, "filename": "stackhut_client-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "4945411ce3c2bd3ee47aeaaacced0280", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7853, "upload_time": "2015-08-28T14:52:15", "url": "https://files.pythonhosted.org/packages/86/a0/17bbc4bfa004b132ac9f706ad6f0aba168ac668e15ac961f2344577b5a5d/stackhut_client-0.1.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4945411ce3c2bd3ee47aeaaacced0280", "sha256": "a65cd18133b0b4b4128dc53e23b9230a04a7d22094f425d19eb891b68a3d50dc" }, "downloads": -1, "filename": "stackhut_client-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "4945411ce3c2bd3ee47aeaaacced0280", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7853, "upload_time": "2015-08-28T14:52:15", "url": "https://files.pythonhosted.org/packages/86/a0/17bbc4bfa004b132ac9f706ad6f0aba168ac668e15ac961f2344577b5a5d/stackhut_client-0.1.1-py3-none-any.whl" } ] }