Skip to main content

A Python database interface for eXist-db

Project description

https://i.ibb.co/JsZqM7z/snakesist-logo.png

snakesist

https://badge.fury.io/py/snakesist.svg Documentation Status https://travis-ci.org/03b8/snakesist.svg?branch=master

snakesist is a Python database interface for eXist-db. It supports basic CRUD operations and uses delb for representing the yielded resources.

pip install snakesist

Usage example

from snakesist import ExistClient

db = ExistClient()

db.root_collection = '/db/foo/bar'
# the client will only query from this point downwards

names = db.retrieve_resources('//*:persName')
# note the namespace wildcard in the XPath expression

# append 'Python' to all names which are 'Monty' and delete the rest
for name in names:
    if name.node.full_text == 'Monty':
        name.node.append_child(' Python')
        name.update_push()
    else:
        name.delete()

Your eXist instance

snakesist leverages the eXist RESTful API for database queries. This means that allowing database queries using the _query parameter of the RESTful API is a requirement in the used eXist-db backend. eXist allows this by default, so if you haven’t configured your instance otherwise, don’t worry about it.

snakesist is tested with eXist 4.7.1 and is not compatible yet with eXist 5.0.0.

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

snakesist-0.1.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snakesist-0.1.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file snakesist-0.1.1.tar.gz.

File metadata

  • Download URL: snakesist-0.1.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.16 CPython/3.6.8 Linux/4.9.0-11-amd64

File hashes

Hashes for snakesist-0.1.1.tar.gz
Algorithm Hash digest
SHA256 591b90b0f932eb168183275ef6156e7eca855eb8896cf77b6be5cdce6e628fb9
MD5 820c9c23406e390cf90ef39c93c57e8f
BLAKE2b-256 721e695ba4444b9487612196b19639e97fe0f3b368b364faffe3c736108255cf

See more details on using hashes here.

File details

Details for the file snakesist-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: snakesist-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.16 CPython/3.6.8 Linux/4.9.0-11-amd64

File hashes

Hashes for snakesist-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f5530df0f091ed558320ce8a621a893c08f8ca4183992c7ad18fa9c500e469b9
MD5 61f8bf14799f48c73873134c58043e25
BLAKE2b-256 c791196f4e11122e36f78fce3f65c8b0234b919302682132700328967dd95440

See more details on using hashes here.

Supported by

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