sse-pex-interface
A Python library for reading and writing compiled Papyrus Script files (.pex) for Skyrim Special Edition.
This is neither a compiler (.psc -> .pex) nor a decompiler (.pex -> .psc)!
Features
- Fully symmetrical parse and dump methods
- Fully typed and documented models based on Pydantic
- Automated validation of Papyrus data
Installation
With pip: pip install sse-pex-interface
With uv: uv add sse-pex-interface
Basic Usage
This example demonstrates how to load a compiled Papyrus Script, modify its header and save it again:
>>> from sse_pex_interface import PexFile
>>> from pathlib import Path
>>> with Path("myscript.pex").open("rb") as stream:
... pex_file = PexFile.parse(stream)
...
>>> print(pex_file.header)
magic=4200055006 major_version=3 minor_version=2 game_id=1 compilation_time=1767530035 source_file_name='MyScript.psc' username='Cutleast' machinename='CUTLEAST-PC'
>>> pex_file.header.username = "Someone else"
>>> with Path("myscript.pex").open("wb") as stream:
... pex_file.dump(stream)
...
>>>
Credits
Metadata
Release files for sse-pex-interface 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sse_pex_interface-1.0.0.tar.gz | 23.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sse_pex_interface-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.6 kB
Release files / sse_pex_interface-1.0.0.tar.gz
| Download URL | sse_pex_interface-1.0.0.tar.gz |
|---|---|
| Size | 23.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3ba6110e87685a6d2a1393093b80560b94780b6ff76924f96483399aebd9495
|
|
BLAKE2b-256 checksum How to use checksums |
42970ef2ca443b92fc985175344f56dbf378d2cab3d7f95f7f54c9e7423423a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / sse_pex_interface-1.0.0-py3-none-any.whl
| Download URL | sse_pex_interface-1.0.0-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27b21cdbd4464a449626ac5767ca6f16f9230f50fa5741252d47fac37b5ed4e8
|
|
BLAKE2b-256 checksum How to use checksums |
59ec4c904444342432c1e058b5267c0f8eaa8d9675c892c5c904ab5a1f68d6e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|