Portal Solver Editor SDK - Python Bindings
[EN] | [RU]
pse-sdk-python - Official Python bindings for Portal Solver Editor (PSE) SDK, the official toolkit (SDK) for programmatic work with the in-game editor of Portal: Solver
The library provides a high-level Python API over the low-level C SDK, allowing you to build external level editors, automation tools, plugins, unusual custom levels, and utilities that run in sync with the running game in real time
All the low-level details - shared memory, ring buffers, atomics, byte offsets - are hidden behind a clean Python interface
Installation
pip install pse-sdk-python
Requirements:
- Windows (the game is Windows-only)
- Python 3.10+
- Portal: Solver must be running
Quick start
A basic scenario: connect to the game, create a floor, a button and a door. Make the button open the door
import pse
# Connect to the running game
pse.initialize()
# Build a floor
pse.StaticMesh.create(
location=(0, 0, -100),
scale=(10, 10, 1),
mesh=pse.Mesh.FACE,
material=pse.Material.FLOOR_WHITE,
)
# Create a button and a door
button = pse.Button()
button.create(location=(200, 200, -100))
door = pse.Door()
door.create(location=(-150, 0, -100))
# Open the door when the button is pressed
@button.on_element_changed()
def on_button_changed(state):
door.state = state
# Main loop
while True:
pse.poll_events()
What you can do
- Elements: doors, buttons, triggers, lasers, faith plates, panels, stairs, cubes, lamps, windows, elevators and more
- Meshes: static and dynamic geometry with materials
- Events: callbacks for element state changes
- Player: position, rotation, spawn, kill
- Solver Gun & flashlight: give/take, state control, actions
- Game: cheats, gravity, level initialization
Project structure
src/pse/- Python package sourcesrc/pse/pse.dll- bundled PSE SDK dynamic libraryexamples/- working Python examples
Documentation
A detailed description of the architecture, element specifications and usage guides can be found in the PSE SDK Python Documentation section
Related projects
- pse-sdk - the original C SDK (core library, headers, documentation)
- PSE SDK Documentation - full architecture, element specs and usage guides
Links and feedback
- Portal: Solver page on GameJolt: GameJolt
- Download ready releases: Releases
- Report a bug (Bug Report): Issues
- Contact RootTool:
- Telegram (channel/blog): RootTool Blog
- Telegram (DM): @RootTool0
- Discord:
.roottool(orRootTool#5776) - YouTube: RootTool
Metadata
Release files for pse-sdk-python 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pse_sdk_python-1.0.2.tar.gz | 18.8 kB | Without provenance | Details for pse_sdk_python-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pse_sdk_python-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for pse_sdk_python-1.0.2-py3-none-any.whl |
Total release size: 36.4 kB
Release files / pse_sdk_python-1.0.2.tar.gz
| Download URL | pse_sdk_python-1.0.2.tar.gz |
|---|---|
| Size | 18.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02efebf79308965184c16c2db7999b730775e1f70faed1e6d8cadcd46d43e2fc
|
|
BLAKE2b-256 checksum How to use checksums |
21cbdea30b9f94d6fb7d5626c1b3d9c9490638370981800a4a0f836adfe1d0ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.0
|
Release files / pse_sdk_python-1.0.2-py3-none-any.whl
| Download URL | pse_sdk_python-1.0.2-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df538d543839d47fcb7f4c8f3fe94312c7fc06eee99e70ef42d8258244ae2a39
|
|
BLAKE2b-256 checksum How to use checksums |
c1511b2610c62db5cf170c521a5228b68056f3bdb89f86f2d90b3c087d38e4b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.0
|
Security for pse-sdk-python 1.0.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.