{ "info": { "author": "beda.software", "author_email": "aidbox@beda.software", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "[![Build Status](https://travis-ci.org/beda-software/aidbox-py.svg?branch=master)](https://travis-ci.org/beda-software/aidbox-py)\n[![codecov](https://codecov.io/gh/beda-software/aidbox-py/branch/master/graph/badge.svg)](https://codecov.io/gh/beda-software/aidbox-py)\n[![pypi](https://img.shields.io/pypi/v/aidbox.svg)](https://pypi.python.org/pypi/aidbox)\n\n# aidbox-py\nAidbox client for python.\nThis package provides an API for CRUD operations over aidbox resources\n\n# API\n\nTo obtain token by email and password use static method:\n`Aidbox.obtain_token(url, email, password)`\n\nTo create Aidbox instance use:\n\n`Aidbox(url, authorization)`\n\nReturns an instance of the connection to the aidbox server which provides:\n* .reference(resource_type, id, **kwargs) - returns `AidboxReference` to the resource\n* .resource(resource_type, **kwargs) - returns `AidboxResource` which described below\n* .resources(resource_type) - returns `AidboxSearchSet`\n\n`AidboxResource`\n\nprovides:\n* .save() - creates or updates resource instance\n* .delete() - deletes resource instance\n* .to_reference(**kwargs) - returns `AidboxReference` for this resource\n* setattr/getattr using dot operator\n\n`AidboxReference`\n\nprovides:\n* .to_resource() - returns `AidboxResource` for this reference\n\n`AidboxSearchSet`\n\nprovides:\n* .search(param=value)\n* .limit(count)\n* .page(page)\n* .sort(*args)\n* .execute() - makes query to the server and returns a list of `AidboxResource`\n* .first() - returns `AidboxResource` or None\n* .get(id=id) - returns `AidboxResource` or raises `AidboxResourceNotFound`\n\n# Usage\n\nCreate an instance\n```python\nab = Aidbox(url='http://path-to-fhir-server', authorization='Bearer TOKEN')\n```\n\nFetch list of resource's instances\n```python\nresources = ab.resources('Patient') # Return lazy search set\nresources = resources.search(name='John').limit(10).page(2).sort('name')\n\nresources.execute() # Returns list of AidboxResource\n```\n\nGet the particular instance of resource\n```python\nres = ab.resources('Entity').get(id='ID')\n```\n\nCreate new resource's instance\n```python\nres = ab.resource('Entity')\nres.name = 'Chat'\nres.save() # Creates new instance\n\nres.name = 'Chat2'\nres.save() # Updates the instance\n\nres.delete() # Deletes the instance\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/beda-software/aidbox-py", "keywords": "aidbox", "license": "", "maintainer": "", "maintainer_email": "", "name": "aidbox", "package_url": "https://pypi.org/project/aidbox/", "platform": "", "project_url": "https://pypi.org/project/aidbox/", "project_urls": { "Homepage": "http://github.com/beda-software/aidbox-py" }, "release_url": "https://pypi.org/project/aidbox/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Aidbox client for python", "version": "0.2.0" }, "last_serial": 4085719, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "88c517f68a8699dece118f7caf422d97", "sha256": "04d60c4985b95b1cb9726a903a5642ef2c7c7ae8d594e6e6e4977c097dcfae2a" }, "downloads": -1, "filename": "aidbox-0.1.0.tar.gz", "has_sig": false, "md5_digest": "88c517f68a8699dece118f7caf422d97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6097, "upload_time": "2018-06-22T05:37:09", "url": "https://files.pythonhosted.org/packages/4a/4a/67ec956c537fa62d1343c587b5d46d544a9f0e994665e5bdb88ed9f6cb07/aidbox-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "72c32f1f6ebd2dfd2964bad53aa16012", "sha256": "a7a1d868a98073e6fbd0fd2660d22da0682fcec89f07113f7ffa079060a530f7" }, "downloads": -1, "filename": "aidbox-0.1.1.tar.gz", "has_sig": false, "md5_digest": "72c32f1f6ebd2dfd2964bad53aa16012", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5844, "upload_time": "2018-06-22T05:50:00", "url": "https://files.pythonhosted.org/packages/ba/af/e627cabde259c0a4872608ea83c549fa8c023193340227dcb3f874d11ed4/aidbox-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2067e78db476d16bdac2af7c9d68f05d", "sha256": "7ebc25e89649729b5d2ec039d5361e66c73ee135080fea428fcf15be32ba8c09" }, "downloads": -1, "filename": "aidbox-0.1.2.tar.gz", "has_sig": false, "md5_digest": "2067e78db476d16bdac2af7c9d68f05d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5838, "upload_time": "2018-06-22T07:39:43", "url": "https://files.pythonhosted.org/packages/e5/2b/aa4e4be2070c97df2552ed3e9217f5e8f867afa61099df8848942ffaaace/aidbox-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "e1f52bb194c6f734b8c460a30d8538ef", "sha256": "6012da87c82df6d2731848963aefb39a13fdfd28046848fbcfb8dea9e58112eb" }, "downloads": -1, "filename": "aidbox-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e1f52bb194c6f734b8c460a30d8538ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5823, "upload_time": "2018-07-20T13:09:01", "url": "https://files.pythonhosted.org/packages/40/0b/4b10801d13cbae1b839f05916354f8f269edba5221cf6e698267cbb4b76b/aidbox-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e1f52bb194c6f734b8c460a30d8538ef", "sha256": "6012da87c82df6d2731848963aefb39a13fdfd28046848fbcfb8dea9e58112eb" }, "downloads": -1, "filename": "aidbox-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e1f52bb194c6f734b8c460a30d8538ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5823, "upload_time": "2018-07-20T13:09:01", "url": "https://files.pythonhosted.org/packages/40/0b/4b10801d13cbae1b839f05916354f8f269edba5221cf6e698267cbb4b76b/aidbox-0.2.0.tar.gz" } ] }