Agree regarding a mapping. The use of `globals()` is indeed only safe because the whole module is loaded; also ties things to Python internals. Subclassing is actually probably extraneous to the whole issue. Was just a bit lazy about building the mapping, but happy to do so.

As for `ResourceNotFound` I believe the correct semantics is "whatever current couchdbkit behavior is when a doc has the wrong `doc_type`".