Features
- Parse the .twee file with twee 3 spec
StoryTitle
StoryData
Special Tags: script, stylesheet
Convert the Story to twine 2 HTML spec
Convert the Story to twine 2 JSON doc
Run as a command
Use
# Install by pip $ python -m pip install pytwee
# Run in console $ python -m pytwee tests/t001.tw $ pytwee tests/t001.tw
# Import as a module
import pytwee
story = pytwee.story.Story()
with open('my-story.tw', 'rt') as f:
parser = pytwee.twee3.Parser(story)
for line in iter(f.readline, ''):
parser(line.rstrip('\n'))
del parser #<- very important
print('story:', story)
License
Metadata
Release files for pytwee 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytwee-0.3.3.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytwee-0.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.4 kB
Release files / pytwee-0.3.3.tar.gz
| Download URL | pytwee-0.3.3.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
379bb96a014b806ee6781f467dd28a3fbebb7489bff265f0c37842c01716f6ad
|
|
BLAKE2b-256 checksum How to use checksums |
7feee301d4d6c5b2202287ef9e01f8f82b0dbe2e9482faa05ba97ca9f7687163
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Jun 20, 2025.
Transparency logRelease files / pytwee-0.3.3-py3-none-any.whl
| Download URL | pytwee-0.3.3-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
351fc1ef5b253ab2f761a955d39401e0c0e74c83bf5e4484252c120ef08f3066
|
|
BLAKE2b-256 checksum How to use checksums |
80f1f75c71ba547e1dee67eaf21571ca14566588d055d34c3a716a3dd731bc2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Jun 20, 2025.
Transparency log