Did I find the right examples for you? yes no

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

        def make_serf(global_config, **local_config):
    resource_identifier = local_config['resource']
    # only accept 'py:' library identifiers at this point
    if resource_identifier.startswith('py:'):
        dotted_name = resource_identifier[3:]
        resource = resolve(dotted_name)
    else:
        raise ConfigurationError("Unknown library identifier")
    return Serf(resource)
        


src/f/a/fanstatic-1.0a5/tests/test_wsgi.py   fanstatic(Download)
import pytest
import webob
 
from fanstatic import (Library, Resource,
                       get_needed, make_serf, compat)
        'resource': 'py:mypackage.style'
    }
    serf = make_serf({}, **d)
    serf = Fanstatic(serf, versioning=False)
    request = webob.Request.blank('/')
    }
    with pytest.raises(ConfigurationError):
        make_serf({}, **d)