{ "info": { "author": "Benjamin Einaudi", "author_email": "antechrestos@gmail.com", "bugtrack_url": null, "classifiers": [ "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Communications" ], "description": "Netatmo python client\n=====================\n.. image:: https://img.shields.io/pypi/v/netatmo-client.svg\n :target: https://pypi.python.org/pypi/netatmo-client\n.. image:: https://img.shields.io/github/license/antechrestos/python-netatmo-client.svg\n\t:target: https://raw.githubusercontent.com/antechrestos/python-netatmo-client/master/LICENSE\n\nThe python-netatmo-client repo contains a Python client library for Netatmo.\n\nInstalling\n==========\nSo far only source is the way of installing it:\n\nFrom sources\n------------\n\nTo build the library run :\n\n.. code-block:: bash\n\n\t$ python setup.py install\n\n\n\nHow to use it\n=============\nFirst of all you must declare your **own** application and get your *client id* and *client secret*.\n\nBuild an instance\n-----------------\n.. code-block:: python\n\n from netatmo_client.client import NetatmoClient\n scopes = ('read_station',\n 'read_thermostat',\n 'write_thermostat',\n 'read_camera')\n client_id = 'client id'\n client_secret = 'client secret'\n client = NetatmoClient(client_id, client_secret)\n\nGet the tokens\n--------------\n\nThe library provides you two way of logging the client\n\nGrant code process\n~~~~~~~~~~~~~~~~~~\n\nProviding that you declared ``http://somewhere.org/callback/grant/code`` as a **redirect uri** on the netatmo site,\nyou may get your tokens using the grant code way with a code like follows.\n\n.. code-block:: python\n\n client = NetatmoClient('client-id', 'client-secret')\n scopes = ('read_station',\n 'read_thermostat',\n 'write_thermostat',\n 'read_camera')\n redirect_uri = 'http://somewhere.org/callback/grant/code'\n grant_url = client.generate_auth_url(redirect_uri, 'state-test', *scopes)\n sys.stdout\\\n .write(\"Open the following url ( %s ), follow the steps and enter the code you will see in the navigation bar: \"\n % grant_url)\n code = sys.stdin.readline()\n code = code.rstrip('\\r\\n')\n client.request_token_with_code(code, redirect_uri, *scopes)\n # use the api\n print json.dumps(client.station.get_station_data())\n\nThe user will be lead to the grant code process and return to your site with\na url such as ``http://somewhere.org/callback/grant/code?code=&state=state-test``.\nThen normally a webserver of yours handles the `GET` request, and exchanges the code using the same **redirect uri** as above.\n\nClient credentials\n~~~~~~~~~~~~~~~~~~\n\nYou may also choose this process as follows:\n\n.. code-block:: python\n\n client = NetatmoClient('client-id', 'client-secret')\n scopes = ('read_station',\n 'read_thermostat',\n 'write_thermostat',\n 'read_camera')\n client.request_token_with_client_credentials('username', 'password', *scopes)\n # use the api\n print json.dumps(client.thermostat.get_thermostat_data())\n\nThe api calls\n-------------\n\nThe client defines three parts:\n\n- ``common``:\n - ``get_measure``\n- ``public``:\n - ``get_public_data``\n- ``station``:\n - ``get_station_data``\n- ``thermostat``:\n - ``get_thermostat_data``\n - ``create_new_schedule``\n - ``set_therm_point``\n - ``switch_schedule``\n - ``sync_schedule``\n- ``welcome``\n - ``get_camera_picture``\n - ``get_events_until``\n - ``get_next_events``\n - ``get_home_data``\n - ``get_last_event_of``\n - ``add_webhook``\n - ``drop_webhook``\n - ``ping``\n\n\nIssues and contributions\n========================\nPlease submit issue/pull request.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/antechrestos/python-netatmo-client", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "netatmo-client", "package_url": "https://pypi.org/project/netatmo-client/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/netatmo-client/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/antechrestos/python-netatmo-client" }, "release_url": "https://pypi.org/project/netatmo-client/0.0.3/", "requires_dist": null, "requires_python": null, "summary": "A client library for Netatmo", "version": "0.0.3" }, "last_serial": 2359816, "releases": { "0.0.1": [], "0.0.2": [ { "comment_text": "", "digests": { "md5": "21f699550c76249f22d7d6f6f9fc4cd8", "sha256": "94ca9298eadcb56c9a6ad28fce4d42d27d6829de50f7ce180c3989cac2faeb55" }, "downloads": -1, "filename": "netatmo-client-0.0.2.tar.gz", "has_sig": false, "md5_digest": "21f699550c76249f22d7d6f6f9fc4cd8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7261, "upload_time": "2016-09-21T18:54:17", "url": "https://files.pythonhosted.org/packages/24/91/66a845fbb0808de6cbee9982f2cee8e499318085c30c234bd797d3ca4dc7/netatmo-client-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "66efd1d51c97c98742b21837e9b24fac", "sha256": "9f01431ded3d0b337e7bb451204a6c85a9e0a1b6d03b3ab2c52bd5c94c92c0bb" }, "downloads": -1, "filename": "netatmo-client-0.0.3.zip", "has_sig": false, "md5_digest": "66efd1d51c97c98742b21837e9b24fac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14509, "upload_time": "2016-09-23T15:21:20", "url": "https://files.pythonhosted.org/packages/13/bd/3f0517afe37c2217d25affd6d60ab3e199531945756d5578c679ced8946a/netatmo-client-0.0.3.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "66efd1d51c97c98742b21837e9b24fac", "sha256": "9f01431ded3d0b337e7bb451204a6c85a9e0a1b6d03b3ab2c52bd5c94c92c0bb" }, "downloads": -1, "filename": "netatmo-client-0.0.3.zip", "has_sig": false, "md5_digest": "66efd1d51c97c98742b21837e9b24fac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14509, "upload_time": "2016-09-23T15:21:20", "url": "https://files.pythonhosted.org/packages/13/bd/3f0517afe37c2217d25affd6d60ab3e199531945756d5578c679ced8946a/netatmo-client-0.0.3.zip" } ] }