API

Kibble

The Kibble blueprint.

class flask_kibble.Kibble(name, import_name, auth, label=None, default_gcs_bucket=None, default_model_converter=None, **kwargs)
autodiscover(paths, models=None, module_names=None)

Automatically register all Kibble views under path.

Parameters:
  • paths – The module paths to search under.
  • module_names – A list of module names to match on. e.g. kibble will only attempt to autodiscover kibble.py files.
  • models – A list of model kinds (either a ndb.Model subclass or a string) (Optional)
register_view(view_class)

Register a class with the Kibble blueprint.

Parameters:view_class – A KibbleView class
Raises ValueError:
 When the same (Class,Action) pair is already registered.
url_for(model, action, instance=None, ancestor=None, **kwargs)

Get the URL for a specific Model/Action/Instance.

If the view isn’t registered, returns an empty string.

Parameters:
  • model – A ndb.Model subclass or string. For ancestral objects, this can be a path.
  • action – The name of the action to link to. e.g. ‘create’.
  • instance – A ndb.Model instance or ndb.Key to link to.

Action Views

See Views for more details.

Query Composers

class flask_kibble.query_composers.Paginator(*args, **kwargs)

Paginates the query into smaller chunks.