class EndpointElements: cls: Type[EndpointResource] = attribute(default=None) uris: Set[str] = attribute(default=set()) # {'method': path, 'get': path, 'post': path} methods: Dict[str, str] = attribute(default={}) tags: List[str] = attribute(default=[]) private: bool = attribute(default=False)
class EndpointElements: exists = attribute(default=False) isbase = attribute(default=False) cls = attribute(default=None) uris = attribute(default={}) methods = attribute(default=[]) custom = attribute(default=ExtraAttributes()) tags = attribute(default=[]) base_uri = attribute(default='')
class EndpointElements(object): exists = attribute(default=False) isbase = attribute(default=False) cls = attribute(default=None) # instance = attribute(default=None) # became useless uris = attribute(default={}) ids = attribute(default={}) methods = attribute(default=[]) custom = attribute(default=ExtraAttributes()) tags = attribute(default=[])
class ResponseElements(object): defined_content = attribute() elements = attribute(default=None) code = attribute(default=None) errors = attribute(default=None) headers = attribute(default={}) meta = attribute(default=None) extra = attribute(default=None)
class ResponseElements: defined_content = attribute() elements = attribute(default=None) code = attribute(default=None) errors = attribute(default=None) headers = attribute(default={}) meta = attribute(default=None) head_method = attribute(default=False)
class EndpointElements: # type of endpoint from flask_restful cls: Type[Resource] = attribute(default=None) uris: List[str] = attribute(default=[]) methods: Dict[str, List[str]] = attribute(default={}) tags: List[str] = attribute(default=[]) base_uri: str = attribute(default="") private: bool = attribute(default=False)
class InitObj(object): """ A pythonic way to handle a method response with different features. Here's the list of needed attributes: """ # User info username = attribute(default=None) extuser_object = attribute(default=None) # Service handlers icommands = attribute(default=None) db_handler = attribute(default=None) # Verify certificates or normal credentials is_proxy = attribute(default=False) valid_credentials = attribute(default=False) refreshed = attribute(default=False) # Save errors to report errors = attribute(default=None)
class ExtraAttributes(object): auth = attribute(default=[]) publish = attribute(default=True) schema = attribute(default={}) whatever = attribute(default=None)
class ExtraAttributes: auth = attribute(default=[]) publish = attribute(default=True) schema = attribute(default={}) whatever = attribute(default=None) required_roles = attribute(default=ALL_ROLES)
class Node: value = attribute() parent = attribute(default=None, repr=False) children = attribute(default=attr.Factory(list))