flask_restful_dbbase.resources.DBBaseResource.format_key

static DBBaseResource.format_key(key, key_type)[source]

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>