Skip to main content

Idiomatic access to the eXist-db XML Database using XPath and XQuery

Project description

package
PyPI Apache 2 License PyPI downloads
documentation
Documentation Status

pyexistdb is a Python 3 module that provides utilities and classes for interacting with the eXist-db XML Database in a pythonic, object-oriented way, with optional Django integration.

pyexistdb is a fork of eulexistdb which was originally created by the Digital Programs and Systems Software Team of Emory University Libraries.

pyexistdb.query provides a QuerySet class modeled after Django QuerySet in functionality. This module provides model and manager classes that can be used to connect an eulxml XmlObject with the QuerySet class, in order to generate XQueries and return the results as XmlObject instances. However, configuring the XmlObject XPaths to make efficent XQueries against eXist and take advantage of the full-text index does require expertise and familiarity with eXist.

When used with Django, pyexistdb can pull the database connection configuration from Django settings, provides a custom management command for working with the collection index configuration index in the configured eXist database, and also provides a custom template tag that can be used to highlight full-text search matches.

pyexistdb.db provides access to an eXist-db instance through eXist’s XML-RPC API.

Dependencies

pyexistdb currently depends on eulxml.

pyexistdb can be used without Django, but additional functionality is available when used with Django.

Contact Information

pyexistdb is maintained by The Research Software Company.

Please contact us at contact@chelem.co.il .

License

pyexistdb is distributed under the Apache 2.0 License.

Developer notes

To install dependencies for your local check out of the code, run pip install in the pyexistdb directory (the use of virtualenv is recommended):

pip install -e .

If you want to run unit tests or build sphinx documentation, you will also need to install development dependencies:

pip install -e . "pyexistdb[dev]"

Running the unit tests requires an eXist-DB database instance. Before running tests, you will need to copy test/localsettings.py.dist to test/localsettings.py and edit the configuration for your test instance of eXist.

To run all unit tests:

nosetests test/ # for normal development
nosetests test/ --with-coverage --cover-package=pyexistdb --cover-xml --with-xunit   # for continuous integration

To run unit tests for a specific module, use syntax like this:

nosetests test/test_existdb/test_db.py

To generate sphinx documentation:

cd doc
make html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyexistdb-1.0.1.tar.gz (70.8 kB view details)

Uploaded Source

File details

Details for the file pyexistdb-1.0.1.tar.gz.

File metadata

  • Download URL: pyexistdb-1.0.1.tar.gz
  • Upload date:
  • Size: 70.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyexistdb-1.0.1.tar.gz
Algorithm Hash digest
SHA256 10c0db651d1a0590df49b43d0c60f935c83d395cf348db800390bf73cf100f68
MD5 c560e89f590e5c46a75a7061c1faad96
BLAKE2b-256 783dbfdc5057e2824f8af05dfd2d93a5717f97f1d57dedd894d064096044dd4d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page