flask_restful_dbbase.resources.CollectionModelResource.format_key

static CollectionModelResource.format_key(key, key_type)

This function returns the portion of the URL that embodies the key.

Parameters:
  • key – (str) : The name of the key field.

  • key_type – (str) : Either ‘integer’ or something else.

Returns:

formatted key – (str) : such as <int:id>