How to use the schwifty.registry.build_index function in schwifty

To help you get started, we’ve selected a few schwifty 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 mdomke / schwifty / schwifty / bic.py View on Github external
partial(Base._get_component, start=0, end=4), doc="str: The bank-code part of the BIC."
    )
    country_code = property(
        partial(Base._get_component, start=4, end=6), doc="str: The ISO 3166 alpha2 country-code."
    )
    location_code = property(
        partial(Base._get_component, start=6, end=8), doc="str: The location code of the BIC."
    )
    branch_code = property(
        partial(Base._get_component, start=8, end=11),
        doc="str or None: The branch-code part of the BIC (if available)",
    )


registry.build_index("bank", "bic", key="bic", accumulate=True)
registry.build_index("bank", "bank_code", key=("country_code", "bank_code"), primary=True)
github mdomke / schwifty / schwifty / bic.py View on Github external
bank_code = property(
        partial(Base._get_component, start=0, end=4), doc="str: The bank-code part of the BIC."
    )
    country_code = property(
        partial(Base._get_component, start=4, end=6), doc="str: The ISO 3166 alpha2 country-code."
    )
    location_code = property(
        partial(Base._get_component, start=6, end=8), doc="str: The location code of the BIC."
    )
    branch_code = property(
        partial(Base._get_component, start=8, end=11),
        doc="str or None: The branch-code part of the BIC (if available)",
    )


registry.build_index("bank", "bic", key="bic", accumulate=True)
registry.build_index("bank", "bank_code", key=("country_code", "bank_code"), primary=True)