{ "info": { "author": "source{d}", "author_email": "applications@sourced.tech", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries" ], "description": "\n# lookout-sdk [![GitHub version](https://badge.fury.io/gh/src-d%2Flookout-sdk.svg)](https://github.com/src-d/lookout-sdk/releases) [![PyPI version](https://badge.fury.io/py/lookout-sdk.svg)](https://pypi.org/project/lookout-sdk/) [![Build Status](https://travis-ci.com/src-d/lookout-sdk.svg?branch=master)](https://travis-ci.com/src-d/lookout-sdk) [![GoDoc](https://godoc.org/gopkg.in/src-d/lookout-sdk.v0?status.svg)](https://godoc.org/gopkg.in/src-d/lookout-sdk.v0/pb)\n\nToolkit for writing new analyzers for **[source{d} Lookout](https://github.com/src-d/lookout)**.\n\n\n# What Does the SDK Provide?\n\n_For the complete documentation of **source{d} Lookout**, please take a look at [https://docs.sourced.tech/lookout](https://docs.sourced.tech/lookout)._\n\n_For detailed information about the different parts of Lookout, and how they interact you can go to the [Lookout architecture guide](https://docs.sourced.tech/lookout/architecture)._\n\n**lookout-sdk** provides:\n\n- **proto [definitions](./proto)**.\n- pre-generated libraries for [Golang](./pb) and [Python](./python), offering:\n - an easy **access to the DataService API though a gRPC service**. Lookout will take care of dealing with Git repositories, UAST extraction, programming language detection, etc.\n - low-level **helpers to work around some protobuf/gRPC caveats**.\n- quickstart [examples](./examples) of an Analyzer that detects language and number of functions (written in Go and in Python).\n\n\n# Caveats\n\nFor the gRPC client and server please follow these requirements:\n- set a common maximum gRPC message size in gRPC servers and clients. This is required to avoid hitting different gRPC limits when handling UASTs, that can be huge —see [grpc/grpc#7927](https://github.com/grpc/grpc/issues/7927)—. To do so use the included helpers in lookout-sdk:\n - go: using `pb.NewServer` and `pb.DialContext`.\n - python: using `lookout.sdk.grpc.create_server` and `lookout.sdk.grpc.create_channel`.\n- support [RFC 3986 URI scheme](https://github.com/grpc/grpc-go/issues/1911); lookout-sdk includes helpers for this:\n - go: using `pb.ToGoGrpcAddress` and `pb.Listen`.\n - python: using `lookout.sdk.grpc.to_grpc_address`.\n- use insecure connection:\n - currently lookout expects to use insecure gRPC connections, as provided by `pb.DialContext`\n - python: run server using `server.add_insecure_port(address)` ([example](https://github.com/src-d/lookout-sdk/blob/master/examples/language-analyzer.py#L63)).\n\n## DataService\n\nWhen DataService is being dialed, you should:\n\n- turn on [gRPC Wait for Ready](https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md) mode if your analyzer creates a connection to DataServer before it was actually started. This way the RPCs are queued until the chanel is ready:\n - go: using [`grpc.WaitForReady(true)`](https://godoc.org/google.golang.org/grpc#WaitForReady).\n - python: using the [`wait_for_ready`](https://grpc.io/grpc/python/grpc.html) flag.\n- golang: reset connection backoff to DataServer on event:\n if you keep the connection to DataServer open you need to reset the backoff when your analyzer receives a new event. Use the [`conn.ResetConnectBackoff`](https://godoc.org/google.golang.org/grpc#ClientConn.ResetConnectBackoff) method in your event handlers. It's needed to avoid broken connections after a `lookoutd` redeployment. In case of a long restart of `lookoutd` gRPC server, the backoff timeout may increase so much that the analyzer will not be able to reconnect before it makes the new request to DataServer.\n\n\n# Contributing\n\nContributions are **welcome and very much appreciated** \ud83d\ude4c\n\nPlease refer [to our Contribution Guide](docs/CONTRIBUTING.md) for more details.\n\n\n## Community\n\nsource{d} has an amazing community of developers and contributors who are interested in Code As Data and/or Machine Learning on Code. Please join us! \ud83d\udc4b\n\n- [Slack](http://bit.ly/src-d-community)\n- [Twitter](https://twitter.com/sourcedtech)\n- [Email](mailto:hello@sourced.tech)\n\n\n# Code of Conduct\n\nAll activities under source{d} projects are governed by the [source{d} code of conduct](.github/CODE_OF_CONDUCT.md).\n\n\n# License\n\nApache License Version 2.0, see [LICENSE](LICENSE.md)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/src-d/lookout-sdk", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/src-d/lookout-sdk", "keywords": "analyzer,code-reivew", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "lookout-sdk", "package_url": "https://pypi.org/project/lookout-sdk/", "platform": "", "project_url": "https://pypi.org/project/lookout-sdk/", "project_urls": { "Download": "https://github.com/src-d/lookout-sdk", "Homepage": "https://github.com/src-d/lookout-sdk" }, "release_url": "https://pypi.org/project/lookout-sdk/0.6.3/", "requires_dist": [ "grpcio (<2.0,>=1.13.0)", "protobuf (<4.0,>=3.5.0)", "bblfsh (<3.0,>=2.12.7)" ], "requires_python": "", "summary": "SDK for writing lookout analyzers", "version": "0.6.3" }, "last_serial": 5090631, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "c1d39049b43147ccd0c1b4ab09ff96fd", "sha256": "cd921d15989bc4d91c450348ee0529a81f9856ea8508a63e2730a08361ec41a3" }, "downloads": -1, "filename": "lookout_sdk-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c1d39049b43147ccd0c1b4ab09ff96fd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2353, "upload_time": "2018-09-03T13:30:03", "url": "https://files.pythonhosted.org/packages/fc/ab/75609d61880042f949c512344d5dc93b21642f53d7b3d713fc65c76dc450/lookout_sdk-0.0.1-py3-none-any.whl" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "1d226d38757b7b82c0027f51ab2e424a", "sha256": "5f64d972284213bdf15a495e1726b035ed208ec66a6179f98c8e4f94e60eb0cf" }, "downloads": -1, "filename": "lookout_sdk-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "1d226d38757b7b82c0027f51ab2e424a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15782, "upload_time": "2018-09-04T06:10:45", "url": "https://files.pythonhosted.org/packages/aa/8c/9f43680056750bf8fe0c2a7d7a9151ac320c0cf331f1898b6388b64c24fb/lookout_sdk-0.0.3-py3-none-any.whl" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "1bc4d53af49de8af09ed813bb79c992b", "sha256": "bc47f0ac7b1d04d9c0f2696d11f7d02faaec28d8fe8db7a959dc54d2c112bacf" }, "downloads": -1, "filename": "lookout_sdk-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1bc4d53af49de8af09ed813bb79c992b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16165, "upload_time": "2018-09-06T14:36:30", "url": "https://files.pythonhosted.org/packages/a8/84/76878488be506962d579c6b5e84f71dc15238574ad99d2a1f1b5de4d777e/lookout_sdk-0.0.4-py3-none-any.whl" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "01ebc2884ecb55fae476f6b626c2cbb2", "sha256": "fd2b0936afa9a01192f5825d7fc0fa8e2692e887d7396b10601eb3667956e7c0" }, "downloads": -1, "filename": "lookout_sdk-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "01ebc2884ecb55fae476f6b626c2cbb2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16127, "upload_time": "2018-09-26T09:54:12", "url": "https://files.pythonhosted.org/packages/3f/6d/7fbc34c795f2e8cef05aacf7e5d17ad19e3d67286925f8ed3e5392fdef77/lookout_sdk-0.1.0-py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "547f4600f87fe5ca035a95b993f363e0", "sha256": "bbdc9fd99d6348c891e5680d5af71abc8cca4d0b6a79b89e3c3e3aff7b4754e1" }, "downloads": -1, "filename": "lookout_sdk-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "547f4600f87fe5ca035a95b993f363e0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16289, "upload_time": "2018-11-13T12:22:50", "url": "https://files.pythonhosted.org/packages/6b/13/029284a217dddcb60e31141fcc50dd4766dc72e0b9200058b02d4923f7f7/lookout_sdk-0.1.1-py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a101a017a3e36f238991cc6e30b06cf8", "sha256": "e0d63cbeb493d116e35e8969cde93699bdc2c5f4323174838ffa4b24a85c4cd8" }, "downloads": -1, "filename": "lookout_sdk-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a101a017a3e36f238991cc6e30b06cf8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16291, "upload_time": "2018-11-14T11:50:00", "url": "https://files.pythonhosted.org/packages/d8/88/7c24d33a1c11801e762845689d5cb58f3061d284b68594b7e9c1bf479302/lookout_sdk-0.1.2-py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "c2ab0d726841de13e815aa1475a21cc6", "sha256": "d09b860757100831a27558aa513bf675a82085e71bc7ab0fe4677c1f6a09f77b" }, "downloads": -1, "filename": "lookout_sdk-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c2ab0d726841de13e815aa1475a21cc6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13875, "upload_time": "2018-11-28T12:42:04", "url": "https://files.pythonhosted.org/packages/4b/9b/82ac281538abc1929611db540c6bbfbd8952901508625d1a20a9fc120109/lookout_sdk-0.2.0-py3-none-any.whl" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "bae324ec1ed8f89c740f82023620f631", "sha256": "2953fdad14bb1760a3fe37d3087c02def29c2e1efd17c612fa45baa9467c3ddf" }, "downloads": -1, "filename": "lookout_sdk-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "bae324ec1ed8f89c740f82023620f631", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13678, "upload_time": "2018-12-27T11:05:08", "url": "https://files.pythonhosted.org/packages/ff/e4/612db5cd557d2c11aaadbf9ebc182dfc1657a0e5e5e5ffa80711269d63c3/lookout_sdk-0.3.0-py3-none-any.whl" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "7e5c8d7ccb42eb52e2f2edb9996d5af0", "sha256": "bbd3f66ce1630a1402b2084ab4d108d82f0ea4c5349e85678c9bbf99057d740e" }, "downloads": -1, "filename": "lookout_sdk-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7e5c8d7ccb42eb52e2f2edb9996d5af0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13752, "upload_time": "2019-01-09T17:38:49", "url": "https://files.pythonhosted.org/packages/94/b7/458612ec2e8e97b6945e989d7acfb56c917477ad9aa1f88a98adcd0d6043/lookout_sdk-0.3.1-py3-none-any.whl" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "cc20b5f3928118f617e89caeefa5dc70", "sha256": "d9b4b5705445b287749dec8a134c4c5deb6ad967d0432fb90aada803516bb6dc" }, "downloads": -1, "filename": "lookout_sdk-0.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cc20b5f3928118f617e89caeefa5dc70", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13990, "upload_time": "2019-01-18T17:32:04", "url": "https://files.pythonhosted.org/packages/2f/4c/018f9ffa3618b1ec37279fe6b8defa8deff025a740ae095a869ec64b223f/lookout_sdk-0.4.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7633e45fda351582f0868191280c0df1", "sha256": "c11f5c3437b75b4dccf7c6d50f9f7a636f0d48cce4fdcf495441c8c7a53b00ee" }, "downloads": -1, "filename": "lookout-sdk-0.4.1.tar.gz", "has_sig": false, "md5_digest": "7633e45fda351582f0868191280c0df1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11707, "upload_time": "2019-01-18T17:32:05", "url": "https://files.pythonhosted.org/packages/b1/91/97a23cbe226c9ed59619f82297be0ded2d975766bf96a87637132b15f9ad/lookout-sdk-0.4.1.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "bceb976b45291d2ab469e389f8d25b79", "sha256": "d5ef2c45463e4b2251b9f1a480f2c6823a2fd208d7230d10b04899a96adf39f7" }, "downloads": -1, "filename": "lookout_sdk-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "bceb976b45291d2ab469e389f8d25b79", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13921, "upload_time": "2019-02-21T09:58:00", "url": "https://files.pythonhosted.org/packages/4f/c3/6524ee93e4ce6827114da82ffcf57d124cf8e26ef6bf62d46fff20ce6dd7/lookout_sdk-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9516d8b91b28364e5735f30dc3a1e953", "sha256": "77332ecdbb81b72aab186b5d16f77d8e96120f101171be4983b470825917c0d4" }, "downloads": -1, "filename": "lookout-sdk-0.5.0.tar.gz", "has_sig": false, "md5_digest": "9516d8b91b28364e5735f30dc3a1e953", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11609, "upload_time": "2019-02-21T09:58:01", "url": "https://files.pythonhosted.org/packages/df/d9/a2a949c22e9df5368a0bb645854d68917f180c7903b7a1096d9b2ca5bc86/lookout-sdk-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "0bf2fa51a9d148e8c75e818e05196bad", "sha256": "4b782dca9a3fb8f596c1786cc426ab512c171c3bb75934acae322ab41c0f6b12" }, "downloads": -1, "filename": "lookout_sdk-0.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0bf2fa51a9d148e8c75e818e05196bad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25147, "upload_time": "2019-03-19T17:42:59", "url": "https://files.pythonhosted.org/packages/09/5e/30b809732cc69aa3497c22783b747d126fc3a131eaca555ab2ff3f10a191/lookout_sdk-0.6.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "184c43ad98203cfcc44e229c51bcc510", "sha256": "273e4fb9c3676ffb9236338a7159e4866c2a056520ed4e96952dbded96f7a181" }, "downloads": -1, "filename": "lookout-sdk-0.6.0.tar.gz", "has_sig": false, "md5_digest": "184c43ad98203cfcc44e229c51bcc510", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20350, "upload_time": "2019-03-19T17:43:00", "url": "https://files.pythonhosted.org/packages/e5/bf/c6e90b87e4baaf05e12be128de23756f6d3dc6cc1e153289a4c6a6b8ef25/lookout-sdk-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "c34a3de43f549dc557f975219bd1d56b", "sha256": "c4f6920cc73c772e00d9d1d67153009c6c806f93e44ed757fcf8b0bd9cecf622" }, "downloads": -1, "filename": "lookout_sdk-0.6.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c34a3de43f549dc557f975219bd1d56b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 26207, "upload_time": "2019-03-20T15:48:59", "url": "https://files.pythonhosted.org/packages/67/fe/b5703da4dd6fac50c9e3669f553c75c3919484ee6085dae0498a1499fa2a/lookout_sdk-0.6.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ffcba664617329a48dc5af6d920075c", "sha256": "bedb5cdadf30ea79a0ce029ae55207cc378725a495e8cdac54e1ff918ec25d3f" }, "downloads": -1, "filename": "lookout-sdk-0.6.1.tar.gz", "has_sig": false, "md5_digest": "9ffcba664617329a48dc5af6d920075c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20599, "upload_time": "2019-03-20T15:49:00", "url": "https://files.pythonhosted.org/packages/76/fd/eecc3d0f9ca2999da36d72886ddd4722c7c543204dbf5dbe123e19313781/lookout-sdk-0.6.1.tar.gz" } ], "0.6.3": [ { "comment_text": "", "digests": { "md5": "2a4c307ebf2150b2213b7ee7f54a9f4b", "sha256": "3e775ff0c4142fefe14658c32244bb54b020000cee6a18e343b621e23093068a" }, "downloads": -1, "filename": "lookout_sdk-0.6.3-py3-none-any.whl", "has_sig": false, "md5_digest": "2a4c307ebf2150b2213b7ee7f54a9f4b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 26205, "upload_time": "2019-04-03T12:43:43", "url": "https://files.pythonhosted.org/packages/8d/ac/bb5477474a8374ec10c7d1326610df10d422add2cfaa26def9479098d397/lookout_sdk-0.6.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f7e0fe849df81ff68adde507ba438486", "sha256": "175304719f5e37666073ec0989700a73ad7d2d65cdd91962d474468ac222e252" }, "downloads": -1, "filename": "lookout-sdk-0.6.3.tar.gz", "has_sig": false, "md5_digest": "f7e0fe849df81ff68adde507ba438486", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20605, "upload_time": "2019-04-03T12:43:44", "url": "https://files.pythonhosted.org/packages/a5/91/1f279f7ee50941458d006094446414e63076b0e5b637b74b9c9f5e909580/lookout-sdk-0.6.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2a4c307ebf2150b2213b7ee7f54a9f4b", "sha256": "3e775ff0c4142fefe14658c32244bb54b020000cee6a18e343b621e23093068a" }, "downloads": -1, "filename": "lookout_sdk-0.6.3-py3-none-any.whl", "has_sig": false, "md5_digest": "2a4c307ebf2150b2213b7ee7f54a9f4b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 26205, "upload_time": "2019-04-03T12:43:43", "url": "https://files.pythonhosted.org/packages/8d/ac/bb5477474a8374ec10c7d1326610df10d422add2cfaa26def9479098d397/lookout_sdk-0.6.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f7e0fe849df81ff68adde507ba438486", "sha256": "175304719f5e37666073ec0989700a73ad7d2d65cdd91962d474468ac222e252" }, "downloads": -1, "filename": "lookout-sdk-0.6.3.tar.gz", "has_sig": false, "md5_digest": "f7e0fe849df81ff68adde507ba438486", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20605, "upload_time": "2019-04-03T12:43:44", "url": "https://files.pythonhosted.org/packages/a5/91/1f279f7ee50941458d006094446414e63076b0e5b637b74b9c9f5e909580/lookout-sdk-0.6.3.tar.gz" } ] }