Attaching user data to objects

I’m writing a script that will toggle an object between two coordinate systems. In order to remember what coordinate system an object is in, I want to attach a flag to that object. Is there a way to add custom data to an object? I’m new to Blender scripting and my Python is a bit rusty.

Object properties might work for you.