{"id":19541869,"url":"https://github.com/imcf/pyppms","last_synced_at":"2025-06-19T10:39:06.563Z","repository":{"id":62582678,"uuid":"187014354","full_name":"imcf/pyppms","owner":"imcf","description":":bookmark_tabs: :clock10: :snake: A Python package to communicate with Stratocore's PUMAPI.","archived":false,"fork":false,"pushed_at":"2023-07-07T20:07:15.000Z","size":348,"stargazers_count":5,"open_issues_count":2,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-26T17:46:53.311Z","etag":null,"topics":["booking-system","ppms","pumapi","python","research-facility","web-api"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pyppms/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imcf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-16T11:29:33.000Z","updated_at":"2025-03-07T14:55:54.000Z","dependencies_parsed_at":"2024-11-11T03:12:20.761Z","dependency_job_id":"04752022-44b3-4aea-aaa4-aeb0becc93b7","html_url":"https://github.com/imcf/pyppms","commit_stats":{"total_commits":318,"total_committers":2,"mean_commits":159.0,"dds":"0.0031446540880503138","last_synced_commit":"1ac5ae57b556db967f0d65dc64567d951d949c3d"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/imcf/pyppms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcf%2Fpyppms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcf%2Fpyppms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcf%2Fpyppms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcf%2Fpyppms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imcf","download_url":"https://codeload.github.com/imcf/pyppms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcf%2Fpyppms/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260734536,"owners_count":23054480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["booking-system","ppms","pumapi","python","research-facility","web-api"],"created_at":"2024-11-11T03:12:13.569Z","updated_at":"2025-06-19T10:39:01.554Z","avatar_url":"https://github.com/imcf.png","language":"Python","readme":"# PyPPMS\n\n## PUMAPI - Python Interface\n\n[Stratocore][3]'s *PPMS* booking system offers an API (the so-called *PUMAPI*, short for\nPPMS Utility Management API) for fetching information from the booking system as well as\nchanging its state and properties.\n\nThis is a Python 3 package for talking to the *PUMAPI*.\n\n## Usage Example\n\nFetch email addresses of all active users:\n\n```Python\nfrom pyppms import ppms\nfrom credentials_ppms import PPMS_URL, PPMS_API_KEY\n\nconn = ppms.PpmsConnection(PPMS_URL, PPMS_API_KEY)\n\nprint(\"Querying PPMS for emails of active users, can take minutes...\")\nemails = ppms.get_users_emails(active=True)\nprint(f\"Got {len(emails)} email addresses from PPMS:\")\nprint(\"\\n\".join(emails))\n```\n\n## Testing\n\nAutomated testing is described in the [`TESTING` document on github][2].\n\n## Note\n\nThe PPMS API sometimes exposes a bit of a surprising behavior. During\ndevelopment of the package, we came across several issues (this list is\ncertainly incomplete):\n\n* HTTP status return code is always `200`, even on failed authentication.\n* Results of queries are a mixture of CSV (with headers) and and text with\n  newlines (with no headers and therefore without structural information on\n  the data). JSON is implemented in some cases only.\n* The CSV headers sometimes do contain spaces between the colons, sometimes\n  they don't.\n* Some fields are quoted in the CSV output, some are not. Difficult to separate\n  the values since there are colons in the values too.\n* Semantics of keys is not consistent. Sometimes `user` is the user id,\n  sometimes it refers to the user's full name.\n* Using an invalid permission level (e.g. `Z`) with the `setright` action is\n  silently ignored by PUMAPI, the response is still `done` even though this\n  doesn't make any sense.\n* There is no (obvious) robust way to derive the user id from the user's full\n  name that is returned e.g. by `getrunningsheet`, making it very hard to\n  cross-reference it with data from `getuser`.\n* The result of the `getrunningsheet` query in general is not suited very well\n  for automated processing, it seems to be rather tailored for humans and\n  subject to (mis-) interpretation.\n* Unfortunately `Username` and `Systemname` are not the unique id, they are\n  rather the full description. Therefore sometimes looping over all users and\n  systems is necessary.\n* Some results have a very strange format - for example, the starting time of\n  the next booking is given as *minutes from now* instead of an absolute time.\n* Official documentation is rather rudimentary, i.e. it contains almost no\n  information on what is returned in case wrong / invalid parameters are\n  supplied and similar situations.\n\n## References\n\n* [Imagopole PPMS Java client][1]\n\n[1]: https://github.com/imagopole/ppms-http-client/blob/master/src/main/java/org/imagopole/ppms/api/PumapiRequest.java\n[2]: https://github.com/imcf/pyppms/blob/master/TESTING.md\n[3]: https://www.stratocore.com/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimcf%2Fpyppms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimcf%2Fpyppms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimcf%2Fpyppms/lists"}