{ "info": { "author": "Myst AI, Inc.", "author_email": "support@myst.ai", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# Myst Python Library\n\nThis is the official Python client library for the Myst Platform.\n\n### Requirements\n\n- Python 2.7+ or Python 3.4+\n\n### Installation\n\nTo install the package from PyPI:\n\n $ pip install --upgrade myst\n\n### Authentication\n\nThe Myst API uses JSON Web Tokens (JWTs) to authenticate requests. The Myst Python library handles the sending of JWTs to the API automatically and\ncurrently supports two ways to authenticate to obtain a JWT: through your Google user account or a Myst service account.\n\n#### Authenticating using your user account\n\nIf you don't yet have a Google account, you can create one on the [Google Account Signup](https://accounts.google.com/signup) page.\n\nOnce you have access to a Google account, send an email to `support@myst.ai` with your email so we can authorize you to use the Myst Platform.\n\nUse the following code snippet to authenticate using your user account:\n\n```python\nimport myst\n\nmyst.authenticate()\n```\n\nThe first time you run this, you'll be presented with a web browser and asked to authorize the Myst Python library to make requests on behalf of your Google user account.\n\n#### Authenticating using a service account\n\nYou can also authenticate using a Myst service account. To request a service account, email `support@myst.ai`.\n\nTo authenticate using a service account, set the `MYST_APPLICATION_CREDENTIALS` environment variable to the path to your service account\nkey file and specify `use_service_account=True`:\n\n```sh\n$ export MYST_APPLICATION_CREDENTIALS=\n```\n\n```python\nimport myst\n\nmyst.authenticate(use_service_account=True)\n```\n\nYou can also explicitly pass the path to your service account key when authenticating:\n\n```python\nimport myst\n\nmyst.authenticate(\n use_service_account=True,\n service_account_key_file_path='/path/to/key/file.json',\n)\n```\n\n### Working with time series\n\nThe Myst python library currently supports listing, getting, and fetching data for time series.\n\n#### Listing time series\n\n```python\nimport myst\n\nmyst.authenticate()\n\nall_time_series = myst.TimeSeries.list()\n```\n\n#### Getting a time series\n\n```python\nimport myst\n\nmyst.authenticate()\n\ntime_series = myst.TimeSeries.get('fc84...')\n```\n\n#### Fetching data from a time series\n\nYou can either fetch data by specifying absolute start and end times, or offsets relative to the `as_of_time`. If no `as_of_time` is given,\nit is assumed to mean \"as of now\":\n\n```python\nimport datetime\nimport pytz\n\nimport myst\n\nmyst.authenticate(...)\n\ntime_series = myst.TimeSeries.get('fc84...')\n\n# Fetching data using absolute start and end times.\ndata = time_series.fetch_data(\n start_time=datetime.datetime(2019, 1, 1),\n end_time=datetime.datetime(2019, 1, 2),\n)\n\n# Fetching data specifying an as of time.\ndata = time_series.fetch_data(\n start_time=datetime.datetime(2019, 1, 1),\n end_time=datetime.datetime(2019, 1, 2),\n as_of_time=datetime.datetime(2019, 1, 1, 12),\n)\n\n# Fetching data using offsets relative to now.\ndata = time_series.fetch_data(\n start_offset=datetime.timedelta(hours=-12),\n end_offset=datetime.timedelta(hours=12),\n)\n\n# Fetching data specifying a combination of relative offsets and absolute timestamps.\ndata = time_series.fetch_data(\n start_offset=datetime.timedelta(hours=-12),\n end_time=datetime.datetime(2019, 1, 2),\n)\n```\n\n## Support\n\nFor questions or just to say hi, reach out to `support@myst.ai`.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "myst", "package_url": "https://pypi.org/project/myst/", "platform": "", "project_url": "https://pypi.org/project/myst/", "project_urls": null, "release_url": "https://pypi.org/project/myst/0.1.1/", "requires_dist": [ "google-auth (==1.6.3)", "google-auth-oauthlib (==0.4.0)", "pytz (==2019.1)", "requests (==2.21.0)", "coverage (==4.5.2) ; extra == 'dev'", "mock (==3.0.5) ; extra == 'dev'", "responses (==0.10.6) ; extra == 'dev'", "tox (>=3.13.1) ; extra == 'dev'", "twine (>=1.13.0) ; extra == 'dev'", "check-manifest (>=0.37) ; extra == 'dev'" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "This is the official Python library for the Myst Platform.", "version": "0.1.1" }, "last_serial": 5844389, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b159398974bbb9c27901faee58ed2652", "sha256": "8978f904f1f5f6cd601a183bcd56391387a93da50ed3232ba95a97cf656dc567" }, "downloads": -1, "filename": "myst-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b159398974bbb9c27901faee58ed2652", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 1419, "upload_time": "2019-05-01T21:27:43", "url": "https://files.pythonhosted.org/packages/b3/35/ad72bcc14168fd636bbc7f866774ee629d36283521a7906d8b0af185c166/myst-0.0.1-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e85775eb4ec938a233c6f5b4b8f95d21", "sha256": "9108fa438a3186a43255c639ad7fb1f970fe33130b826d5d50044e4fddb45c39" }, "downloads": -1, "filename": "myst-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e85775eb4ec938a233c6f5b4b8f95d21", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 35409, "upload_time": "2019-09-17T22:35:04", "url": "https://files.pythonhosted.org/packages/9e/41/05b6906aeee999ca7e04a80f5119e55a93361b886d70a03002fc4750d9f8/myst-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "059f507bdbbe9cf66dd0a3bb8e22e179", "sha256": "4c3e1fb75c6ecc338f7737ce0c38c4e96eaa94ff7fbf9e1f5588c2c9e0afe9f2" }, "downloads": -1, "filename": "myst-0.1.1.tar.gz", "has_sig": false, "md5_digest": "059f507bdbbe9cf66dd0a3bb8e22e179", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 26492, "upload_time": "2019-09-17T22:35:05", "url": "https://files.pythonhosted.org/packages/b7/70/bda4670fb9b3788b89604e07d7a11755f3a8dafb89ef32389d57e6201fc1/myst-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e85775eb4ec938a233c6f5b4b8f95d21", "sha256": "9108fa438a3186a43255c639ad7fb1f970fe33130b826d5d50044e4fddb45c39" }, "downloads": -1, "filename": "myst-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e85775eb4ec938a233c6f5b4b8f95d21", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 35409, "upload_time": "2019-09-17T22:35:04", "url": "https://files.pythonhosted.org/packages/9e/41/05b6906aeee999ca7e04a80f5119e55a93361b886d70a03002fc4750d9f8/myst-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "059f507bdbbe9cf66dd0a3bb8e22e179", "sha256": "4c3e1fb75c6ecc338f7737ce0c38c4e96eaa94ff7fbf9e1f5588c2c9e0afe9f2" }, "downloads": -1, "filename": "myst-0.1.1.tar.gz", "has_sig": false, "md5_digest": "059f507bdbbe9cf66dd0a3bb8e22e179", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 26492, "upload_time": "2019-09-17T22:35:05", "url": "https://files.pythonhosted.org/packages/b7/70/bda4670fb9b3788b89604e07d7a11755f3a8dafb89ef32389d57e6201fc1/myst-0.1.1.tar.gz" } ] }