{"__v":5,"_id":"55a9390b4c661b3700cf4e21","category":{"__v":6,"_id":"55a936b1cf45e1390093f362","pages":["55a936e3c8bd450d000dd1de","55a9390b4c661b3700cf4e21","55a93bd35d3abb0d0012f194","55a93cb702becf2d007aac47","55a93efb02becf2d007aac55","55a940d902becf2d007aac67"],"project":"55a7aee84a33f92b00b7a150","version":"55a7aee84a33f92b00b7a153","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-17T17:09:05.944Z","from_sync":false,"order":1,"slug":"sdks","title":"SDKs"},"parentDoc":null,"project":"55a7aee84a33f92b00b7a150","user":"55a7ae50bf1be93100d89df1","version":{"__v":6,"_id":"55a7aee84a33f92b00b7a153","project":"55a7aee84a33f92b00b7a150","createdAt":"2015-07-16T13:17:28.411Z","releaseDate":"2015-07-16T13:17:28.411Z","categories":["55a7aee94a33f92b00b7a154","55a7fefa3efe0c2f0074cbdf","55a8fb10c8bd450d000dd130","55a936b1cf45e1390093f362","55abddeaa36ccd0d00fdebe1","5624db675a86b423009462e1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-17T17:19:07.027Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"Clone the [Python SDK](https://github.com/AYLIEN/aylien_textapi_python) from our GitHub or use `pip` to download and install the SDK:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"pip install --upgrade aylien-apiclient\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nYou can then import and initiate the SDK easily:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"from aylienapiclient import textapi\\n\\nclient = textapi.Client(\\\"[[app:id]]\\\", \\\"[[app:key]]\\\")\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\nThe `client` object is now instantiated and contains various methods for calling different API endpoints. For instance to use Sentiment Analysis you can write the following code:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sentiment = client.Sentiment({'text': 'John is a very good football player!'})\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\nYou can find examples for utilizing other endpoints in **Python** in the Endpoints section of this documentation.","excerpt":"Easiest way to get up & running with Text Analysis API in Python","slug":"python-sdk","type":"basic","title":"Python SDK"}

Python SDK

Easiest way to get up & running with Text Analysis API in Python

Clone the [Python SDK](https://github.com/AYLIEN/aylien_textapi_python) from our GitHub or use `pip` to download and install the SDK: [block:code] { "codes": [ { "code": "pip install --upgrade aylien-apiclient", "language": "shell" } ] } [/block] You can then import and initiate the SDK easily: [block:code] { "codes": [ { "code": "from aylienapiclient import textapi\n\nclient = textapi.Client(\"[[app:id]]\", \"[[app:key]]\")", "language": "python" } ] } [/block] The `client` object is now instantiated and contains various methods for calling different API endpoints. For instance to use Sentiment Analysis you can write the following code: [block:code] { "codes": [ { "code": "sentiment = client.Sentiment({'text': 'John is a very good football player!'})", "language": "python" } ] } [/block] You can find examples for utilizing other endpoints in **Python** in the Endpoints section of this documentation.