{"action":"created","issue":{"url":"https://api.github.com/repos/dronekit/dronekit-python/issues/437","labels_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/437/labels{/name}","comments_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/437/comments","events_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/437/events","html_url":"https://github.com/dronekit/dronekit-python/pull/437","id":115970635,"number":437,"title":"Updates Create Attribute example.","user":{"login":"tcr3dr","id":12703357,"avatar_url":"https://avatars.githubusercontent.com/u/12703357?v=3","gravatar_id":"","url":"https://api.github.com/users/tcr3dr","html_url":"https://github.com/tcr3dr","followers_url":"https://api.github.com/users/tcr3dr/followers","following_url":"https://api.github.com/users/tcr3dr/following{/other_user}","gists_url":"https://api.github.com/users/tcr3dr/gists{/gist_id}","starred_url":"https://api.github.com/users/tcr3dr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcr3dr/subscriptions","organizations_url":"https://api.github.com/users/tcr3dr/orgs","repos_url":"https://api.github.com/users/tcr3dr/repos","events_url":"https://api.github.com/users/tcr3dr/events{/privacy}","received_events_url":"https://api.github.com/users/tcr3dr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-09T21:28:20Z","updated_at":"2015-11-09T21:39:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dronekit/dronekit-python/pulls/437","html_url":"https://github.com/dronekit/dronekit-python/pull/437","diff_url":"https://github.com/dronekit/dronekit-python/pull/437.diff","patch_url":"https://github.com/dronekit/dronekit-python/pull/437.patch"},"body":"This addresses some of the questions brought up by #277 and #420.\r\n\r\nThe goal is \"the correct way for users to implement custom attributes\". I rewrote this example to leverage the vehicle_class property of connect to instantiate a custom Vehicle class. The Vehicle constructor works similarly to how the internal ones, allowing you to add private properties, message listeners, etc. that become part of the class definition.\r\n\r\nI recommend this as the definitive way downstream users implement custom properties, as it's similar to how internal extensions like [dronekit-python-solo](https://github.com/dronekit/dronekit-python-solo) do it."},"comment":{"url":"https://api.github.com/repos/dronekit/dronekit-python/issues/comments/155206453","html_url":"https://github.com/dronekit/dronekit-python/pull/437#issuecomment-155206453","issue_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/437","id":155206453,"user":{"login":"tcr3dr","id":12703357,"avatar_url":"https://avatars.githubusercontent.com/u/12703357?v=3","gravatar_id":"","url":"https://api.github.com/users/tcr3dr","html_url":"https://github.com/tcr3dr","followers_url":"https://api.github.com/users/tcr3dr/followers","following_url":"https://api.github.com/users/tcr3dr/following{/other_user}","gists_url":"https://api.github.com/users/tcr3dr/gists{/gist_id}","starred_url":"https://api.github.com/users/tcr3dr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcr3dr/subscriptions","organizations_url":"https://api.github.com/users/tcr3dr/orgs","repos_url":"https://api.github.com/users/tcr3dr/repos","events_url":"https://api.github.com/users/tcr3dr/events{/privacy}","received_events_url":"https://api.github.com/users/tcr3dr/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T21:39:56Z","updated_at":"2015-11-09T21:39:56Z","body":"A key aspect of this approach is that we fully utilize Python's class system, allowing documentation and tooling to react normally. With multiple inheritance, you can support multiple Vehicle \"extensions\", though I suspect there's no need for more than one custom Vehicle class in a given application."}}