core.bones.uri ============== .. py:module:: core.bones.uri Attributes ---------- .. autoapisummary:: core.bones.uri.PORT_MIN core.bones.uri.PORT_MAX Classes ------- .. autoapisummary:: core.bones.uri.UriBone Module Contents --------------- .. py:data:: PORT_MIN :type: Final[int] :value: 1 .. py:data:: PORT_MAX :type: Final[int] :value: 65535 .. py:class:: UriBone(*, accepted_protocols = None, accepted_ports = None, clean_get_params = False, domain_allowed_list = None, domain_disallowed_list = None, local_path_allowed = False, **kwargs) Bases: :py:obj:`core.bones.base.BaseBone` The UriBone is used for storing URI and URL. :param accepted_protocols: The accepted protocols can be set to allow only the provide protocols. :param accepted_ports The accepted ports can be set to allow only the provide ports. .. code-block:: python # Example UriBone(accepted_ports=1) UriBone(accepted_ports="2") UriBone(accepted_ports="1-4") UriBone(accepted_ports=(1,"2","4-10")) :param clean_get_params: When set to True, the GET-parameter for the URL will be cleaned. :param domain_allowed_list: If set, only the URLs that are matched with an entry of this iterable will be accepted. :param domain_disallowed_list: If set, only the URLs that are not matched with an entry of this iterable will be accepted. :param local_path_allowed: If True, the URLs that are local paths will be prefixed with "/". .. py:attribute:: type :value: 'uri' .. py:attribute:: accepted_protocols :value: None .. py:attribute:: clean_get_params :value: False .. py:attribute:: domain_allowed_list :value: None .. py:attribute:: domain_disallowed_list :value: None .. py:attribute:: local_path_allowed :value: False .. py:method:: _build_accepted_ports(accepted_ports) :classmethod: .. py:method:: isInvalid(value) .. py:method:: singleValueFromClient(value, skel, bone_name, client_data) .. py:method:: structure()