Using external Cast types - njwilson23/narwhal GitHub Wiki
Functions and methods within narwhal can interact with externally-defined Cast-like and CastCollection-like objects that implement the correct interface. In order for external code to be recognized by narwhal, it must be registered with the narwhal.AbstractCast
/narwhal.AbstractCastCollection
meta-classes.
Example:
import narwhal
class MyCustomCast(object):
[...]
class MyCustomCastCollection(object):
[...]
narwhal.AbstractCast.register(MyCustomCast)
narwhal.AbstractCastCollection.register(MyCustomCastCollection)
This mechanism permits narwhal to interact with a wider variety of external code.