{ "info": { "author": "Peter Stein", "author_email": "peter.stein@cern.ch", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)" ], "description": "[![Build Status](https://travis-ci.com/ptrstn/runregistryclient.svg?branch=master)](https://travis-ci.com/ptrstn/runregistryclient)\n[![codecov](https://codecov.io/gh/ptrstn/runregistryclient/branch/master/graph/badge.svg)](https://codecov.io/gh/ptrstn/runregistryclient)\n[![](https://img.shields.io/pypi/v/runregistryclient.svg)](https://pypi.org/project/runregistryclient/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n# CERN CMS Run Registry client\n\nA Python client for the [new RunRegistry](https://cmsrunregistry.web.cern.ch/). \nA Python client for the [old RunRegistry](https://cmswbmoffshift.web.cern.ch/cmswbmoffshift/runregistry_offline/index.jsf) can be found [here](https://github.com/ptrstn/runregcrawlr/tree/master/runregcrawlr).\n\n## Installation\n\n```bash\npip install runregistryclient\n```\n## Prerequisites\n\nSince mai 2019 the run registry requires authenticaion with a CERN user account.\nTherefore you need to setup your CERN Grid User Certificate as instructed in the cernrequests package:\n\nSee: [https://github.com/ptrstn/cernrequests#prerequisites](https://github.com/ptrstn/cernrequests#prerequisites)\n\n\n## Usage\n\n### Example \n\nIf you want a single run, do this:\n\n```python\nimport runreg\n\nrunreg.get(run_number=327600)\n```\n\nIf you prefer a non-nested JSON output, use the ```flat=True``` parameter.\n\n```python\nimport runreg\n\nrunreg.get(run_number=327600, flat=True)\n```\n\n```runreg``` assumes the *tracker* workspace by default. \nIf you want to change it, you can do so by specifying the ```workspace``` attribute:\n\n```python\nimport runreg\n\nrunreg.get(run_number=327600, workspace=\"global\")\n```\n\n#### Multiple filters at once\n\nIf you want to use several filters at once, for example, to filter according to a sequence number range with certain criteria, you can do it this way:\n\n```python\nimport runreg\n\nrunreg.get(run_number=[(327596, \">=\"), (327744, \"lte\")], name=(\"%Cosmics%\", \"like\"))\n```\n\nOr if you prefer [Django like](https://docs.djangoproject.com/en/dev/topics/db/queries/#field-lookups) lookup fields:\n\n```python\nimport runreg\n\nrunreg.get(run_number__gte=327596, run_number__lte=327744, name__like=\"%Cosmics%\")\n```\n\n\n### Operators\n\nFollowing operators are supported:\n\n* ```=``` or ```eq``` (assumed per default)\n* ```>=``` or ```gte```\n* ```>``` or ```gt```\n* ```<=``` or ```lte```\n* ```<``` or ```lt```\n* ```like```\n\nThe operators should be specified as the second element of a (value, operator) tuple such as ```(321123, \"<=\")```.\n\n### Attributes\n\nAll available attributes can be found in the ```docs``` folder under ```attributes.md```.\n\n## Development\n\nPython version *3.5* or higher is required.\n\nIf you want to improve this software, you should follow these steps:\n\n```bash\ngit clone https://github.com/ptrstn/runregistryclient\ncd runregistryclient\npython -m venv venv\n. venv/bin/activate\npip install -e .\npip install -r testing-requirements.txt\n```\n\n### Running Tests\n\n```\npytest --cov .\n```\n\n## FAQ\n\n### How do you filter by subcomponent status?\n\nIf you want to filter for subcomponent states such as *Pixel* or *SiStrip*, you must use the attribute names specified in the RunRegistry API.\nUnfortunately, they contain \"-\" and \".\" characters, so you need to use a little trick.\n\nFor example, to filter for the ```Track``` ```Status``` in the workspace ```Tracker``` then you need to do:\n\n```python\nimport runreg\n\nrunreg.get(**{\"tracker-track.status\": \"GOOD\"})\n```\n\nYou can still combine this with other attributes and options:\n\n```python\nimport runreg\n\nrunreg.get(flat=True, run_number=[(327596, \">=\"), (327744, \"lte\")], **{\"pix.status\": \"EXCLUDED\", \"strip.status\":\"GOOD\"})\n```\n\n### Whats the difference between tracker-track and track?\n\n```track``` is used for the *global* workspace, while ```tracker-track``` uses the *tracker* workspace. \nThe same is true for ```tracker-pix``` / ```pix``` and ```tracker-strip``` / ```strip```.\n\n### Does this work with Python 2.7?\n\nNo.\n\n## References\n\n* https://cmsrunregistry.web.cern.ch/\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/ptrstn/runregistryclient", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "runregistryclient", "package_url": "https://pypi.org/project/runregistryclient/", "platform": "", "project_url": "https://pypi.org/project/runregistryclient/", "project_urls": { "Homepage": "https://github.com/ptrstn/runregistryclient" }, "release_url": "https://pypi.org/project/runregistryclient/0.3.0/", "requires_dist": [ "requests", "cernrequests" ], "requires_python": "", "summary": "", "version": "0.3.0" }, "last_serial": 5272477, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "675f04a0164fd9873d4ffdc26c1b66a3", "sha256": "13aaf5a33e656f4e1010049a24e2c07809cf14c631e28d43847e1ea6f7a4265e" }, "downloads": -1, "filename": "runregistryclient-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "675f04a0164fd9873d4ffdc26c1b66a3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16002, "upload_time": "2019-02-15T09:07:34", "url": "https://files.pythonhosted.org/packages/0f/3d/15229474d2fc2fc95ece35ea136ee165df38f8d5f8dfa37f1d292074c354/runregistryclient-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8adb28d16f346587ec1ee9f2c6b584c5", "sha256": "22f96ec0cbb3d58d43921064ac9bd6fc1617a91be939232fb8e3291e200bd898" }, "downloads": -1, "filename": "runregistryclient-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8adb28d16f346587ec1ee9f2c6b584c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3842, "upload_time": "2019-02-15T09:07:36", "url": "https://files.pythonhosted.org/packages/c2/eb/72187aad9c5abca909440591f1b67ebd2b3d9c5c8753e27b3263b0f51b53/runregistryclient-0.1.0.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "ea08bed02d84f16356b09cbd57a5146b", "sha256": "06b40e6a6870173e46ccdc9b8f826e5be9691d29849edf81d4303524ac3a09a1" }, "downloads": -1, "filename": "runregistryclient-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ea08bed02d84f16356b09cbd57a5146b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17446, "upload_time": "2019-02-15T09:27:15", "url": "https://files.pythonhosted.org/packages/92/fc/c04bc3afc20bd8544c16283eb0f3a6a6a1cfd08f2a81c973fd6d9110c64a/runregistryclient-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e44838b5163556e73239089ecd288bc7", "sha256": "811b1e750e22ba92aca645cc5f7155df8b10d26278958d9cac4f9173feca18c3" }, "downloads": -1, "filename": "runregistryclient-0.1.2.tar.gz", "has_sig": false, "md5_digest": "e44838b5163556e73239089ecd288bc7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4393, "upload_time": "2019-02-15T09:27:16", "url": "https://files.pythonhosted.org/packages/11/64/feeef9ddced3b3b90e1f633ee4787528deb0be3080df6e28626f8daac670/runregistryclient-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "25333ac46fe72911a892fb3e67705fa3", "sha256": "e0fb953f9f3afe082e3584272c24233307e63de44908d787af9f81bbc88e11cc" }, "downloads": -1, "filename": "runregistryclient-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "25333ac46fe72911a892fb3e67705fa3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17849, "upload_time": "2019-02-19T13:00:06", "url": "https://files.pythonhosted.org/packages/57/de/c53c81da48b16de786d08b86ffecae0bce814b5bf4132b843bcb78efd988/runregistryclient-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5d757ea004a01bb116fac81ca154b49", "sha256": "a16d2fa5cb3380d381465757427b610271393d47f8bb6232366a3dadb8599987" }, "downloads": -1, "filename": "runregistryclient-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e5d757ea004a01bb116fac81ca154b49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4761, "upload_time": "2019-02-19T13:00:08", "url": "https://files.pythonhosted.org/packages/2f/5e/4c1c555ebf4180941e84cbde50b89a732f6155ea07d1ba0256f90ea8f1bf/runregistryclient-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "ea1c9ebd2c730defe404a686ff0a4e6d", "sha256": "53d82eda47ab4c57862f2eabc73a0db3a930919e6c5851566505cb60347eb22a" }, "downloads": -1, "filename": "runregistryclient-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ea1c9ebd2c730defe404a686ff0a4e6d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17855, "upload_time": "2019-02-20T15:17:55", "url": "https://files.pythonhosted.org/packages/6e/82/6a2bddd71c81c1c6064fe7689e9b37d775c59b954466b3762692c1408954/runregistryclient-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c85419447b95683eadef939804552b23", "sha256": "ffbf23a781e387499b651d847737394fe9878486e0a40ddaf7926044f102467d" }, "downloads": -1, "filename": "runregistryclient-0.2.1.tar.gz", "has_sig": false, "md5_digest": "c85419447b95683eadef939804552b23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4777, "upload_time": "2019-02-20T15:17:58", "url": "https://files.pythonhosted.org/packages/14/61/a6302ffdb8e6836edc26218273740386ff3c7155a60b15d9394ba9aee29e/runregistryclient-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "fce756acc8a00fe09834e19cf29d3785", "sha256": "346a950a11b7dcbeb7acec0f0e58b768333afe73b80621d61a68bb2262a59d56" }, "downloads": -1, "filename": "runregistryclient-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "fce756acc8a00fe09834e19cf29d3785", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18067, "upload_time": "2019-05-15T13:08:17", "url": "https://files.pythonhosted.org/packages/d5/bc/f8b0da78cf14ab81218ddb2e693ab3216c4c517e38446e350bf17134c714/runregistryclient-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "396a99a4fb4da60ec6fb7294a78319bc", "sha256": "c70cfc0835e18fca5e218402847d3609774c7c0cd6369ce0ac2e7081f168962e" }, "downloads": -1, "filename": "runregistryclient-0.3.0.tar.gz", "has_sig": false, "md5_digest": "396a99a4fb4da60ec6fb7294a78319bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5018, "upload_time": "2019-05-15T13:08:21", "url": "https://files.pythonhosted.org/packages/54/bb/b5e8096c2893b126d292df343a7d849310226b628eed3b44e24a1bc776b4/runregistryclient-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fce756acc8a00fe09834e19cf29d3785", "sha256": "346a950a11b7dcbeb7acec0f0e58b768333afe73b80621d61a68bb2262a59d56" }, "downloads": -1, "filename": "runregistryclient-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "fce756acc8a00fe09834e19cf29d3785", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18067, "upload_time": "2019-05-15T13:08:17", "url": "https://files.pythonhosted.org/packages/d5/bc/f8b0da78cf14ab81218ddb2e693ab3216c4c517e38446e350bf17134c714/runregistryclient-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "396a99a4fb4da60ec6fb7294a78319bc", "sha256": "c70cfc0835e18fca5e218402847d3609774c7c0cd6369ce0ac2e7081f168962e" }, "downloads": -1, "filename": "runregistryclient-0.3.0.tar.gz", "has_sig": false, "md5_digest": "396a99a4fb4da60ec6fb7294a78319bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5018, "upload_time": "2019-05-15T13:08:21", "url": "https://files.pythonhosted.org/packages/54/bb/b5e8096c2893b126d292df343a7d849310226b628eed3b44e24a1bc776b4/runregistryclient-0.3.0.tar.gz" } ] }