# Path: native_tags/decorators.py
# def tag(bucket, doc):
#     def wrapped(inner, **options):


import base64
from native_tags.decorators import function, filter
from hashlib import sha1

def codectag(encoding, codec=True):
    codec = 'b%d%s' % (encoding, codec and 'encode' or 'decode')
    def inner(s, *args, **kwargs):
        return getattr(base64, codec)(s, *args, **kwargs)
    inner.__name__ = codec 
    inner.__doc__ = getattr(base64, codec).__doc__ + """

Syntax::
    

# Path: native_tags/decorators.py
# def tag(bucket, doc):
#     def wrapped(inner, **options):


# Path: native_tags/contrib/baseencode.py
import base64
from native_tags.decorators import function, filter
from hashlib import sha1


def codectag(encoding, codec=True):
    codec = 'b%d%s' % (encoding, codec and 'encode' or 'decode')
    def inner(s, *args, **kwargs):
        return getattr(base64, codec)(s, *args, **kwargs)
    inner.__name__ = codec 
    inner.__doc__ = getattr(base64, codec).__doc__ + """

Syntax::
    

    {%% %s [string] [options] %%}