pyramid_cubicweb.tools

Various tools.

Warning

This module should be considered as internal implementation details. Use with caution, as the API may change without notice.

pyramid_cubicweb.tools.includeme(config)[source]

Start the cache maintenance loop task.

Automatically included by pyramid_cubicweb.make_cubicweb_application().

pyramid_cubicweb.tools.clone_user(repo, user)[source]

Clone a CWUser instance.

Warning

The returned clone is detached from any cnx. Before using it in any way, it should be attached to a cnx that has not this user already loaded.

pyramid_cubicweb.tools.cnx_attach_entity(cnx, entity)[source]

Attach an entity to a cnx.

pyramid_cubicweb.tools.cached_build_user(repo, eid)[source]

Cached version of cubicweb.server.repository.Repository._build_user()

pyramid_cubicweb.tools.clear_cache()[source]

Clear the user cache