{ "info": { "author": "Ben Riggleman", "author_email": "ben.riggleman@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries" ], "description": "# tartiflette-plugin-isodatenow\n\n\"Buddy.Works\n\n[![buddy pipeline](https://app.buddy.works/benriggleman/tartiflette-plugin-isodate/pipelines/pipeline/208276/badge.svg?token=ff05a3fb6bb08b48350b4170e0c447aa3ccc198abbddd48c222205c3c61a7cff \"buddy pipeline\")](https://app.buddy.works/benriggleman/tartiflette-plugin-isodate/pipelines/pipeline/208276)\n\nISO Date Format Directive for Tartiflette\n\n## TOC\n- [Overview](#overview)\n- [Installation](#install)\n- [Usage](#usage)\n - [Options](#usage-options)\n - [microseconds](#usage-options-microseconds)\n - [timezone](#usage-options-timezone)\n - [utc](#usage-options-utc)\n\n\n## [Overview](#overview)\n\nThe `tartiflette-plugin-isodatenow` plugin adds an `@isoDateNow` directive to [tartiflette](https://github.com/tartiflette/tartiflette). It sets the field that it is on with the current time in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601).\nIt is primarly intended for use in mutations as the directive overrides any value sent though it can be used in queries where a `createdAt` or response timestamp is required.\n\n## [Installation](#install)\n\nTo install with [poetry](https://poetry.eustace.io):\n\n```sh\n$ poetry add tartiflette-plugin-isodatenow\n```\n\nTo install with pip:\n\n```sh\n$ pip install tartiflette-plugin-isodatenow\n```\n\n## [Usage](#usage)\n\n```graphql\ntype Example {\n createdAt: String @isoDateNow\n}\n```\n\nQuerying `createdAt` would return the following:\n\n```json\n{\n \"data\": {\n \"example\": {\n \"createdAt\": \"2019-09-04T13:49:12.585158+00:00\"\n }\n }\n}\n```\n\n\n### [Options](#usage-options)\n\nThe `@isoDateNow` also takes the following optional arguments:\n\n#### [@isoDateNow(microseconds: false)](#usage-options-microseconds)\n\nReturns date and time _without_ microseconds.\n\n```graphql\ntype Example {\n createdAt: String @isoDateNow(microseconds: false)\n}\n```\n\nQuerying `createdAt` would return the following:\n\n```json\n{\n \"data\": {\n \"example\": {\n \"createdAt\": \"2019-09-04T13:49:12+00:00\"\n }\n }\n}\n```\n\n#### [@isoDateNow(timezone: false)](#usage-options-timezone)\n\nReturns date and time _without_ timezone.\n\n```graphql\ntype Example {\n createdAt: String @isoDateNow(timezone: false)\n}\n```\n\nQuerying `createdAt` would return the following:\n\n```json\n{\n \"data\": {\n \"example\": {\n \"createdAt\": \"2019-09-04T13:49:12.585158\"\n }\n }\n}\n```\n\n#### [@isoDateNow(utc: false)](#usage-options-utc)\n\nReturns date and time in the _local_ timezone.\n\n```graphql\ntype Example {\n createdAt: String @isoDateNow(utc: false)\n}\n```\n\nQuerying `createdAt` would return the following:\n\n```json\n{\n \"data\": {\n \"example\": {\n \"createdAt\": \"2019-09-04T09:49:12.585158-04:00\"\n }\n }\n}\n```\n\n\nThe arguments can be used in any combination and will return an [ISO8601 compliant date](https://en.wikipedia.org/wiki/ISO_8601).\n\nFor example settings `microseconds` to `false` and `timezone` to `true` would yield: 2019-09-04T13:49:12+00:00.\n\nPossible combinations:\n\n- `@isoDateNow` >> \"2019-09-04T13:49:12.585158+00:00\"\n- `@isoDateNow(timezone: false)` >> \"2019-09-04T13:52:43.476260\"\n- `@isoDateNow(microseconds: false)` >> \"2019-09-04T13:50:02+00:00\"\n- `@isoDateNow(microseconds: false, timezone: false)` >> \"2019-09-04T13:53:31\"\n\nThe time can also be set to the `local` time by setting `utc` to `false`. \n\n`@isoDateNow(utc: false)` >> \"2019-09-04T09:50:02+00:00\"\n\nUsing the `@isoDateNow` directive will override any value sent.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/briggleman/tartiflette-plugin-isodate", "keywords": "api,graphql,tartiflette,iso8601,directive", "license": "MIT", "maintainer": "Ben Riggleman", "maintainer_email": "ben.riggleman@gmail.com", "name": "tartiflette-plugin-isodatenow", "package_url": "https://pypi.org/project/tartiflette-plugin-isodatenow/", "platform": "", "project_url": "https://pypi.org/project/tartiflette-plugin-isodatenow/", "project_urls": { "Homepage": "https://github.com/briggleman/tartiflette-plugin-isodate", "Repository": "https://github.com/briggleman/tartiflette-plugin-isodate" }, "release_url": "https://pypi.org/project/tartiflette-plugin-isodatenow/0.2.2/", "requires_dist": [ "tartiflette (>=0.12.5,<0.13.0)" ], "requires_python": ">=3.6,<4.0", "summary": "ISO Date Formatter for Tartiflette", "version": "0.2.2" }, "last_serial": 5805316, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "f2ec8b432d8775ae7c71f268557db29c", "sha256": "bc8e43c36a6b6350f3cee239b40f4f1281e7728232dbbbbfb18bd936e1552e11" }, "downloads": -1, "filename": "tartiflette_plugin_isodatenow-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f2ec8b432d8775ae7c71f268557db29c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 4013, "upload_time": "2019-09-09T19:55:18", "url": "https://files.pythonhosted.org/packages/04/b5/4a2c26479b1c74cdddaaf0c2f362756c217430f66cacf7058f3402b697ef/tartiflette_plugin_isodatenow-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "db71c12319f76c38008272fb1ac07833", "sha256": "93603c1adae087c8da84c9c201975edc4f7efb08b05973c5d0a42b4e00193caf" }, "downloads": -1, "filename": "tartiflette-plugin-isodatenow-0.2.1.tar.gz", "has_sig": false, "md5_digest": "db71c12319f76c38008272fb1ac07833", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 3979, "upload_time": "2019-09-09T19:55:16", "url": "https://files.pythonhosted.org/packages/1f/01/61861cd1e5771c535bf83fa98cb8ff47415882e6c4a4fe38431fc92d3642/tartiflette-plugin-isodatenow-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "fc3e317c1dbeea3484ecf74c3d6fc400", "sha256": "9d778af0d82ba6e2a5a93264277dd1bbee322a497740767fe9b1fa17405dd3d1" }, "downloads": -1, "filename": "tartiflette_plugin_isodatenow-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "fc3e317c1dbeea3484ecf74c3d6fc400", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 4017, "upload_time": "2019-09-09T20:03:28", "url": "https://files.pythonhosted.org/packages/1e/3d/df2a5138a877508c7141af859da79f263805573252dbed0988c9022b24ee/tartiflette_plugin_isodatenow-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "21587b86843a9f0cf68a74f8f661e568", "sha256": "83c54be71e8d04adc198bea14d46530068433c76ee2c00d815878179302e3681" }, "downloads": -1, "filename": "tartiflette-plugin-isodatenow-0.2.2.tar.gz", "has_sig": false, "md5_digest": "21587b86843a9f0cf68a74f8f661e568", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 3980, "upload_time": "2019-09-09T20:03:26", "url": "https://files.pythonhosted.org/packages/a0/e3/0934affcbfc2347dca4781210f372f5cf45ef0575341ef00ef6adfef49cf/tartiflette-plugin-isodatenow-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fc3e317c1dbeea3484ecf74c3d6fc400", "sha256": "9d778af0d82ba6e2a5a93264277dd1bbee322a497740767fe9b1fa17405dd3d1" }, "downloads": -1, "filename": "tartiflette_plugin_isodatenow-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "fc3e317c1dbeea3484ecf74c3d6fc400", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 4017, "upload_time": "2019-09-09T20:03:28", "url": "https://files.pythonhosted.org/packages/1e/3d/df2a5138a877508c7141af859da79f263805573252dbed0988c9022b24ee/tartiflette_plugin_isodatenow-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "21587b86843a9f0cf68a74f8f661e568", "sha256": "83c54be71e8d04adc198bea14d46530068433c76ee2c00d815878179302e3681" }, "downloads": -1, "filename": "tartiflette-plugin-isodatenow-0.2.2.tar.gz", "has_sig": false, "md5_digest": "21587b86843a9f0cf68a74f8f661e568", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 3980, "upload_time": "2019-09-09T20:03:26", "url": "https://files.pythonhosted.org/packages/a0/e3/0934affcbfc2347dca4781210f372f5cf45ef0575341ef00ef6adfef49cf/tartiflette-plugin-isodatenow-0.2.2.tar.gz" } ] }