This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
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

@visage.lib.interface('company.com/interface/Shapes')
class Interface(metaclass=abc.ABCMeta):
        pass

@visage.lib.implementation('company.com/interface/Shapes')
class Implementation(object):
        pass

Instance = Implementation()

assert visage.lib.isinstance(Instance, 'company.com/interface/Shapes')
assert visage.lib.hasinterface(Implementation, 'company.com/interface/Shapes')
assert visage.lib.isdefinition(Interface, 'company.com/interface/Shapes')

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)

Future

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

Release History

0.3.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
visage-0.3.0.tar.gz (11.7 kB) Copy SHA256 Checksum SHA256 – Source Aug 12, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting