How to use the uszipcode.model.ZipcodeType function in uszipcode

To help you get started, we’ve selected a few uszipcode examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MacHu-GWU / uszipcode-project / uszipcode / search.py View on Github external
def by_state(self,
                 state,
                 zipcode_type=ZipcodeType.Standard,
                 sort_by=SimpleZipcode.zipcode.name,
                 ascending=True,
                 returns=DEFAULT_LIMIT):
        """
        Search zipcode information by fuzzy State name.

        My engine use fuzzy match and guess what is the state you want.
        """
        return self.query(
            state=state,
            sort_by=sort_by, zipcode_type=zipcode_type,
            ascending=ascending, returns=returns,
        )