I created a sandbox project for a simple entity example for developers. It demonstrates the creation of a simple entity using only the core API. It is not fieldable, but adding fields would be trivial.
You can get it from source code control here.