{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6" ], "description": "Aliyun FunctionCompute Python SDK\n=================================\n\n.. image:: https://badge.fury.io/py/aliyun-fc.svg\n :target: https://badge.fury.io/py/aliyun-fc\n.. image:: https://travis-ci.org/aliyun/fc-python-sdk.svg?branch=master\n :target: https://travis-ci.org/aliyun/fc-python-sdk\n.. image:: https://coveralls.io/repos/github/aliyun/fc-python-sdk/badge.svg?branch=master\n :target: https://coveralls.io/github/aliyun/fc-python-sdk?branch=master\n\nOverview\n--------\n\nThe SDK of this version is dependent on the third-party HTTP library `requests `_.\n\n\nRunning environment\n-------------------\n\nPython 2.7, Python 3.6\n\n\nInstallation\n----------\n\nInstall the official release version through PIP (taking Linux as an example):\n\n.. code-block:: bash\n\n $ pip install aliyun-fc\n\nYou can also install the unzipped installer package directly:\n\n.. code-block:: bash\n\n $ sudo python setup.py install\n\n\nGetting started\n---------------\n\n.. code-block:: python\n\n # -*- coding: utf-8 -*-\n\n import fc\n\n # To know the endpoint and access key id/secret info, please refer to:\n # https://help.aliyun.com/document_detail/52984.html\n client = fc.Client(\n endpoint='',\n accessKeyID='',\n accessKeySecret='')\n\n # Create service.\n client.create_service('service_name')\n\n # Create function.\n # the current directory has a main.zip file (main.py which has a function of myhandler)\n client.create_function('service_name', 'function_name', 'main.my_handler', codeZipFile = 'main.zip')\n\n # Invoke function synchronously.\n client.invoke_function('service_name', 'function_name')\n\n # Invoke a function with a input parameter.\n client.invoke_function('service_name', 'function_name', payload=bytes('hello_world'))\n\n # Read a image and invoke a function with the file data as input parameter.\n src = open('src_image_file_path', 'rb') # Note: please open it as binary.\n r = client.invoke_function('service_name', 'function_name', payload=src)\n # save the result as the output image.\n dst = open('dst_image_file_path', 'wb')\n dst.write(r)\n src.close()\n dst.close()\n\n # Invoke function asynchronously.\n client.async_invoke_function('service_name', 'function_name')\n\n # List services.\n client.list_services()\n\n # List functions with prefix and limit.\n client.list_functions('service_name', prefix='the_prefix', limit=10)\n\n # Delete service.\n client.delete_service('service_name')\n\n # Delete function.\n client.delete_function('service_name', 'function_name')\n\n\nTesting\n-------\n\nTo run the tests, please set the access key id/secret, endpoint as environment variables.\nTake the Linux system for example:\n\n.. code-block:: bash\n\n $ export ENDPOINT=\n $ export ACCESS_KEY_ID=\n $ export ACCESS_KEY_SECRET=\n $ export STS_TOKEN=\n\nRun the test in the following method:\n\n.. code-block:: bash\n\n $ nosetests # First install nose\n\nMore resources\n--------------\n- `Aliyun FunctionCompute docs `_\n\nContacting us\n-------------\n- `Links `_\n\nLicense\n-------\n- `MIT `_\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.aliyun.com/product/fc", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "aliyun-fc", "package_url": "https://pypi.org/project/aliyun-fc/", "platform": "", "project_url": "https://pypi.org/project/aliyun-fc/", "project_urls": { "Homepage": "https://www.aliyun.com/product/fc" }, "release_url": "https://pypi.org/project/aliyun-fc/0.6/", "requires_dist": null, "requires_python": "", "summary": "Aliyun FunctionCompute SDK", "version": "0.6" }, "last_serial": 3330908, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "1171fa17922bf86cb33121c562fe89ca", "sha256": "c074dd6b09b4f58142de348adca3745c6368dde4f0d0d3d704ebc33e4ce52674" }, "downloads": -1, "filename": "aliyun_fc-0.1-py2.7.egg", "has_sig": false, "md5_digest": "1171fa17922bf86cb33121c562fe89ca", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 10903, "upload_time": "2017-08-01T15:47:29", "url": "https://files.pythonhosted.org/packages/4b/f4/e54c2b4c5e3d9f57504d25045a18c4a27a3ad9d02a76d42652619b127953/aliyun_fc-0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "9fc40f0761119c0013da877eb9a68af5", "sha256": "b21804bf1a0c28f6336a815c0c70d5609a8c738a5f3268abf492e420840cfde8" }, "downloads": -1, "filename": "aliyun-fc-0.1.tar.gz", "has_sig": false, "md5_digest": "9fc40f0761119c0013da877eb9a68af5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8539, "upload_time": "2017-08-01T15:47:28", "url": "https://files.pythonhosted.org/packages/36/3e/da1137e229b10764fafe6c7068528a2f6fd70e38618377afe0a2e0d80cc3/aliyun-fc-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "60f5a994ad115902afa79149b533321f", "sha256": "7d481d360b88805ec04c788d8f5ed9ecc90a625cf9a9bb46bd86536a3360ef51" }, "downloads": -1, "filename": "aliyun-fc-0.2.tar.gz", "has_sig": false, "md5_digest": "60f5a994ad115902afa79149b533321f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8521, "upload_time": "2017-08-03T23:52:24", "url": "https://files.pythonhosted.org/packages/17/1f/972e4a15929c4ce40d56eda88d602801970cdb008254bcc2b409f876e70f/aliyun-fc-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "14c6decba0e780521eafcf454fc42b3d", "sha256": "5c49c1136c99d2c76b26f29493786802a85786390025fae80672312f1c8b1ffb" }, "downloads": -1, "filename": "aliyun-fc-0.3.tar.gz", "has_sig": false, "md5_digest": "14c6decba0e780521eafcf454fc42b3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8770, "upload_time": "2017-08-04T03:11:44", "url": "https://files.pythonhosted.org/packages/f7/09/51c6cc06984ef8569361be179c55f50d291914078d8c07c64fe680abca0a/aliyun-fc-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "ba26b051700d01804c43072adead5bcf", "sha256": "53f92bd05626a504ec4e113bc978cc59ffea7390656fb95c95b4a00268e2e834" }, "downloads": -1, "filename": "aliyun_fc-0.4-py2.7.egg", "has_sig": false, "md5_digest": "ba26b051700d01804c43072adead5bcf", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 18349, "upload_time": "2017-10-11T14:52:43", "url": "https://files.pythonhosted.org/packages/d1/34/582201f47ada741f03eb6c5e2818c5b336f1c7b8ca8d8e23d114d17fb12f/aliyun_fc-0.4-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "7650e5d01cd1c81bee9aae40d898b1cc", "sha256": "e7a206f231da72abf80fc468676e53c768226a971454fc8fd6bbf3d5decdd569" }, "downloads": -1, "filename": "aliyun-fc-0.4.tar.gz", "has_sig": false, "md5_digest": "7650e5d01cd1c81bee9aae40d898b1cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9177, "upload_time": "2017-10-11T14:52:39", "url": "https://files.pythonhosted.org/packages/a8/5c/78f5b453ea1140a873d28248a2edb4ae7d4fbef1b2b25bc63e253e587fa4/aliyun-fc-0.4.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "74fd92cd51ef226795e9c161e74f87a3", "sha256": "85fd17a4bdc1aa7687a33274444ac5768f804797e521c732975bd4aceafff6b5" }, "downloads": -1, "filename": "aliyun-fc-0.6.tar.gz", "has_sig": false, "md5_digest": "74fd92cd51ef226795e9c161e74f87a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9238, "upload_time": "2017-11-14T08:42:04", "url": "https://files.pythonhosted.org/packages/f9/fc/7522ef331eb1cb0fb4160d63990f0e9b0d97c1833a205b542617c1ad8453/aliyun-fc-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "74fd92cd51ef226795e9c161e74f87a3", "sha256": "85fd17a4bdc1aa7687a33274444ac5768f804797e521c732975bd4aceafff6b5" }, "downloads": -1, "filename": "aliyun-fc-0.6.tar.gz", "has_sig": false, "md5_digest": "74fd92cd51ef226795e9c161e74f87a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9238, "upload_time": "2017-11-14T08:42:04", "url": "https://files.pythonhosted.org/packages/f9/fc/7522ef331eb1cb0fb4160d63990f0e9b0d97c1833a205b542617c1ad8453/aliyun-fc-0.6.tar.gz" } ] }