{ "info": { "author": "Roberto Rosario", "author_email": "roberto.rosario@mayan-edms.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: ISC License (ISCL)", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "===============================\nMayan API Client\n===============================\n\n.. image:: https://img.shields.io/pypi/v/mayan_api_client.svg\n :target: https://pypi.python.org/pypi/mayan_api_client\n\nPython client for the Mayan EDMS REST API.\n\n* Free software: ISC license\n\nInstallation\n------------\n\nInstall from PyPI::\n\n pip install mayan-api_client\n\n\nUsage\n-----\n\nThis is a thin wrapper of the `slumber` API client. Use the\n.. nomeclature.\n\nExamples::\n\n from mayan_api_client import API\n\n api = API(host='http://127.0.0.1:8000', username='admin', password='password')\n\nShow general information of the connected Mayan EDMS server::\n\n api._info\n\n {u'contact': u'roberto.rosario@mayan-edms.com',\n u'description': u'Free Open Source Document Management System.',\n u'license': u'Apache 2.0',\n u'licenseUrl': u'http://www.apache.org/licenses/LICENSE-2.0.html',\n u'title': u'Mayan EDMS API Documentation'}\n\nShow a list of all available apps::\n\n api._apps\n\n [u'checkouts',\n u'document_indexing',\n u'documents',\n u'dynamic_search',\n u'folders',\n u'metadata',\n u'ocr',\n u'permissions',\n u'rest',\n u'sources',\n u'tags',\n u'user_management']\n\nCreate a document type::\n\n api.documents.document_types.post({'label': 'new document type'})\n\n {u'delete_time_period': 30,\n u'delete_time_unit': u'days',\n u'documents': u'http://127.0.0.1:8000/api/documents/document_types/2/documents/',\n u'documents_count': 0,\n u'id': 2,\n u'label': u'new document type',\n u'trash_time_period': None,\n u'trash_time_unit': None,\n u'url': u'http://127.0.0.1:8000/api/documents/document_types/2/'}\n\nUpload a new document::\n\n with open('/tmp/test_document.pdf') as file_object:\n response = api.documents.documents.post({'document_type': 2}, files={'file': file_object})\n\n print response\n\n {u'label': u'test_document.pdf', u'document_type': 2, u'description': u'', u'language': u'eng', u'id': 2}\n\nGet a list of all documents::\n\n api.documents.documents.get()\n\n {u'count': 1,\n u'next': u'http://127.0.0.1:8000/api/documents/documents/?page=2',\n u'previous': None,\n u'results': [{u'date_added': u'2016-02-02T23:06:44.880732Z',\n u'description': u'',\n u'document_type': u'http://127.0.0.1:8000/api/documents/document_types/2/',\n u'document_type_label': u'Default',\n u'id': 2,\n u'label': u'test_document.pdf',\n u'language': u'eng',\n u'latest_version': {u'checksum': u'452a6e59f3320f99bfe88b5f7efb0b9323df20457c19c320efce2b9404b96d82',\n u'comment': u'',\n u'document': u'http://127.0.0.1:8000/api/documents/documents/2/',\n u'encoding': u'binary',\n u'file': u'1a8b87de-bca9-416a-beb2-49d817625d56',\n u'mimetype': u'application/pdf',\n u'pages': [{u'document_version': u'http://127.0.0.1:8000/api/documents/document_version/2/',\n u'image': u'http://127.0.0.1:8000/api/documents/document_page/2/image/',\n u'page_number': 1,\n u'url': u'http://127.0.0.1:8000/api/documents/document_page/2/'}],\n u'revert': u'http://127.0.0.1:8000/api/documents/document_version/2/revert/',\n u'timestamp': u'2016-02-02T23:06:45.318494Z',\n u'url': u'http://127.0.0.1:8000/api/documents/document_version/2/'},\n u'url': u'http://127.0.0.1:8000/api/documents/documents/2/',\n u'uuid': u'b1973f42-41f2-41e7-b812-07fa929689ec',\n u'versions': u'http://127.0.0.1:8000/api/documents/documents/19/versions/'},]\n }\n\nGet second page of a list of all documents::\n\n api.documents.documents.get(page=2)\n\nGet documents by id::\n\n api.documents.documents(2).get()\n\nAdd a document to a folder::\n\n api.folders.folders(1).documents.post({'document': 2})\n\n {u'document': 2}\n\nCredits\n---------\n\nRoberto Rosario\n\n\n=======\nHistory\n=======\n\n0.5.0 (2016-1-22)\n------------------\n\n* Initial release.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rosarior/mayan_api_client", "keywords": "mayan_api_client", "license": "ISCL", "maintainer": null, "maintainer_email": null, "name": "mayan-api_client", "package_url": "https://pypi.org/project/mayan-api_client/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mayan-api_client/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/rosarior/mayan_api_client" }, "release_url": "https://pypi.org/project/mayan-api_client/0.5.0/", "requires_dist": null, "requires_python": null, "summary": "Python client for the Mayan EDMS REST API.", "version": "0.5.0" }, "last_serial": 1936573, "releases": { "0.5.0": [ { "comment_text": "", "digests": { "md5": "0eb91abd58fc60ba1939b376691a76ee", "sha256": "b8a4d2ea9c39bf35706ee322434c9ebb1a269ab6d5a809f3eaea002d19690f52" }, "downloads": -1, "filename": "mayan_api_client-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0eb91abd58fc60ba1939b376691a76ee", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6340, "upload_time": "2016-02-02T23:38:17", "url": "https://files.pythonhosted.org/packages/3e/b5/91565306d33614c476f3fc8fe08c995c6694ebfe09b1de86a07d9c23ce4e/mayan_api_client-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d458b9992f406295af59505147afbd94", "sha256": "58d12a4260e860bcb9a92318a531f9b45ebb2adb64f30f5f598ab4d1935e47f0" }, "downloads": -1, "filename": "mayan-api_client-0.5.0.tar.gz", "has_sig": false, "md5_digest": "d458b9992f406295af59505147afbd94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6231, "upload_time": "2016-02-02T23:37:53", "url": "https://files.pythonhosted.org/packages/b1/f0/a7db473eaceaf42ad8f437e18f274001abfe99ca6d751a973297c490e2c8/mayan-api_client-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0eb91abd58fc60ba1939b376691a76ee", "sha256": "b8a4d2ea9c39bf35706ee322434c9ebb1a269ab6d5a809f3eaea002d19690f52" }, "downloads": -1, "filename": "mayan_api_client-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0eb91abd58fc60ba1939b376691a76ee", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6340, "upload_time": "2016-02-02T23:38:17", "url": "https://files.pythonhosted.org/packages/3e/b5/91565306d33614c476f3fc8fe08c995c6694ebfe09b1de86a07d9c23ce4e/mayan_api_client-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d458b9992f406295af59505147afbd94", "sha256": "58d12a4260e860bcb9a92318a531f9b45ebb2adb64f30f5f598ab4d1935e47f0" }, "downloads": -1, "filename": "mayan-api_client-0.5.0.tar.gz", "has_sig": false, "md5_digest": "d458b9992f406295af59505147afbd94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6231, "upload_time": "2016-02-02T23:37:53", "url": "https://files.pythonhosted.org/packages/b1/f0/a7db473eaceaf42ad8f437e18f274001abfe99ca6d751a973297c490e2c8/mayan-api_client-0.5.0.tar.gz" } ] }