register
app.core.register
Copyright © 2014-2024 Jorge Brunal Pérez diniremix@gmail.com
This file is part of Callisto.
Callisto is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
Callisto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with Callisto; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
RegisterModules
Permite la carga de los módulos, esta clase es utilizada en el archivo principal del BackEnd.
Examples:
add_resource(name, endpoint, *args, **kwargs)
Utiliza api.add_resource
de fastapi_restful
, para registrar un módulo.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name | Class | la clase que se extiende de | required |
endpoint | str | el nombre para el endpoint | required |
*args | Any | parámetros adicionales enviados a | () |
**kwargs | Any | parámetros adicionales enviados a | {} |
Examples:
add_router(obj_view, endpoint, *args, **kwargs)
Utiliza api.include_router
de APIRouter
, para registrar un módulo.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj_view | Class | la clase que se extiende de | required |
endpoint | str | el nombre para el endpoint | required |
*args | Any | parámetros adicionales enviados a | () |
**kwargs | Any | parámetros adicionales enviados a | {} |
Examples: