example.controllers¶
__init__.py
Initialize each controller and return list of resources for service registry
created 14-jan-2020 by richb@instantlinux.net
Functions
Runs the __init__ function for each controller, which makes the resource name and object available as singletons for use with flask. The apicrud.BasicCRUD class defines default functions for the most common endpoints. The simplest custom controller you can create here in this directory is: ``` from apicrud import BasicCRUD. |
-
example.controllers.
resources
()¶ Runs the __init__ function for each controller, which makes the resource name and object available as singletons for use with flask. The apicrud.BasicCRUD class defines default functions for the most common endpoints. The simplest custom controller you can create here in this directory is: ``` from apicrud import BasicCRUD
- class MyController(BasicCRUD):
- def __init__(self):
super().__init__(resource=’myresource’)
See the apicrud.controllers class definitions for examples of ways to override or add endpoints.
Returns: (list<str>) of resources initialized
Modules
health.py |
|