Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

leptris

Latest version: v1.9.446.0

Overview

Last scanned
26 Nov 2026
Published
26 Nov 2026
PyPI package Publisher: leptris, ribose
0 Stars
1 Forks
87 Versions
61.2K Downloads
Python Repo language

Scan summary

leptris was last scanned on 26 Nov 2026 at version 1.9.446.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 87 versions; the latest 5 were published within 3 days (24–26 Nov 2026).
  • Findings: No rules fired in version 1.9.446.0.
  • Downloads: 61,201 downloads.

Versions

87 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.9.446.0 LATEST 26 Nov 2026 No rules fired
1.9.445.0 25 Nov 2026 No rules fired
1.9.444.0 25 Nov 2026 No rules fired
1.9.443.0 25 Nov 2026 Not shown
1.9.442.0 24 Nov 2026 Not shown

No rules fired in 1.9.446.0

Findings

Findings for v1.9.446.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.9.446.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

leptris (Python) — lxml-shaped bindings for libleptris

leptris wraps the libleptris C API (XML 1.0 parsing, XPath 1.0) using cffi in ABI mode, with a required C accelerator for Element allocation and the hot accessors (tag, text, attrib, get, indexing, sibling navigation and plain-path XPath evaluation). Wheels ship it compiled; sdist builds require a C compiler.

The pinned libleptris version lives in libleptris-version.txt (lockstep releases); CI builds it from the release tarball. Platform wheels bundle the compiled engine — pip install leptris works with no extra setup on macOS (x86_64/arm64), Linux (manylinux + musllinux, x86_64/aarch64) and Windows (amd64/arm64).

Requirements

  • Python 3.9+
  • cffi (installed automatically)
  • nothing else for wheel installs — the pinned libleptris is vendored into leptris/_vendor/ by the wheel build (scripts/vendor_libleptris.sh). Wheels carry the compiled library AND its exact source (_vendor/engine/, with rebuild instructions in _vendor/README.md)
  • source installs (pip install --no-binary leptris) need a C toolchain + cmake; the sdist bundles the pinned engine source and compiles it at install time — no LEPTRIS_LIB_PATH
