{ "info": { "author": "Guillaume Roger", "author_email": "datatech@webpower.nl", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "Manage sessions for [Dundas](https://www.dundas.com/).\n\n# Description\n\n\nDundas has a very complete [REST API](https://www.dundas.com/support/api-docs/rest/).\n\nWith completeness comes complexity, and this module will help you use the query in an\neasier way.\n\n# Why this module is useful\n\nIt currently does 3 things for you.\n\nIf you use `dundas.Session` within a [context manager](https://docs.python.org/3/reference/datamodel.html#context-managers),\nthe context manager wil log you in and out automagically, no matter what happens. You can\nuse the session object as a normal object as well as long as you do not forget to log in and out\nyourself.\n\nEach and every call to the API needs to have the same `sessionId` parameter. This module creates\nshortcuts for you for `get`, `post` and `delete`, to make your life easier. You do not need\nto repeat the host, api path prefix or sessionId every single time.\n\nSome API calls are ported and might have helper methods. I am updating the module based on what I\nneed and use, so I do not expect to have everything ported on my own.\n\n\n# Installation\n\nSimply with pip, from [pypi](https://pypi.org/project/pydundas/):\n\n```bash\npython3 -m pip install pydundas\n```\n\nor, assuming you do not have permission to store the module globally:\n\n```bash\npython3 -m pip install --user pydundas\n```\n\nThe module should be able to work with python2 as well, but it is untested and as python2 will be end of life'd in a few\nmonths anyway I did not look into it.\n\n# Examples\n\nYou can see all the [examples](https://github.com/lomignet/pydundas/blob/master/pydundas/examples) in one directory.\n\nAll the examples below assume a `url`, `user` and `pwd` variables.\n\n## Happy flow with context manager\n\n```python\nwith Session(user=user, pwd=pwd, url=url) as d:\n print(d.get('Server').text)\n```\n\nOutput (example):\n```json\n[{\"name\":\"winterfell\",\"serverGroupId\":1,\"lastSeenTime\":\"2019-03-29T09:33:38.880327Z\",\"__classType\":\"dundas.configuration.ServerInfo\"}]\n```\nWhen the variable `d` comes out of scope, so outside the `with` statement, you will be\nautomagically logged out.\n\n## Read credentials from a yaml file\nIf you have a yaml file with a `user`, `pwd` and `url` key, then you can read it from pydundas:\n```yaml\nuser: arya\npwd: 'valar morghulis'\nurl: winterfell.got\n```\n\n```python\nfrom pydundas import creds_from_yaml\ncreds=creds_from_yaml('credentials.yaml')\nwith Session(**creds) as d:\n print(d.get('Server').text)\n```\n\n## Exception within the context manager are properly handled\n```python\nwith Session(user=user, pwd=pwd, url=url) as d:\n d.get('you/know/nothing')\n```\noutput:\n```\n404 Client Error: Not Found for url: https://winterfell.got/api/you/know/nothing?sessionId=fbeb7897-5981-412b-a981-7783f88894bd\n```\n\n# API calls\n\n## Constant\nMost constants can be used via their human-readable name.\n```python\nfrom pydundas import Api, Session, creds_from_yaml\n\nwith Session(**creds_from_yaml('credentials.yaml')) as d:\n a=Api(d)\n c = a.constant()\n # returns ['STANDARD_EXCEL_EXPORT_PROVIDER_ID']\n print(c.getNamesById('679e6337-48aa-4aa3-ad3d-db30ce943dc9'))\n # returns '679e6337-48aa-4aa3-ad3d-db30ce943dc9'\n print(c.getIdByName('STANDARD_EXCEL_EXPORT_PROVIDER_ID'))\n```\n\n## Cube\nYou can warehouse a cube, and get some information about it:\n```python\nwith Session(**creds) as d:\n api = Api(d)\n capi = api.cube()\n cube = capi.getByPath('Awesome Project', '/relevant/path')\n cube = capi.getByPath('DP', '/CustomReports/2daysent/1mailing sendouts')\n if cube is None:\n print(\"Gotcha, no cube named like that.\")\n sys.exit(1)\n print(cube.json())\n print(cube.is_checked_out())\n\n cube.warehouse()\n print(cube.isWarehousing())\n cube.waitForWarehousingCompletion()\n```\n## Health\nYou can run all checks, and fix the failing one:\n```python\nwith Session(**creds, loglevel='warn') as d:\n api = Api(d)\n hapi = api.health()\n failings = hapi.check(allchecks=True)\n print(failings)\n for f in failings:\n hapi.check([f], fix=True)\n```\n## Notification\n\nYou can get a notification by its name and then run it.\n```python\n napi = api.notification()\n notif = napi.getExactName(name='Awesome notification')\n\n if len(notif) != 1:\n print(\"None or more than one notification with this name.\")\n sys.exit(1)\n napi.run(notif[0]['id'])\n```\n\n## Project\nFor example, to find the ID of a project:\n```python\nfrom pydundas import Api, Session, creds_from_yaml\n\nwith Session(**creds_from_yaml('credentials.yaml')) as d:\n api=Api(d)\n project = a.project()\n print(project.getProjectIdByName('DP'))\n```\n\n# Develop\n\nYou can either use `conda` or `virtualenv`. Most relevant commands are in the Makefile.\nFirst edit the first line of the makefile to choose if you want to use conda or virtualenv.\n\n```bash\n# Build an environment with all dependencies\nmake devinit\n\n# Tests\nmake pep8\nmake unittest\n\n# Build a package\nmake package\n\n# Clean up everything\nmake purge\n\n```\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": "https://github.com/Web-Power/pydundas", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pydundas", "package_url": "https://pypi.org/project/pydundas/", "platform": "", "project_url": "https://pypi.org/project/pydundas/", "project_urls": { "Homepage": "https://github.com/Web-Power/pydundas" }, "release_url": "https://pypi.org/project/pydundas/1.6.1/", "requires_dist": [ "requests", "pyyaml", "pillow" ], "requires_python": "", "summary": "Python interface to Dundas rest api.", "version": "1.6.1" }, "last_serial": 5873292, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b23ccad73a0bfabf7a9c94274d23599f", "sha256": "5f48dcbd27db7ca121c0c26f310c8f6b442b423cff9a91f66bcf0d80b6354d70" }, "downloads": -1, "filename": "pydundas-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b23ccad73a0bfabf7a9c94274d23599f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5129, "upload_time": "2019-03-29T11:57:17", "url": "https://files.pythonhosted.org/packages/91/73/723c2ebd7691bbe796179c7b1a6d55f5801cb70706a97624534e486597b4/pydundas-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "09836e4da172da39e8246a2d80a1d25a", "sha256": "8a7c591e9eedc9280e64f7de61ac184c51bf5a18af531ffcdadcdc54e82a6258" }, "downloads": -1, "filename": "pydundas-0.1.tar.gz", "has_sig": false, "md5_digest": "09836e4da172da39e8246a2d80a1d25a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3777, "upload_time": "2019-03-29T11:57:19", "url": "https://files.pythonhosted.org/packages/79/8e/c132e6c0a3065be8525dee4619840219f8a7c712eb02e1fd5dcd746945da/pydundas-0.1.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "6e6464f795f9d0f1fdf348fc3bc15672", "sha256": "03386f8ae405fa0492ea5ad0952edc960fafbd6c5ff00b710bfd0e603d2faf7c" }, "downloads": -1, "filename": "pydundas-0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "6e6464f795f9d0f1fdf348fc3bc15672", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6897, "upload_time": "2019-03-29T12:56:54", "url": "https://files.pythonhosted.org/packages/fb/06/22ed3f843c8844b2fbfc0e5b61f0e905d57990cb207bc03f04a5ef5d07ce/pydundas-0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "002d633f113c0aaaf2b06b70bb7141b7", "sha256": "b2ee9eab649d21e1383fdce17826f7548e10b6741b8d9370abc5cc176df498c4" }, "downloads": -1, "filename": "pydundas-0.9.tar.gz", "has_sig": false, "md5_digest": "002d633f113c0aaaf2b06b70bb7141b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5554, "upload_time": "2019-03-29T12:56:56", "url": "https://files.pythonhosted.org/packages/fc/10/6a38126b46db31a28c638d4e995f8fb3b7a68849846fd190a5851d651c67/pydundas-0.9.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "a9a0e4abd58b5b62e7c88f88b1efe397", "sha256": "3f3bf6982919e804aa2074d6d61e873799d9adc11ad2ec8ae6e03ff71c2e626b" }, "downloads": -1, "filename": "pydundas-0.9.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a9a0e4abd58b5b62e7c88f88b1efe397", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6927, "upload_time": "2019-03-29T13:11:32", "url": "https://files.pythonhosted.org/packages/73/d7/52ce1a066926bbbc678661e06d033fb67a1a925111960a13ef1fd2420da6/pydundas-0.9.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ef027bfa1a4d1998a3ece907f4102357", "sha256": "5019cf0051f851533d442e7566f08a186fdfb5c6ed1cc8a4ba4cc24466ae0bac" }, "downloads": -1, "filename": "pydundas-0.9.1.tar.gz", "has_sig": false, "md5_digest": "ef027bfa1a4d1998a3ece907f4102357", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5552, "upload_time": "2019-03-29T13:11:34", "url": "https://files.pythonhosted.org/packages/d5/42/93e5875b3e09d9aa53236506a8f15fff684eb2d3e0423589a2e3518f553c/pydundas-0.9.1.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "c7e580fa275533861c73ba091711b2dd", "sha256": "7772275a3c04178f94b2511703594604a66dae4406450edc0117c4d2385fe2dc" }, "downloads": -1, "filename": "pydundas-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c7e580fa275533861c73ba091711b2dd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7865, "upload_time": "2019-04-08T13:49:50", "url": "https://files.pythonhosted.org/packages/13/a3/3443c4d28340e1dc1b25714d6dc7e6e89eb56900bfbd0deb931b103694de/pydundas-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bfdd745236c583a2332a3ca5834b61bf", "sha256": "095c54dd900f87e2db4e5ee73786ac2d13709e0205a4ca39b74b5deb8df25079" }, "downloads": -1, "filename": "pydundas-1.1.tar.gz", "has_sig": false, "md5_digest": "bfdd745236c583a2332a3ca5834b61bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6267, "upload_time": "2019-04-08T13:49:51", "url": "https://files.pythonhosted.org/packages/c5/6f/9d4af2eb8e56d176ad8d686bc00dacfc5641469ad80374fa97035432b1b3/pydundas-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "e9a8fa3f853bd5dd3f3768367a548d64", "sha256": "d9301a403ab9bff8e7a5bdf5695b3d022a3190bd1cf1483d8b878cb19521a8e5" }, "downloads": -1, "filename": "pydundas-1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "e9a8fa3f853bd5dd3f3768367a548d64", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8206, "upload_time": "2019-04-09T08:00:29", "url": "https://files.pythonhosted.org/packages/30/2c/a2c50a0208abbeaea8582fe79acc55ecfe369b818ed718c1f3bc3be72957/pydundas-1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8999d9989068e20181e7d98f587d1188", "sha256": "5eb928571bd62ae841c76c899a236eeb50dfbc8f0605a91c1bc3cb1ddf1968ea" }, "downloads": -1, "filename": "pydundas-1.2.tar.gz", "has_sig": false, "md5_digest": "8999d9989068e20181e7d98f587d1188", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6377, "upload_time": "2019-04-09T08:00:30", "url": "https://files.pythonhosted.org/packages/f5/c3/4e03f37d11947e22a4fb13a9f0a9554efb77536b5a1dff3a5ce3e5626331/pydundas-1.2.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "216022a533c1ae40b5a70e17183a2f4a", "sha256": "2ed88e342377f4c81f3032214a1b49dd7b0babefe340cf54cbfe870420aae973" }, "downloads": -1, "filename": "pydundas-1.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "216022a533c1ae40b5a70e17183a2f4a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8948, "upload_time": "2019-04-09T13:26:34", "url": "https://files.pythonhosted.org/packages/4f/e2/dc15f96f957a50173c1ff4ae73652c78259ae1abdd9b8f953fc744867259/pydundas-1.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1bef839329849b8aa43e3a796c7ae64", "sha256": "3d3948cb7ad237e42eca42c19a3360bbefdf134e01ed26cb3763a920a0aa9958" }, "downloads": -1, "filename": "pydundas-1.3.1.tar.gz", "has_sig": false, "md5_digest": "e1bef839329849b8aa43e3a796c7ae64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6910, "upload_time": "2019-04-09T13:26:36", "url": "https://files.pythonhosted.org/packages/6a/40/0248fc6ac823dfbf63c4ef56b410bbe96b06285935a3e2e909b66e109552/pydundas-1.3.1.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "14d7508ff6246a794ad5edcce57c5e06", "sha256": "9e06ffc054d9460ea578998f3bd6d383ef320b739cd3e80cab9bc59da0f99cbb" }, "downloads": -1, "filename": "pydundas-1.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "14d7508ff6246a794ad5edcce57c5e06", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25568, "upload_time": "2019-05-23T08:14:35", "url": "https://files.pythonhosted.org/packages/69/15/6786f8712068839428c39a04b966f4c94444fc35d5d97aaba5836fd83819/pydundas-1.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5d5d360cb4ce2353959eca9e7f92d2d", "sha256": "3330b2866e4825d9622b3c54422b9c49aecaa2ecadd15660ae577a1fc6bcc020" }, "downloads": -1, "filename": "pydundas-1.4.0.tar.gz", "has_sig": false, "md5_digest": "e5d5d360cb4ce2353959eca9e7f92d2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20235, "upload_time": "2019-05-23T08:14:37", "url": "https://files.pythonhosted.org/packages/8a/a4/693bb232ced3845f3cf71e1c4cec58e48e9ec053024e02422ddffe3ee048/pydundas-1.4.0.tar.gz" } ], "1.5.0": [ { "comment_text": "", "digests": { "md5": "09a7a0b0e87a06ffb35b0f7de656d886", "sha256": "afb782027264d735e028832c354f2d1a8134c74743b3df78978574dc4c4136ef" }, "downloads": -1, "filename": "pydundas-1.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "09a7a0b0e87a06ffb35b0f7de656d886", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 27820, "upload_time": "2019-06-03T07:28:08", "url": "https://files.pythonhosted.org/packages/5d/69/c1b807d4c1884eb23fb3b5cd1eadbe45e3ac525708f2dd9fafdd0d77c8d4/pydundas-1.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8486c519edfbc2dab40b3d3a24848c93", "sha256": "ea199858ddeb2da0c889b458febc99e22c2316f663edbe3137ad652fd03e497d" }, "downloads": -1, "filename": "pydundas-1.5.0.tar.gz", "has_sig": false, "md5_digest": "8486c519edfbc2dab40b3d3a24848c93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22183, "upload_time": "2019-06-03T07:28:10", "url": "https://files.pythonhosted.org/packages/57/b3/1c3dc4949d0aabc590c90ddc71850b66fa7c54cb7850999fae2728ad2b30/pydundas-1.5.0.tar.gz" } ], "1.5.1": [ { "comment_text": "", "digests": { "md5": "63966eda18893da0a54e0cb83d1c75c7", "sha256": "d45758963bf1536d676a3a5e42e73561f3e691b0ea861451aa7ae9ac6a7be672" }, "downloads": -1, "filename": "pydundas-1.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "63966eda18893da0a54e0cb83d1c75c7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 29991, "upload_time": "2019-06-17T12:27:38", "url": "https://files.pythonhosted.org/packages/39/71/b77b0621ac0cc0c44400f383f405a7bbe396b298d904d797eafa181bdf37/pydundas-1.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "73c654bf9ed79992597f4705612c3415", "sha256": "efa9c0be7ca9a7cccd88f5d54556774a50eda9a00581643e33d83886dde2b6cb" }, "downloads": -1, "filename": "pydundas-1.5.1.tar.gz", "has_sig": false, "md5_digest": "73c654bf9ed79992597f4705612c3415", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23712, "upload_time": "2019-06-17T12:27:40", "url": "https://files.pythonhosted.org/packages/19/66/a8cd744d0edc729884b05d3b3d16f808e517cfaf727f4338d2a1f9682f5a/pydundas-1.5.1.tar.gz" } ], "1.5.2": [ { "comment_text": "", "digests": { "md5": "9c51d45001a3dc4cfd21dc64b8e7fa8b", "sha256": "246736fbe191af00c41160f3559a4c49083655b8f4cd2ce4dcfaa8197e7afdb7" }, "downloads": -1, "filename": "pydundas-1.5.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9c51d45001a3dc4cfd21dc64b8e7fa8b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 31436, "upload_time": "2019-07-29T13:53:06", "url": "https://files.pythonhosted.org/packages/1c/27/04e696c150e0667e87b3b808f7169423fed33ca0f6d0f15ff8d9ded513e3/pydundas-1.5.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "39005316aff381e990f1a827d6e445d8", "sha256": "87e23c54a79308792877ebac145250360eb40e0daa4e3d0bb267f52ca1bee26b" }, "downloads": -1, "filename": "pydundas-1.5.2.tar.gz", "has_sig": false, "md5_digest": "39005316aff381e990f1a827d6e445d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24900, "upload_time": "2019-07-29T13:53:08", "url": "https://files.pythonhosted.org/packages/1f/e8/5f0679da6a9629218a8add9f53e68524a455618a89212d0e877a7050cfc1/pydundas-1.5.2.tar.gz" } ], "1.6.1": [ { "comment_text": "", "digests": { "md5": "191d255f49da585378e962f7f3dab275", "sha256": "d3d3374b8dac57d5464c2acc4af21c97c538b4f4e7490910a59efa880075bac9" }, "downloads": -1, "filename": "pydundas-1.6.1-py3-none-any.whl", "has_sig": false, "md5_digest": "191d255f49da585378e962f7f3dab275", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 36217, "upload_time": "2019-09-23T12:21:02", "url": "https://files.pythonhosted.org/packages/fa/d1/bde8af40482d566d395ae63de990e3d94d9708673b7946409e437898a0d3/pydundas-1.6.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "72513d158d9ab84edc5fe9c0f1030644", "sha256": "1bb47975e2c6014d8e6c7858471c66f0f317da1798bc43999fc8e1cf0a747742" }, "downloads": -1, "filename": "pydundas-1.6.1.tar.gz", "has_sig": false, "md5_digest": "72513d158d9ab84edc5fe9c0f1030644", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27616, "upload_time": "2019-09-23T12:21:04", "url": "https://files.pythonhosted.org/packages/f2/35/32e3bec377ae027db7f97395588c28f5b75b8a37f7d8bb23b912b085fe5e/pydundas-1.6.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "191d255f49da585378e962f7f3dab275", "sha256": "d3d3374b8dac57d5464c2acc4af21c97c538b4f4e7490910a59efa880075bac9" }, "downloads": -1, "filename": "pydundas-1.6.1-py3-none-any.whl", "has_sig": false, "md5_digest": "191d255f49da585378e962f7f3dab275", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 36217, "upload_time": "2019-09-23T12:21:02", "url": "https://files.pythonhosted.org/packages/fa/d1/bde8af40482d566d395ae63de990e3d94d9708673b7946409e437898a0d3/pydundas-1.6.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "72513d158d9ab84edc5fe9c0f1030644", "sha256": "1bb47975e2c6014d8e6c7858471c66f0f317da1798bc43999fc8e1cf0a747742" }, "downloads": -1, "filename": "pydundas-1.6.1.tar.gz", "has_sig": false, "md5_digest": "72513d158d9ab84edc5fe9c0f1030644", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27616, "upload_time": "2019-09-23T12:21:04", "url": "https://files.pythonhosted.org/packages/f2/35/32e3bec377ae027db7f97395588c28f5b75b8a37f7d8bb23b912b085fe5e/pydundas-1.6.1.tar.gz" } ] }