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.

Files for zca_snippets, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size zca_snippets-0.0.2.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page