sqlalchemy_utils.types.ip_address.IPAddressType

Here are the examples of the python api sqlalchemy_utils.types.ip_address.IPAddressType taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: sqlalchemy-utils Source File: test_ip_address.py
Function: visit_or
@pytest.fixture
def Visitor(Base):
    class Visitor(Base):
        __tablename__ = 'docuement'
        id = sa.Column(sa.Integer, primary_key=True)
        ip_address = sa.Column(ip_address.IPAddressType)

        def __repr__(self):
            return 'Visitor(%r)' % self.id
    return Visitor