Skip to main content
https://i.ibb.co/JsZqM7z/snakesist-logo.png

snakesist

https://badge.fury.io/py/snakesist.svg Documentation Status https://github.com/delb-xml/snakesist/actions/workflows/tests.yml/badge.svg

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

snakesist allows you to access individual documents from the database using a delb.Document object, either by simply passing a URL

>>> from delb import Document

>>> manifest = Document("existdb://admin:@localhost:8080/exist/db/manifestos/dada_manifest.xml")
>>> [header.full_text for header in manifest.xpath("//head")]
["Hugo Ball", "Das erste dadaistische Manifest"]

or by passing a relative path to the document along with a database client which you can subsequently reuse

>>> from snakesist import ExistClient

>>> my_local_db = ExistClient(host="localhost", port=8080, user="admin", password="", root_collection="/db/manifests")
>>> dada_manifest = Document("dada_manifest.xml", existdb_client=my_local_db)
>>> [header.full_text for header in dada_manifest.xpath("//head")]
["Hugo Ball", "Das erste dadaistische Manifest"]
>>> communist_manifest = Document("communist_manifest.xml", existdb_client=my_local_db)
>>> communist_manifest.xpath("//head").first.full_text
"Manifest der Kommunistischen Partei"

and not only for accessing individual documents, but also for querying data across multiple documents

>>> all_headers = my_local_db.xpath("//*:head")
>>> [header.node.full_text for header in all_headers]
["Hugo Ball", "Das erste dadaistische Manifest", "Manifest der Kommunistischen Partei", "I. Bourgeois und Proletarier.", "II. Proletarier und Kommunisten", "III. Sozialistische und kommunistische Literatur", "IV. Stellung der Kommunisten zu den verschiedenen oppositionellen Parteien"]

You can of course also modify and store documents back into the database or create new ones and store them.

Your eXist instance

snakesist leverages the eXist RESTful API for database queries. This means that allowing database queries using POST requests on 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.

We aim to directly support all most recent releases from each major branch. Yet, there’s no guarantee that releases older than two years will be kept as a target for tests. Pleaser refer to the values of jobs/tests/matrix/exist-version in the CI’s configuration file for what’s currently considered.

Metadata

Release files for snakesist 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snakesist 0.3.0
File Size Uploaded Provenance Actions
snakesist-0.3.0.tar.gz 11.9 kB Without provenance Details for snakesist-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for snakesist 0.3.0
File Interpreter ABI Platform Actions
snakesist-0.3.0-py3-none-any.whl Python 3 none any Details for snakesist-0.3.0-py3-none-any.whl

Total release size: 23.5 kB

Release files / snakesist-0.3.0.tar.gz

Download URL snakesist-0.3.0.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a0ace94522063084743553823869692f078397b92b38e99675c2203a6ce92b12
BLAKE2b-256 checksum
How to use checksums
a28e37bbcc71ed99ed1c800d46cda9f30adcf9272b9ed1bb350f82fa9b76e056
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.1 Linux/5.10.141-1-MANJARO

Release files / snakesist-0.3.0-py3-none-any.whl

Download URL snakesist-0.3.0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4774f15b1d594dcc5d417de21c6c12da1d7a3da2bcb8a0fcf4c96e785057992e
BLAKE2b-256 checksum
How to use checksums
08dde4846e6840d3194bc2505d219c3470a4d45c0992e811d0a14b52e861c1aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.1 Linux/5.10.141-1-MANJARO

Security for snakesist 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page