Skip to main content
Help us improve Python packaging – donate today!

Loosely coupled, ABC based, Python Interface Registry

Project Description

🎭 About

visage is a small project providing a registry for loose coupling of interfaces and implementations.

visage is heavily based on Python’s abstract base classes for allowing isinstance checks in the presence of an interface definition. However, in the absence of an interface definition, registry-level checks can be performed in order to evaluate a given implementation’s declaration of interface support.

Sample usage:

import abc
import visage.lib

class Interface(metaclass=abc.ABCMeta):

class Implementation(object):

Instance = Implementation()

assert visage.lib.isinstance(Instance, '')
assert visage.lib.hasinterface(Implementation, '')
assert visage.lib.isdefinition(Interface, '')

However, the declaration of the interface is not necessary for an implementation to be declared. Implementations are fully functional without an interface, and identifier based checks can be easily used.

When the Interface object is present, it can be used to do checks using the builtins that work with classes:

assert isinstance(Instance, Interface)
assert issubclass(Implementation, Interface)


  • Registry Queries for Selecting Implementation classes based on quals.
  • IID-to-module mappings for IID based imports.
  • Adaption capabilities?

Release history Release notifications

This version
History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
visage-0.3.0.tar.gz (11.7 kB) Copy SHA256 hash SHA256 Source None Aug 12, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page