A Python library for reading and writing Skyrim Special Edition Papyrus Script files (.pex).
Project description
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
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.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sse_pex_interface-1.0.0.tar.gz.
File metadata
- Download URL: sse_pex_interface-1.0.0.tar.gz
- Upload date:
- Size: 23.7 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3ba6110e87685a6d2a1393093b80560b94780b6ff76924f96483399aebd9495
|
|
| MD5 |
2d0996399ea026090b8ca42aa4c5d40d
|
|
| BLAKE2b-256 |
42970ef2ca443b92fc985175344f56dbf378d2cab3d7f95f7f54c9e7423423a7
|
File details
Details for the file sse_pex_interface-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sse_pex_interface-1.0.0-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27b21cdbd4464a449626ac5767ca6f16f9230f50fa5741252d47fac37b5ed4e8
|
|
| MD5 |
7ac54f0a900ff7c1becb6371172d1cac
|
|
| BLAKE2b-256 |
59ec4c904444342432c1e058b5267c0f8eaa8d9675c892c5c904ab5a1f68d6e7
|