Supported runtimes
  • CPython 3.9+ (abi3 wheels; one wheel per platform covers every supported CPython, including future 3.x releases)
  • Free-threaded CPython (3.13t/3.14t): supported — cp314t wheels ship for every platform, built with Py_GIL_DISABLED (version- specific; the accelerator's Fns table is write-once at import). Contract: one document per thread (documents may migrate between threads between calls); the shared SAX recorder is internally serialized
  • PyPy / GraalPy: unsupported — the accelerator is required (single-mode by design); a pure-cffi fallback would contradict the binding's purpose. Revisit only on real demand.
Wheel platforms

Every release ships a universal wheel per platform (abi3, covering all CPython 3.9+) plus the matching free-threaded cp314t wheel and a source distribution. Each wheel runs the full test suite on its platform as part of the release build.

Platform Wheels Notes
Linux x86_64 (glibc ≥ 2.17) abi3 + cp314t manylinux
Linux x86_64 (musl) abi3 + cp314t musllinux (Alpine)
Linux aarch64 (glibc / musl) abi3 + cp314t native runners
Linux ppc64le abi3 full suite under qemu
Linux s390x abi3 big-endian; full suite under qemu
Linux riscv64 abi3 full suite under qemu (glibc + musl)
Linux i686 (glibc + musl) abi3 full suite (musl under qemu)
Linux armv7l (glibc + musl) abi3 full suite under qemu
macOS x86_64 + arm64 abi3 + cp314t universal2; x86_64 slice Rosetta-tested
Windows x64 + ARM64 abi3 + cp314t suite runs on both architectures
Windows x86 (32-bit) abi3 first wheel in 1.9.280.0 (engine #1456)

Every leg is required: a red leg fails the release before publish.

For a development checkout (or to use your own libleptris build), the loader also accepts a shared library (libleptris.dylib / .so / .dll) on the loader path, or one named by LEPTRIS_LIB_PATH (which must name the library file — the loader dlopens it verbatim; it takes precedence over the vendored copy):

cmake -B build -S /path/to/leptris -DLEPTRIS_BUILD_SHARED=ON
cmake --build build --target leptris_shared
export LEPTRIS_LIB_PATH=/path/to/leptris/build/src/libleptris.dylib

Quick start

from leptris import fromstring, tostring

root = fromstring("<library><book id='1' lang='en'>Ulysses</book></library>")

root.tag                                # "library"
root[0].get("id")                       # "1"
root[0].attrib                          # {"id": "1", "lang": "en"}
root[0].text                            # "Ulysses"

root.xpath("count(//book)")             # 1.0
[b.text for b in root.findall("book")]  # ["Ulysses"]

tostring(root[0], encoding="unicode")   # "<book id=\"1\" lang=\"en\">Ulysses</book>"

Documents own the tree; use the context manager or close():

from leptris import parse

with parse("catalog.xml") as doc:
    doc.xpath("//book[@lang='en']")

Namespaces, variables, canonical XML and streaming:

root.xpath("//x:item", namespaces={"x": "urn:ex"})
root.xpath("//book[@id=$id]", variables={"id": "2"})
c14n(root, exclusive=True)

from leptris import sax
sax.parse(xml, handler)                       # one-shot
with sax.StreamingParser(handler) as parser:  # push, constant memory
    parser.feed(chunk, final=last)

for rec in sax.records(xml):                  # one-crossing records tape
    ...                                       # (leptris 1.9.237.1+)

XSLT and XPath version support

leptris.XSLT(stylesheet) compiles once, applies to any Document, and returns a Document; leptris.XPath(expression) compiles an XPath for repeated evaluation. Which language constructs work is decided by the engine — the matrix below is measured against libleptris 1.9.32 (audited through this binding; the upstream gap ledger is leptris/leptris#685).

language status notes
XSLT 1.0 full libxslt conformance suite 205/205 upstream; EXSLT math/set/str/date included
XSLT 2.0 partial ✓ for-each-group, analyze-string + regex-group(), xsl:number formats, xsl:assert, xsl:sequence (multi-item), xsl:perform-sort · ✗ xsl:function, tunnel parameters, shadow attributes, xsl:result-document, @separator
XSLT 3.0 increments ✓ try/catch (with $err:description), accumulator (gated by xsl:mode use-accumulators), iterate + break + on-completion, on-empty, evaluate, grouping, modes, where-populated, on-non-empty, next-match, fork, @start-at, composite keys, tunnel params, copy/@select, xsl:namespace, xsl:document, @default, merge, result-document (writes the href target), character maps · ✗ package, xsl:map, xsl:evaluate with-params, next-iteration chaining
XPath 1.0 full complete core function library
XPath 2.0 grammar complete ✓ quantified (some/every), set algebra (union/intersect/except), node comparisons (is, <<, >>), (), ends-with, deep-equal, value comparisons, cast/castable/treat/instance of, function items + HOFs (1.9.73+) · function slices by group (sequences, regex, math:, strings/QNames/URIs, dates, xs: constructors); remaining: format-date/format-time, JSON, map:/array: constructors · format-number works in plain XPath since 1.9.80
XPath 3.1 lane 0 ✓ let, simple map !, arrow =>, string concat \|\| — through both XPath() and XSLT · ✗ function items, inline functions, maps, arrays, string constructors
DTD validation leptris.DTD(text) / .from_file(path) / .from_document(doc) (the DOCTYPE internal subset, doc-owned) — compile once, .validate(doc) → bool with .error_log (message/element/line/column); .parse_external_subset(text) merges external declarations (first-decl-wins), .set_pe_loader(fn) resolves external parameter entities with application-owned I/O — libleptris 1.9.202+
XSD (W3C XML Schema) tier 1 leptris.XSD(text) — schema compilation + lexical validation: valid_builtin("xs:integer", "42") and valid(type_name, lexical) over user simpleTypes with restriction facets — libleptris 1.9.319+; instance validation xsd.validate(doc) → bool with enumerated error_log; XSD.from_file(path) resolves relative xs:include/xs:import schemaLocations (#1075 complete — content models, instance validation, identity constraints) — libleptris 1.9.321+
RELAX NG core subset leptris.RelaxNG(schema) / .from_file(path) — compile once, .validate(doc) → bool with Jing-shaped .error_log; element/attribute/text/data/value/choice/group/interleave/repeats/ref — libleptris 1.9.115+ (#878)
XML diff native leptris.diff(a, b[, ignore_ws_text]) — digest-pruned ordered edit script (iterate DiffOp(type, path, name, before, after); serialize() line-per-op) — libleptris 1.9.144+
XQuery 1.0 core + 3.x increments leptris.XQuery(query) — FLWOR (for/let/where/order by/return/group by, positional at, tumbling/sliding windows), prolog (declare variable/namespace/function local:* incl. external variables with QT3-style select bindings via variables=),, constructors, doc()/collection(), try/catch, typeswitch — libleptris 1.9.68+; 3.1 remainder (maps/arrays, modules) tracked in #684

XQuery 1.0 core is a first-class API since libleptris 1.9.64:

from leptris import Document, XQuery

with Document.parse("<r><item v='1'>alpha</item><item v='5'>beta</item></r>") as doc:
    XQuery("for $i in //item where $i/@v > 1 return string($i)")(doc)  # ['beta']
    XQuery("declare variable $n := 3; <out>{$n * 2}</out>")(doc)       # [<Element 'out'>] — real nodes (1.9.314+); tostring() for markup
    XQuery("declare function local:dbl($x) { $x * 2 }; local:dbl(4)")(doc)  # 8.0
Schema-descriptor materialization (Plan, libleptris 1.9.162+)

Compile a descriptor once, materialize whole documents in one native pass — the tree-shaped ABI lutaml-model hosts consume (leptris/leptris#1039):

from leptris import Document, Plan

catalog = Plan({
    "element_name": "catalog",
    "children": [
        {"name": "item", "kind": "collection", "plan": {
            "element_name": "item",
            "attributes": {"id": {}, "price": {}},
            "children": [{"name": "title"}],
        }},
        {"name": "note", "kind": "raw"},
    ],
})
with Document.parse(xml) as doc:
    data = catalog(doc)   # {"attributes": {...}, "children": {...}}

Row kinds: scalar, collection (list), nested (element plan), raw (serialized subtree), content (mixed-content text runs, name may be ""), callback (PlanCallback(value, position, type_tag) — the escape hatch for host-side procs). Results are shape-stable (absent rows yield None / []); namespace forms via ns={"form": "none"|"exact"|"any", "uri": ...}, flags via {"mixed_content", "ordered", "cdata", "ns_lenient"}.

Serialize a walk (serialize) or a host-assembled flat op program (serialize_ops) back to XML; indent/indent_unit pretty-print element boundaries (1.9.341+, #425). document_ops(ops) and to_document(element_or_document) materialize the same results as native Document trees — attributes verbatim, root namespace declarations riding as xmlns attributes — with no string round trip (1.9.341+, #426):

doc = catalog.document_ops([
    ("element", 0, None), ("attr", "id", "c1"),
    ("element", 0, 0), ("attr", "id", "i1"),
    ("scalar", "first"), ("end",), ("end",),
])
doc.getroot()[0].tag   # "item"

The default surface is the full XPath 3.1 grammar. To pin the strict XPath 1.0 surface (3.x-only syntax raises XPathError), pass version="1.0" — on Document.xpath, Element.xpath, and the compiled XPath class (XPath(expr, version="1.0")):

root.xpath("count(//book)", version="1.0")          # works — 1.0 grammar
root.xpath("//book ! @id", version="1.0")           # XPathError: 3.x syntax
XPath("//book[1]/@id", version="1.0")(root)         # compiled + strict

XPath 3.1 composition and XSLT 3.0 instructions flow through the existing API with zero binding change:

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases leptris

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229