Flask extension for Bulbs that supports the factory pattern