{
"info": {
"author": "Ben Greene",
"author_email": "BenJGreene+basex@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable"
],
"description": "A Python Client API for BaseX\r\n=============================\r\n\r\nBaseX is a light-weight, high-performance and scalable XML Database engine and XPath/XQuery 3.1 Processor, which includes full support for the W3C Update and Full Text extensions. An interactive and user-friendly GUI frontend gives you great insight into your XML documents.\r\n\r\nThe Python Client provides access to the BaseX features from within python. This enables records to be read and written from/to BaseX. Full support for FLOWR is provided as well as DB admin features.\r\n\r\n----\r\n\r\nCreating a new database\r\n-----------------------\r\n\r\n.. code:: python\r\n\r\n # -*- coding: utf-8 -*-\r\n # This example shows how new databases can be created.\r\n #\r\n # Documentation: http://docs.basex.org/wiki/Clients\r\n #\r\n # (C) BaseX Team 2005-12, BSD License\r\n\r\n import BaseXClient\r\n\r\n # create session\r\n session = BaseXClient.Session('localhost', 1984, 'admin', 'admin')\r\n\r\n try:\r\n # create new database\r\n session.create(\"database\", \"Hello World!\")\r\n print(session.info())\r\n\r\n # run query on database\r\n print(\"\\n\" + session.execute(\"xquery doc('database')\"))\r\n\r\n # drop database\r\n session.execute(\"drop db database\")\r\n print(session.info())\r\n\r\n finally:\r\n # close session\r\n if session:\r\n session.close()\r\n\r\n\r\n\r\nQuery Example\r\n-------------\r\n\r\n.. code:: python\r\n\r\n # -*- coding: utf-8 -*-\r\n # This example shows how queries can be executed in an iterative manner.\r\n # Iterative evaluation will be slower, as more server requests are performed.\r\n #\r\n # Documentation: http://docs.basex.org/wiki/Clients\r\n #\r\n # (C) BaseX Team 2005-12, BSD License\r\n\r\n import BaseXClient\r\n\r\n # create session\r\n session = BaseXClient.Session('localhost', 1984, 'admin', 'admin')\r\n\r\n try:\r\n # create query instance\r\n input = \"for $i in 1 to 10 return Text { $i }\"\r\n query = session.query(input)\r\n\r\n # loop through all results\r\n for typecode, item in query.iter():\r\n print(\"typecode=%d\" % typecode)\r\n print(\"item=%s\" % item)\r\n\r\n # close query object\r\n query.close()\r\n\r\n finally:\r\n # close session\r\n if session:\r\n session.close()\r\n\r\nAdd Example\r\n-----------\r\n\r\n.. code:: python\r\n\r\n # -*- coding: utf-8 -*-\r\n # This example shows how new databases can be created.\r\n #\r\n # Documentation: http://docs.basex.org/wiki/Clients\r\n #\r\n # (C) BaseX Team 2005-12, BSD License\r\n\r\n import BaseXClient\r\n\r\n # create session\r\n session = BaseXClient.Session('localhost', 1984, 'admin', 'admin')\r\n\r\n try:\r\n # create new database\r\n session.create(\"database\", \"Hello World!\")\r\n print(session.info())\r\n\r\n # run query on database\r\n print(\"\\n\" + session.execute(\"xquery doc('database')\"))\r\n\r\n # drop database\r\n session.execute(\"drop db database\")\r\n print(session.info())\r\n\r\n finally:\r\n # close session\r\n if session:\r\n session.close()\r\n\r\nQuery Bind Example\r\n------------------\r\n\r\n.. code:: python\r\n\r\n # -*- coding: utf-8 -*-\r\n # This example shows how new databases can be created.\r\n #\r\n # Documentation: http://docs.basex.org/wiki/Clients\r\n #\r\n # (C) BaseX Team 2005-12, BSD License\r\n\r\n import BaseXClient\r\n\r\n # create session\r\n session = BaseXClient.Session('localhost', 1984, 'admin', 'admin')\r\n\r\n try:\r\n # create new database\r\n session.create(\"database\", \"Hello World!\")\r\n print(session.info())\r\n\r\n # run query on database\r\n print(\"\\n\" + session.execute(\"xquery doc('database')\"))\r\n\r\n # drop database\r\n session.execute(\"drop db database\")\r\n print(session.info())\r\n\r\n finally:\r\n # close session\r\n if session:\r\n session.close()",
"description_content_type": null,
"docs_url": null,
"download_url": "http://www.basex.org",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://www.basex.org",
"keywords": "basex xml client",
"license": "Copyright (c) 2005-12 BaseX Team \r\nAll rights reserved.\r\n\r\nRedistribution and use in source and binary forms, with or without\r\nmodification, are permitted provided that the following conditions\r\nare met:\r\n\r\n1. Redistributions of source code must retain the above copyright\r\n notice, this list of conditions and the following disclaimer.\r\n\r\n2. Redistributions in binary form must reproduce the above copyright\r\n notice, this list of conditions and the following disclaimer in the\r\n documentation and/or other materials provided with the distribution.\r\n\r\n3. Neither the name of the copyright holders nor the names of its\r\n contributors may be used to endorse or promote products derived\r\n from this software without specific prior written permission.\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\r\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
"maintainer": "BaseX",
"maintainer_email": "info@basex.org",
"name": "BaseXClient",
"package_url": "https://pypi.org/project/BaseXClient/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/BaseXClient/",
"project_urls": {
"Download": "http://www.basex.org",
"Homepage": "http://www.basex.org"
},
"release_url": "https://pypi.org/project/BaseXClient/8.4.4/",
"requires_dist": null,
"requires_python": null,
"summary": "A client API for BaseX",
"version": "8.4.4"
},
"last_serial": 2166585,
"releases": {
"8.4.4": [
{
"comment_text": "",
"digests": {
"md5": "e1dbb1700126e5c56b2ccaf557adb2bb",
"sha256": "34f8d80a682e2b06ccf3e79f7276f337f067c6212e49f000d89d1ffdd82dd732"
},
"downloads": -1,
"filename": "BaseXClient-8.4.4-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "e1dbb1700126e5c56b2ccaf557adb2bb",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 6598,
"upload_time": "2016-06-14T13:39:04",
"url": "https://files.pythonhosted.org/packages/7e/7e/9c0b91e96c1789257c14b76f44a40fae487a2945a37ade0578fe6e6d22fc/BaseXClient-8.4.4-py2.py3-none-any.whl"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "e1dbb1700126e5c56b2ccaf557adb2bb",
"sha256": "34f8d80a682e2b06ccf3e79f7276f337f067c6212e49f000d89d1ffdd82dd732"
},
"downloads": -1,
"filename": "BaseXClient-8.4.4-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "e1dbb1700126e5c56b2ccaf557adb2bb",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 6598,
"upload_time": "2016-06-14T13:39:04",
"url": "https://files.pythonhosted.org/packages/7e/7e/9c0b91e96c1789257c14b76f44a40fae487a2945a37ade0578fe6e6d22fc/BaseXClient-8.4.4-py2.py3-none-any.whl"
}
]
}