A Pythonic wrapper for Valheim Save Tools - manipulate Valheim save files programmatically
Project description
Valheim Save Tools Python API
A Pythonic wrapper for Valheim Save Tools, providing an intuitive API to manipulate Valheim save files programmatically.
Features
✅ File Conversion - Convert between binary formats (.db, .fwl, .fch) and JSON
✅ Global Keys Management - Add, remove, or list global keys (boss defeats, events)
✅ Structure Cleaning - Remove abandoned structures with configurable thresholds
✅ World Reset - Reset world to initial state while preserving progress
✅ Method Chaining - Fluent API for complex operations
✅ Context Manager - Automatic cleanup and resource management
Installation
pip install valheim-save-tools-py
Quick Start
from valheim_save_tools_py import ValheimSaveTools
vst = ValheimSaveTools()
# Convert to JSON
vst.to_json("world.db")
# Add boss defeat
vst.add_global_key("world.db", "defeated_eikthyr")
# Clean and reset with method chaining
vst.process("world.db") \
.clean_structures(threshold=30) \
.reset_world() \
.save("cleaned_world.db")
# Context manager for automatic cleanup
with vst.process("world.db") as p:
p.clean_structures()
p.reset_world()
Documentation
- 🌐 Live Documentation - Full documentation site
- 📚 API Reference - Complete API documentation
- 📖 Usage Guide - Detailed usage patterns and examples
- 🎯 Examples - Working code examples
Common Use Cases
Convert Save Files
# Binary to JSON
vst.to_json("world.db", "backup.json")
# JSON to Binary
vst.from_json("backup.json", "world.db")
Manage Boss Defeats
# List all global keys
keys = vst.list_global_keys("world.db")
# Add boss defeats
vst.add_global_key("world.db", "defeated_eikthyr")
vst.add_global_key("world.db", "defeated_gdking")
Clean Structures
# Clean with default threshold (25)
vst.clean_structures("world.db")
# Clean with custom threshold
vst.clean_structures("world.db", threshold=50)
Requirements
- Python 3.8 or higher
- Java 17 or higher (for running the bundled JAR)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Credits
This is a Python wrapper for Valheim Save Tools by kakoen. Big shout-out for creating such a cool tool 🙏.
I encourage you to contribute to the Valheim Save Tools project!
Project details
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 valheim_save_tools_py-0.1.0.tar.gz.
File metadata
- Download URL: valheim_save_tools_py-0.1.0.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8803f6fdbdc36123aa0072372ec6325e95125dfb190419fec6064fa3e379f7ea
|
|
| MD5 |
884ce835670f65440e6e663d7c642162
|
|
| BLAKE2b-256 |
4a2e1ba02f7311debca643201a8d2be1d29d2c5c06737c94359ad604381d2eac
|
File details
Details for the file valheim_save_tools_py-0.1.0-py3-none-any.whl.
File metadata
- Download URL: valheim_save_tools_py-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75d8df1e75850c38b49eccc9c2a6ba9fcb0bf344f4dcba6710cbe767d3451502
|
|
| MD5 |
4cb6ca2dd396fdd50f8e3da7ead4fa67
|
|
| BLAKE2b-256 |
647aeb6fcb87db3f6e78b47486c1b6efc288dc431af3965fc5c6fd37b20625df
|