A multipurpose python flask API server and administration SPA
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
484 B

  1. """Model definitions for the api module."""
  2. from typing import Any, List, Optional
  3. class APIResponse: # pylint: disable=too-few-public-methods
  4. """Custom class to wrap api responses."""
  5. def __init__(self,
  6. payload: Any,
  7. status: int = 200,
  8. options: Optional[List[str]] = None) -> None:
  9. """Construct an APIResponse object."""
  10. self.payload = payload
  11. self.status = status
  12. self.options = options