Really nothing fancy. Can use some wire or piece of filament for the hinge part.
The open middle of the top part's hinge means you can bend the wire a tiny bit to prevent it from escaping.
You can modify dimensions on onshape here if the 30mm and 15mm (both inner) sizes don't work for you.
The author remixed this model.