Skip to content

A library that provides an ergonomic model for XML encoded text documents (e.g. with TEI-XML).

License

Notifications You must be signed in to change notification settings

delb-xml/delb-py

Repository files navigation

delb

Latest version on PyPI Documentation Python versions License mypy-checked Black code style

delb is a library that provides an ergonomic model for XML encoded text documents (e.g. TEI-XML) for the Python programming language. It fills a gap for the humanities-related field of software development towards the excellent (scientific) communities in the Python ecosystem.

For a more elaborated discussion see the Design chapter of the documentation.

Features

  • Loads documents from various source types. This is customizable and extensible.
  • XML DOM types are represented by distinct classes.
  • A completely type-annotated API.
  • Consistent design regarding names and callables' signatures.
  • Shadows comments and processing instructions by default.
  • Querying with XPath and CSS expressions.
  • Serializations that may fulfil the promise of XML's well-readability to an unwitnessed degree and even don't mess up whitespace.

Development status

You're invited to submit tests that reflect desired use cases or are merely of theoretical nature. Of course, any kind of proposals for or implementations of improvements are welcome as well.

Related Projects & Testimonials

snakesist is an eXist-db client that uses delb to expose database resources.

Kurt Raschke noted in 2010:

In a DOM-based implementation, it would be relatively easy […]
But lxml doesn't use text nodes; instead it uses [text] and [tail]
properties to hold text content.