{ "info": { "author": "Gabriele Platania", "author_email": "gabriele.platania@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# pyjo-mdl\nModel definition language for Pyjo\n\n\nThis package will allow you to dynamically create pyjo models with a\ndomain specific language created ad-hoc.\n\n# Model definition language\n\nWe can define the structure of the model with a json format.\n Heres a basic example:\n\n```\n{\n \"url\": {\n \"type\": \"url\",\n \"required\": false\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"rounds\": {\n \"type\": \"array\",\n \"element\": {\n \"type\": \"embedded\",\n \"model\": {\n \"foo\": {\n \"type\": \"string\"\n },\n \"bar\": {\n \"type\": \"integer\",\n \"min_value\": 100\n }\n }\n }\n }\n}\n```\n\nThis allows to define models as a set of properties with some type\n and validation.\n\nAs you can see, there are many possible properties in this DSL.\n We want to keep it as simple as possible to start with,\n so heres a very basic list of stuff that we plan to add\n from the beginning.\n More stuff will come in the future as needs arise.\n\n# Available properties and options\n\n### Some generally available options:\n- `required`: true if the property must be always filled when providing content. Defaults to true\n- `type`: type of the property, see below for a proposal of the initial set of properties available\n\n\n### string\nBasic string field, may contain any set of UTF-8 characters.\nExtra options:\n\n- `validation`: a regular expression the string must satisfy\n- `min_length`: Min number of chars in the string, defaults to 0\n- `max_length`: Max number of chars in the string, defaults to infinite!\n- `values`: array of all and only possible values for this field\n\nExample:\n\n```\n{\n \"tag_version\": {\n \"type\": \"string\",\n \"validation\": \"^.*-[0-9]\\.[0-9]\\.[0-9]build[0-9]+$\"\n \"max_length\": 256\n }\n}\n```\n\nExample (enum):\n\n```\n{\n \"meal_category\": {\n \"type\": \"string\",\n \"values\": [\n \"smoothie\",\n \"main dish\",\n \"dessert\",\n ]\n }\n}\n```\n\n\n### integer\nInteger number. Extras:\n\n- `min_value`: min value allowed\n- `max_value`: max value allowed\n\n```\n{\n \"calories\": {\n \"type\": \"integer\",\n \"min_value\": 0\n }\n}\n```\n\n\n### float\nFloating point number. Extras:\n\n- `min_value`: min value allowed\n- `max_value`: max value allowed\n\n```\n{\n \"price\": {\n \"type\": \"float\",\n \"min_value\": 0,\n \"max_value\": 99.99\n }\n}\n```\n\n\n### boolean\nFlag, true or false. Cant be easier than this.\n\n```\n{\n \"hidden\": {\n \"type\": \"boolean\"\n }\n}\n```\n\nBooleans will automatically consider values in\n `yes, true, t, y, 1` to be truthy (ignoring case),\n values in `no, false, f, n, 0` to be falsy. Other string values will\n raise an exception.\n\n### url:\nURLs are validated with the following regex:\n`http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+`\n\n```\n{\n \"cover_image\": {\n \"type\": \"url\"\n }\n}\n```\n\n### embedded\nRepresents an embedded model that may have no meaning outside of the\n main model. Its useful to represent some nested data structure.\n May contain all the properties of a full model. Must contain:\n\n- `model`: the model structure being embedded\n\nExample\n\n```\n{\n \"pet\": {\n \"type\": \"embedded\",\n \"model\": {\n \"name\": {\n \"type\": \"string\",\n },\n \"age\": {\n \"type\": \"integer\",\n \"min_value\": 0\n }\n }\n }\n}\n```\n\n### array\nRepresents a list of fields of any kind, including embedded. Extras:\n\n- `element`: defines the kind of element in this array property. It may be of any kind, including embedded\n\nExamples (primitive content):\n\n```\n{\n \"lucky_numbers\": {\n \"type\": \"array\",\n \"element\": {\n \"type\": \"integer\"\n }\n }\n}\n```\n\nExample 2 (embedded complex models):\n\n```\n{\n \"pets\": {\n \"type\": \"array\",\n \"element\": {\n \"type\": \"embedded\",\n \"model\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"integer\",\n \"min_value\": 0\n }\n }\n }\n }\n}\n```\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/xelhark/pyjo-mdl", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pyjo-mdl", "package_url": "https://pypi.org/project/pyjo-mdl/", "platform": "", "project_url": "https://pypi.org/project/pyjo-mdl/", "project_urls": { "Homepage": "https://github.com/xelhark/pyjo-mdl" }, "release_url": "https://pypi.org/project/pyjo-mdl/0.1.4/", "requires_dist": [ "pyjo" ], "requires_python": "", "summary": "Model Definition Language for Pyjo", "version": "0.1.4" }, "last_serial": 4359924, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d52f200d9c7922ad90a0664d78dddeb0", "sha256": "7c70c3b21956f94702210a532243758ea308c83af9bc078827cb6c358facab5a" }, "downloads": -1, "filename": "pyjo-mdl-0.1.tar.gz", "has_sig": false, "md5_digest": "d52f200d9c7922ad90a0664d78dddeb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5160, "upload_time": "2018-03-19T11:29:14", "url": "https://files.pythonhosted.org/packages/9b/bc/759a6f00c3906dbe3ce94805ec17742b4094931441da84bf4a80aff8eb9b/pyjo-mdl-0.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "eb867fcaa41f87116ae560cb946941a0", "sha256": "ec0ae17d2ff0a33348d5a4fac1665d64c3fad157f31feb6561d2824ddb6fd35a" }, "downloads": -1, "filename": "pyjo-mdl-0.1.2.tar.gz", "has_sig": false, "md5_digest": "eb867fcaa41f87116ae560cb946941a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5247, "upload_time": "2018-05-14T12:39:01", "url": "https://files.pythonhosted.org/packages/12/2c/b54473ca3e8921b725794e59278d5906ae7107c65d8ec4d3a32466a6b993/pyjo-mdl-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "0f8f5e5b2a90e4d5c7cf792956d171bc", "sha256": "48109c1ba97ef5b8852b3f3497b93f40a47f3f47e0f59f7e9206f23eec2f9b06" }, "downloads": -1, "filename": "pyjo_mdl-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "0f8f5e5b2a90e4d5c7cf792956d171bc", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 8284, "upload_time": "2018-07-09T10:05:20", "url": "https://files.pythonhosted.org/packages/3c/48/5f6d4507b393a8361522ff220a48f61cca0e8b8703f0b957e94ba22b63d5/pyjo_mdl-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9532e7dbdf60a3460857b7b5ec4a28da", "sha256": "473144d8051524f3b25efe5554c34c96028c41f2b879aff384fb8b620133ac2e" }, "downloads": -1, "filename": "pyjo-mdl-0.1.3.tar.gz", "has_sig": false, "md5_digest": "9532e7dbdf60a3460857b7b5ec4a28da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5266, "upload_time": "2018-07-09T10:04:59", "url": "https://files.pythonhosted.org/packages/0f/79/7b7f81f5796759a94253b2aa6a9921b4942731de2d0707af96bd39d77b1a/pyjo-mdl-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "7a75161fdb587f35192923519fb2a64d", "sha256": "bf13560a0384630add7d5795bd12581b90a1da9045a391b9c16f086b74c4f748" }, "downloads": -1, "filename": "pyjo_mdl-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7a75161fdb587f35192923519fb2a64d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6056, "upload_time": "2018-10-10T13:11:06", "url": "https://files.pythonhosted.org/packages/e9/a4/5ec0543d81f548dc9f4e6be8fb70204cb9769dae8374c94680d21121d69c/pyjo_mdl-0.1.4-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7a75161fdb587f35192923519fb2a64d", "sha256": "bf13560a0384630add7d5795bd12581b90a1da9045a391b9c16f086b74c4f748" }, "downloads": -1, "filename": "pyjo_mdl-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7a75161fdb587f35192923519fb2a64d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6056, "upload_time": "2018-10-10T13:11:06", "url": "https://files.pythonhosted.org/packages/e9/a4/5ec0543d81f548dc9f4e6be8fb70204cb9769dae8374c94680d21121d69c/pyjo_mdl-0.1.4-py2.py3-none-any.whl" } ] }