atrep — Python bindings
Python bindings for atrep, an
extensible semantic markup language designed with literary
applications in mind. The same Rust core the
CLI wraps
(atrep on crates.io),
surfaced pythonically: strings in, strings out, exceptions
instead of exit codes.
pip install atrep
Checking and the two spellings
import atrep
doc = open("apology.atd").read()
# Parse and validate; routes on the declaration.
atrep.check(doc) # -> "document" | "dialektos"
# The two spellings: brachygraphic (sim symbols; canonical)
# and plerographic (sim names in braces). Both parse to the
# identical structure.
names = atrep.plero(doc) # @# ... -> @{section} ...
symbols = atrep.brachy(names) # ... and back
localized = atrep.plero(doc, lang="el") # glossa sim names
The structural outline
o = atrep.outline(doc)
o["dialektos"] # "litogramma"
o["blocks"] # [{"kind", "symbol", "name", "depth",
# "start", "end", "lemma", "onym",
# "genoses"}, ...]
o["milestones"] # [{"key": "steph:17a", "line": 4}, ...]
o["onyms"] # located onym anchors
o["deixes"] # located deixis references
Endo importers
# Foreign formats -> canonical atrep: markdown | html | rst |
# org | djot | docbook | bibtex | jats | tei | usfm | usx | osis |
# fb2 | rnc | opencorpora | proiel | conllu | dsl.
a = atrep.endo("markdown", open("notes.md").read())
# A Lingvo DSL dictionary is UTF-16 (or a code page): decode it
# first, then pass the text; the result is lexigramma.
a = atrep.endo("dsl", open("webster.dsl", encoding="utf-16").read())
# Versification milestone scheme (usfm/usx/osis only).
a = atrep.endo("usfm", open("john.usfm").read(), scheme="std")
Dialektoi
# Resolve a dialektos and get its canonical serialization.
# The std dialektoi are embedded; `dir` resolves from disk,
# `sources` from in-memory artifacts.
lekt = atrep.dialektos("koine")
lekt = atrep.dialektos("demo", sources={"demo.lektos": dia})
atrep.std_dialektoi() # ["at-djot", "koine", ..., "litogramma"]
Errors raise atrep.AtrepError, with file:line:col locations
in the message where the source provides them. atrep.version()
reports the bindings/core version.
Resolution is offline: non-std dialektoi resolve from the
directory of the path argument (default doc.atd, i.e. the
process working directory). Remote fetching (kanonizo) and the
multi-document operations (morphisms, exo rendering, collation)
belong to the CLI.
License
MIT or Apache-2.0, at your option.
Metadata
Release files for atrep 0.3.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| atrep-0.3.6.tar.gz | 16.7 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| atrep-0.3.6-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| atrep-0.3.6-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| atrep-0.3.6-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| atrep-0.3.6-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| atrep-0.3.6-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 4.3 MB
Release files / atrep-0.3.6.tar.gz
| Download URL | atrep-0.3.6.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da45af6b225c8c8c71def05d37935b997f36ce07882734bac8d458779fcd7b40
|
|
BLAKE2b-256 checksum How to use checksums |
fcd0843b4b61e30974765b73b610304c60d673a0fed95a00b555f19f883a57a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logRelease files / atrep-0.3.6-cp39-abi3-win_amd64.whl
| Download URL | atrep-0.3.6-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 861.5 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
307f5e6d944b332813feb798585a48e1bdbe0aedd85a43a8df45e449e2cd9846
|
|
BLAKE2b-256 checksum How to use checksums |
35cf4988f7516742d5887758d63179a715f9f832cc48d62cb1e63cd32ed98b1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logRelease files / atrep-0.3.6-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | atrep-0.3.6-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 912.6 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
dfeff350d982583fa5542c878f8314db64d9c1eca190b73f1cb77ae887df52e7
|
|
BLAKE2b-256 checksum How to use checksums |
fbaad4316001734ac18120637a410d4ad93548100768a9fb928b0f2f4be9529f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logRelease files / atrep-0.3.6-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | atrep-0.3.6-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 845.3 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
ccb981f970997efbbc16c7deba0fef65b26c63825d2e850fe50fda5f17329fd3
|
|
BLAKE2b-256 checksum How to use checksums |
b57cce82fed113b9e6db456699ae1ee037d12f72f084605abd8ff462df822bc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logRelease files / atrep-0.3.6-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | atrep-0.3.6-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 820.9 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
35703481c1ea0c29de863dfd9a0eda8d04d379f78d2bbc9e6126aadd6d52fd10
|
|
BLAKE2b-256 checksum How to use checksums |
65982cd57b20a3845d5d98e04c60241eac5b654a0f0645bc2cf580c84b1b4128
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logRelease files / atrep-0.3.6-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | atrep-0.3.6-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 850.4 kB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
d7f8dc43d218e22e4bca5ece17b8bc16bec8a7ed2ed0a80e573a75f1bab3dc05
|
|
BLAKE2b-256 checksum How to use checksums |
95d6279b14713eb9864213eea6f380cdf705851cb7f7b1c0c338097a069330fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency log