{ "info": { "author": "Don Kim", "author_email": "dgkim5360@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Pyzure-DocumentDB\n=================\n\nA simple python wrapper for the python client of Azure DocumentDB\n\nInstallation\n------------\n\nUsing pip::\n\n pip install pyzure_documentdb\n\nNote: pydocumentdb requires requests of version 2.10.0\n\nUsage\n-----\n\nA credential file containing secret things is needed::\n\n # credentials.py\n DOCUMENTDB_NAME = 'mydocdb'\n DOCUMENTDB_HOST = 'https://mydocdb.documents.azure.com:443/'\n DOCUMENTDB_KEY = '!@#!@#!@#YOUR_SECRET_KEY!@#!@#!@#'\n\nImport and initiate::\n\n import credentials\n from pyzure_docdb.documentdb import DocumentDB\n\n docdb = DocumentDB(credentials)\n\nGet\n~~~\n\nGet a database or a collection with each id::\n\n db = docdb.get_database('mydb')\n coll = docdb.get_collection('mydb', 'mycoll')\n\nGet a single document with a series of id (database - collection - document)::\n\n doc = docdb.get_document('mydb', 'mycoll', 'mydoc')\n\nOr get all documents::\n\n docs = docdb.get_documents('mydb', 'mycoll')\n\nQuery\n~~~~~\nQuery with your custom sql::\n\n sql = 'SELECT * FROM c WHERE c.type=1'\n docs = docdb.query_documents('mydb', 'mycoll', sql)\n\nCreate\n~~~~~~\n\nCreate a database, a collection by its id::\n\n newdb = docdb.create_db('mynewdb')\n newcoll = docdb.create_collection('mynewdb', 'mynewcoll')\n\nCreate a document giving a dictionary::\n\n data = {'field1': 'value1', 'field2': 'value2'}\n newdoc = docdb.create_document('mynewdb', 'mynewcoll', data)\n\nUpsert (update or insert) a document::\n\n doc = docdb.upsert_document('mynewdb', 'mynewcoll', data)\n\nReplace\n~~~~~~~\n\nReplace a document by modifying the original one::\n\n doc = docdb.get_document('mydb', 'mycoll', 'mydoc')\n doc['type'] = 3\n doc.update(another_dict)\n docdb.replace_document(doc)\n\nDelete\n~~~~~~\n\nEmpty a collection by deleting all documents of the collection::\n\n docdb.empty_documents('mydb', 'mycoll')\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dgkim5360/pyzure-documentdb", "keywords": "azure documentdb", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyzure-documentdb", "package_url": "https://pypi.org/project/pyzure-documentdb/", "platform": "", "project_url": "https://pypi.org/project/pyzure-documentdb/", "project_urls": { "Homepage": "https://github.com/dgkim5360/pyzure-documentdb" }, "release_url": "https://pypi.org/project/pyzure-documentdb/0.1.0.dev3/", "requires_dist": [ "pydocumentdb" ], "requires_python": "", "summary": "a python wrapper for the python client of Azure DocumentDB", "version": "0.1.0.dev3" }, "last_serial": 2625460, "releases": { "0.1.0.dev1": [ { "comment_text": "", "digests": { "md5": "e60f3fce01120e1d9af3115f39170994", "sha256": "ca1573023960cfda78e03cf60f0c12d359e69caf40f9efc287f5a985d3892688" }, "downloads": -1, "filename": "pyzure_documentdb-0.1.0.dev1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e60f3fce01120e1d9af3115f39170994", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2999, "upload_time": "2017-02-01T12:17:27", "url": "https://files.pythonhosted.org/packages/a3/b9/36020aff3520e60abff31370365ec6beb10dc009af008d865016ecd1994a/pyzure_documentdb-0.1.0.dev1-py2.py3-none-any.whl" } ], "0.1.0.dev2": [ { "comment_text": "", "digests": { "md5": "6e12bba42049d659a4b8be1eabe3be0b", "sha256": "f432b5d0f8a28b08ba00afd09cfb24f3f323543a6c9550decd14f750ccb2df07" }, "downloads": -1, "filename": "pyzure_documentdb-0.1.0.dev2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6e12bba42049d659a4b8be1eabe3be0b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4385, "upload_time": "2017-02-01T12:48:14", "url": "https://files.pythonhosted.org/packages/85/3a/ceee000778878aa462d5e2ae03e4e14a15d3f9e1043fa8b4f36c13c91218/pyzure_documentdb-0.1.0.dev2-py2.py3-none-any.whl" } ], "0.1.0.dev3": [ { "comment_text": "", "digests": { "md5": "005b6f5aa18e6c84172ee8920974c40c", "sha256": "12ac63f146c67fb2a74acd21a5a1184b31d620f27e76266c66c4c44d87c118ef" }, "downloads": -1, "filename": "pyzure_documentdb-0.1.0.dev3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "005b6f5aa18e6c84172ee8920974c40c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4464, "upload_time": "2017-02-07T15:14:44", "url": "https://files.pythonhosted.org/packages/db/8b/f20bace8cf6a34e205c03a3e520486413ad026c0f1e157cfd306fa5924fc/pyzure_documentdb-0.1.0.dev3-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "005b6f5aa18e6c84172ee8920974c40c", "sha256": "12ac63f146c67fb2a74acd21a5a1184b31d620f27e76266c66c4c44d87c118ef" }, "downloads": -1, "filename": "pyzure_documentdb-0.1.0.dev3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "005b6f5aa18e6c84172ee8920974c40c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4464, "upload_time": "2017-02-07T15:14:44", "url": "https://files.pythonhosted.org/packages/db/8b/f20bace8cf6a34e205c03a3e520486413ad026c0f1e157cfd306fa5924fc/pyzure_documentdb-0.1.0.dev3-py2.py3-none-any.whl" } ] }