A tiny library for parsing, modifying, and composing SRT files.
Project description
srt is a tiny Python library for parsing, modifying, and composing SRT files. Take a look at the quickstart for a basic overview of the library. Detailed API documentation is also available.
Want to see some examples of its use? Take a look at the tools shipped with the library.
Why choose this library?
Extremely lightweight, excluding docstrings/comments/etc around 200 SLOC
High quality test suite using Hypothesis
100% test coverage (including branches)
Well documented API, at both a high and low level
Native support for Python 2 and 3
No dependencies outside of the standard library
Tolerant of many common errors found in real-world SRT files
Completely Unicode compliant
Real world tested — used in production to process thousands of SRT files every day
Installation
To install the latest stable version from PyPi:
pip install -U srt
To install the latest development version directly from GitHub:
pip install -U git+https://github.com/cdown/srt.git@develop
Testing
pip install tox
tox -e quick
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.