Sign in

tulov.alex / python-v3-api-client · Files

Logo

GitLab

  • Back to dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • python-v3-api-client
  • floraconcierge
  • mapping
  • api
  • validation
  • __init__.py
  • First commit for change python version to 3.8.
    df5b8cd2
    tulov.alex authored
    2020-09-01 21:54:41 -0700  
    Browse Code ยป
__init__.py 422 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
from floraconcierge.client.types import Object


class Result(Object):
    """
    :type errors: Object
    :type validated: Object
    """

    def __init__(self, *args, **kwargs):
        self.errors = None
        self.validated = None

        super(Result, self).__init__(*args, **kwargs)

    @property
    def is_valid(self):
        return not self.errors

    def __iter__(self):
        return iter(self.errors)