{ "info": { "author": "teffalump", "author_email": "chris@teffalump.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only" ], "description": "# beren\n\n[![PyPI version](https://badge.fury.io/py/beren.svg)](https://badge.fury.io/py/beren)\n\n`beren` provides a REST client for [Orthanc](https://www.orthanc-server.com), an open-source DICOM server.\n\nBuilt using the excellent [apiron](https://github.com/ithaka/apiron) library.\n\n### Install\n\nUse pip:\n\n pip install beren\n\n### How to use\n\nImport the client and provide the server details\n\n from beren import Orthanc\n orthanc = Orthanc('https://example-orthanc-server.com')\n\n # Patient endpoints\n orthanc.get_patients()\n orthanc.get_patient(id)\n ...and so on\n\n # Study endpoints\n orthanc.get_studies()\n orthanc.get_study(id)\n ...and so on\n\n # Series endpoints\n orthanc.get_series()\n orthanc.get_one_series(id)\n ...and so on\n\n # Instance endpoints\n orthanc.get_instances()\n orthanc.get_instance(id)\n ...and so on\n\n # Get changes\n orthanc.get_changes()\n\n # Find objects by query\n query = {'PatientName': 'Jon*'}\n orthanc.find(query, level='Patient', expand=False, limit=2)\n\n # Get previous queries\n orthanc.get_queries()\n\nThere are many other preconfigured endpoints.\n\n### Authentication\n\nMany servers require authentication to utilize their API. Simply provide a valid authentication object when defining the client:\n\n from requests.auth import HTTPBasicAuth\n auth = HTTPBasicAuth('orthanc', 'orthanc')\n orthanc = Orthanc('https://test.server.com', auth=auth)\n\nTo override the default authentication, provide a new authentication object when calling the endpoint:\n\n new_auth = HTTPBasicAuth('new_user', 'new_password')\n orthanc.get_patients(auth=auth)\n\n### Advanced Configuration\n\n#### Timeouts\n\nSome servers are slow (and some methods can be slow). For example, asking for all instances from a server can cause a timeout before the server responds. To\nmodify the timeout settings, use `apiron`'s `Timeout` class:\n\n from apiron import Timeout\n t = Timeout(read_timeout=6, connection_timeout=1) # Modify the timeout\n\n from beren import Orthanc\n orthanc = Orthanc('https://example-orthanc-server.com')\n orthanc.get_instances(timeout_spec=t) # Use new timeout\n\nIncrease the read timeout if the endpoint is slow. Increase the connection timeout for slow servers.\n\n#### Disable Certificate Checks\n\nTo disable TLS certificate checking, use sessions:\n\n import requests\n session = requests.sessions.Session() # New session\n session.verify = False # Disable certificate checking\n\n from beren import Orthanc\n orthanc = Orthanc('https://example-orthanc-server.com')\n orthanc.get_patients(session=session) # Use session\n\n#### Non-HTTPS endpoints\n\nThe client will warn when using HTTP endpoints. Medical data is particularly sensitive, consequently, strongly consider using HTTPS.\n\nYou can disable the warning using the `warn_insecure` argument:\n\n from beren import Orthanc\n orthanc = Orthanc('http://insecure.endpoint.com', warn_insecure=False)\n\n### Examples\n\nTo save an instance file to the local directory:\n\n from beren import Orthanc\n orthanc = Orthanc('https://example-orthanc-server.com')\n\n with open('test_file.dcm', 'wb') as dcm:\n for chunk in orthanc.get_instance_file():\n dcm.write(chunk)\n\nTo get an archive of a series (DCM files in a zip file):\n\n from beren import Orthanc\n orthanc = Orthanc('https://example-orthanc-server.com')\n\n with open('test.zip', 'wb') as z:\n for chunk in orthanc.get_series_archive():\n z.write(chunk)\n\n### Further help\n\n- [apiron](https://github.com/ithaka/apiron)\n- [Orthanc documentation](https://book.orthanc-server.com)\n- [Orthanc OpenAPI](https://api.orthanc-server.com)\n- [Orthanc REST API spreadsheet](https://docs.google.com/spreadsheets/d/1muKHMIb9Br-59wfaQbDeLzAfKYsoWfDSXSmyt6P4EM8/pubhtml#)\n\n### Future goals\n\n- Asynchronous requests\n- Document every function\n- Better test coverage\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/teffalump/beren", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "beren", "package_url": "https://pypi.org/project/beren/", "platform": "", "project_url": "https://pypi.org/project/beren/", "project_urls": { "Homepage": "https://github.com/teffalump/beren" }, "release_url": "https://pypi.org/project/beren/0.7.1/", "requires_dist": [ "apiron (==6.0.0)" ], "requires_python": "", "summary": "REST client for Orthanc DICOM servers", "version": "0.7.1", "yanked": false, "yanked_reason": null }, "last_serial": 10880179, "releases": { "0.6.0": [ { "comment_text": "", "digests": { "md5": "095b83f2551db4afbde08700fb979f5c", "sha256": "4a0e8aa398a7c55ecccb581e42b424b8c1b56003e39e38a4b7a14ca35ead6780" }, "downloads": -1, "filename": "beren-0.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "095b83f2551db4afbde08700fb979f5c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16330, "upload_time": "2019-10-18T00:43:44", "upload_time_iso_8601": "2019-10-18T00:43:44.429747Z", "url": "https://files.pythonhosted.org/packages/6c/69/9410f02b0f9287b5f70f4aeba81d9c189d9b1278389810fb3e55507206d6/beren-0.6.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "c3cfdb1d097ea736919ed370d4bc1bfb", "sha256": "c8d5e20d390ba9a72c9469633db56f9363285eeeac7920afc95dba49adeba847" }, "downloads": -1, "filename": "beren-0.6.0.tar.gz", "has_sig": false, "md5_digest": "c3cfdb1d097ea736919ed370d4bc1bfb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24312, "upload_time": "2019-10-18T00:43:46", "upload_time_iso_8601": "2019-10-18T00:43:46.982160Z", "url": "https://files.pythonhosted.org/packages/0a/ae/5ea433a49839a8c1c2892690f223ae5388b5713ba75992f5a2089ae3a3cb/beren-0.6.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "133e5153f347a17649f50c7ec6552411", "sha256": "a1c12a518287e4c214be7034aa9313c2e8ce635ab86f8cd35d6f55dacf88224c" }, "downloads": -1, "filename": "beren-0.6.1-py3-none-any.whl", "has_sig": false, "md5_digest": "133e5153f347a17649f50c7ec6552411", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16330, "upload_time": "2019-10-18T01:08:51", "upload_time_iso_8601": "2019-10-18T01:08:51.633954Z", "url": "https://files.pythonhosted.org/packages/c7/19/8ec32a8f7f42e883465311f7c53008dd5c063ba9eaaa749c966a66352ff5/beren-0.6.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "71c5d523350c34070e89080e9c763a24", "sha256": "5bf6bbe3630cb70525b904445589f1847b40618b60141fdadfd81a497dec838e" }, "downloads": -1, "filename": "beren-0.6.1.tar.gz", "has_sig": false, "md5_digest": "71c5d523350c34070e89080e9c763a24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24320, "upload_time": "2019-10-18T01:08:53", "upload_time_iso_8601": "2019-10-18T01:08:53.123803Z", "url": "https://files.pythonhosted.org/packages/a7/63/7ce33044a058c8d45b9ece9a9136711c706fb6e5440c4f2e711a2a665b3f/beren-0.6.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "7eee6c53343fda2900e4fdbe7bb7fcb7", "sha256": "0ab408e801fe7714c99274bd9c10c81d619b2b81e2f69c8900379bd066df40af" }, "downloads": -1, "filename": "beren-0.6.2-py3-none-any.whl", "has_sig": false, "md5_digest": "7eee6c53343fda2900e4fdbe7bb7fcb7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28734, "upload_time": "2019-10-28T18:11:49", "upload_time_iso_8601": "2019-10-28T18:11:49.314782Z", "url": "https://files.pythonhosted.org/packages/7d/87/12712de14b971645151397a27558d6d9af154f60a1cb515c8c057b3cf43b/beren-0.6.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "595d751d1d794099515af769586c2e5c", "sha256": "96b6fd6b40533e576b0d7bd4a66dc59bffb6ac75452fe84370e61f62530a6a2a" }, "downloads": -1, "filename": "beren-0.6.2.tar.gz", "has_sig": false, "md5_digest": "595d751d1d794099515af769586c2e5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24345, "upload_time": "2019-10-28T18:11:50", "upload_time_iso_8601": "2019-10-28T18:11:50.566783Z", "url": "https://files.pythonhosted.org/packages/63/f8/8f99a93a1ddf35bad292d6b4a2a1f69a5ff6cbc038e35229a9dfa1812f13/beren-0.6.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "d1c55115a33cba011070621091b85c10", "sha256": "848d93357795dc569cfab0f0001d1556c8edc7b4f69708986922bc4044cd1ad7" }, "downloads": -1, "filename": "beren-0.7.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d1c55115a33cba011070621091b85c10", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 29866, "upload_time": "2020-07-26T20:58:56", "upload_time_iso_8601": "2020-07-26T20:58:56.538804Z", "url": "https://files.pythonhosted.org/packages/0f/53/1c3b4219075ba8fc5e9744183741028514401237210d3e2337cb22734a50/beren-0.7.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "fc05cbf8e9b321e9fc45b9310b8ce8c6", "sha256": "eeb13ec419394ac71ba1679922c3b373059eaa2722e8fd4542ea7b8d1d6f75ec" }, "downloads": -1, "filename": "beren-0.7.0.tar.gz", "has_sig": false, "md5_digest": "fc05cbf8e9b321e9fc45b9310b8ce8c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26511, "upload_time": "2020-07-26T20:58:59", "upload_time_iso_8601": "2020-07-26T20:58:59.442777Z", "url": "https://files.pythonhosted.org/packages/cf/d9/5dd489546699c15dd6bbd4439a8175b6dd49c3c77d6f623e60eba86da705/beren-0.7.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "382c49aa4b2c3b1e3f7dea192f3463b1", "sha256": "4822e300cc1c0871971b13f3c5901b1c961e8dba845953fe535683be4f941395" }, "downloads": -1, "filename": "beren-0.7.1-py3-none-any.whl", "has_sig": false, "md5_digest": "382c49aa4b2c3b1e3f7dea192f3463b1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 29898, "upload_time": "2021-07-11T21:29:49", "upload_time_iso_8601": "2021-07-11T21:29:49.925884Z", "url": "https://files.pythonhosted.org/packages/20/0d/1382c7271d219751cbf2dc6a5439177d4791f99fac8db2d49166b7340ce4/beren-0.7.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "3f2c9e48314a755e07189c1648a72136", "sha256": "50e40cb1d0ce2dc38676f437d050c9d059f0a648cbd91876bd587a7ea88a7077" }, "downloads": -1, "filename": "beren-0.7.1.tar.gz", "has_sig": false, "md5_digest": "3f2c9e48314a755e07189c1648a72136", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26088, "upload_time": "2021-07-11T21:29:50", "upload_time_iso_8601": "2021-07-11T21:29:50.909112Z", "url": "https://files.pythonhosted.org/packages/b4/6e/7287fe9c2dc9583cab45e19d99d0780665883aa95eaaeff3274da8ed0d05/beren-0.7.1.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "382c49aa4b2c3b1e3f7dea192f3463b1", "sha256": "4822e300cc1c0871971b13f3c5901b1c961e8dba845953fe535683be4f941395" }, "downloads": -1, "filename": "beren-0.7.1-py3-none-any.whl", "has_sig": false, "md5_digest": "382c49aa4b2c3b1e3f7dea192f3463b1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 29898, "upload_time": "2021-07-11T21:29:49", "upload_time_iso_8601": "2021-07-11T21:29:49.925884Z", "url": "https://files.pythonhosted.org/packages/20/0d/1382c7271d219751cbf2dc6a5439177d4791f99fac8db2d49166b7340ce4/beren-0.7.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "3f2c9e48314a755e07189c1648a72136", "sha256": "50e40cb1d0ce2dc38676f437d050c9d059f0a648cbd91876bd587a7ea88a7077" }, "downloads": -1, "filename": "beren-0.7.1.tar.gz", "has_sig": false, "md5_digest": "3f2c9e48314a755e07189c1648a72136", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26088, "upload_time": "2021-07-11T21:29:50", "upload_time_iso_8601": "2021-07-11T21:29:50.909112Z", "url": "https://files.pythonhosted.org/packages/b4/6e/7287fe9c2dc9583cab45e19d99d0780665883aa95eaaeff3274da8ed0d05/beren-0.7.1.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }