def by_zipcode(self,
                   zipcode,
                   zipcode_type=None,
                   zero_padding=True):
        """
        Search zipcode by exact 5 digits zipcode. No zero padding is needed.

        :param zipcode: int or str, the zipcode will be automatically
            zero padding to 5 digits.
        :param zipcode_type: str or :class`~uszipcode.model.ZipcodeType` attribute.
            by default, it returns any zipcode type.
        :param zero_padding: bool, toggle on and off automatic zero padding.
        """
        if zero_padding:
            zipcode = str(zipcode).zfill(5)
        else:  # pragma: no cover
            zipcode = str(zipcode)

        res = self.query(
            zipcode=zipcode,
            sort_by=None,
            returns=1,
            zipcode_type=zipcode_type,
        )
        if len(res):
            return res[0]
        else:
            return self.zip_klass()
def by_zipcode ( self , zipcode , zipcode_type = None , zero_padding = True ) : if zero_padding : zipcode = str ( zipcode ) . zfill ( 5 ) else : zipcode = str ( zipcode ) res = self . query ( zipcode = zipcode , sort_by = None , returns = 1 , zipcode_type = zipcode_type , ) if len ( res ) : return res [ 0 ] else : return self . zip_klass ( )
Search zipcode by exact 5 digits zipcode. No zero padding is needed.

        :param zipcode: int or str, the zipcode will be automatically
            zero padding to 5 digits.
        :param zipcode_type: str or :class`~uszipcode.model.ZipcodeType` attribute.
            by default, it returns any zipcode type.
        :param zero_padding: bool, toggle on and off automatic zero padding.