TinyObj documentation¶
TinyObj is a minimal, human-readable object notation designed for configuration,
data exchange, and structured text. It uses simple sigils to define objects (*),
properties (>), and lists (-), making it easy to write by hand and parse
programmatically.
*User
> name "Alice"
> age 30
> tags
- python
- rust
*User.profile
> active true
> score 9001
Key features:
Hierarchical objects via dot-separated paths (e.g.,
*User.profile)Typed values: strings, numbers, booleans,
nothing(null), and listsClean, indentation-free syntax
Built-in error reporting with source positions and visual highlights
Bi-directional: parse to Python dict, serialize back to TinyObj
This documentation includes:
A tutorial for getting started
A full api/tobj reference for developers
Examples and best practices for real-world usage
Get started by installing TinyObj:
pip install tobj
Then use it in Python:
import tobj
data = tobj.loads("*Config >debug true")
print(data) # {'Config': {'debug': True}}
Check out the TOBJ repository on GitHub for source code, examples, and more information. It’s also online on PyPI: https://pypi.org/project/tobj/.