Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)

        def to_bytes(value):
    if isinstance(value, bytes):
        return value
    assert isinstance(value, str)
    return value.encode('utf-8')
        


src/l/i/liquidluck-3.8.1/liquidluck/filters.py   liquidluck(Download)
from jinja2 import contextfunction, contextfilter
from liquidluck.options import g, settings
from liquidluck.utils import to_unicode, to_bytes, get_relative_base
 
 

src/l/i/liquidluck-HEAD/liquidluck/filters.py   liquidluck(Download)
from jinja2 import contextfunction, contextfilter
from liquidluck.options import g, settings
from liquidluck.utils import to_unicode, to_bytes, get_relative_base