Skip to main content

snippets for zope.interface

Project description

  • zca-list
  • zca-snippets

zca-list

$ zca-list pyramid.interfaces
pyramid.interfaces:ITranslationDirectories
pyramid.interfaces:INewRequest
pyramid.interfaces:IRootFactory
pyramid.interfaces:IDefaultRootFactory
pyramid.interfaces:IViewMapperFactory
pyramid.interfaces:IBeforeRender
## ..snip
pyramid.interfaces:IExceptionViewClassifier
pyramid.interfaces:ILocaleNegotiator
pyramid.interfaces:IMultiDict
pyramid.interfaces:IAuthenticationPolicy

zca-snippets

$ zca-snippets pyramid.interfaces:IAuthenticationPolicy
from zope.interface import implementer
from pyramid.interfaces import IAuthenticationPolicy

## see: pyramid.interfaces:IAuthenticationPolicy
@implementer(IAuthenticationPolicy)
class AuthenticationPolicy(object):
    def remember(self, request, principal, **kw):
        pass

    def effective_principals(self, request):
        pass

    def forget(self, request):
        pass

    def authenticated_userid(self, request):
        pass

    def unauthenticated_userid(self, request):
        pass
    $ zca-snippets -q pyramid.interfaces:IAuthorizationPolicy
## see: pyramid.interfaces:IAuthorizationPolicy
@implementer(IAuthorizationPolicy)
class AuthorizationPolicy(object):
    def principals_allowed_by_permission(self, context, permission):
        pass

    def permits(self, context, principals, permission):
        pass

Project details


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
zca_snippets-0.0.2.tar.gz (2.9 kB) Copy SHA256 hash SHA256 Source None May 2, 2014

Supported by

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