Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
very simplistic, ...

        def valid_any_uri(item):
    """very simplistic, ..."""
    try:
        part = urlparse.urlparse(item)
    except Exception:
        raise NotValid("AnyURI")

    if part[0] == "urn" and part[1] == "":  # A urn
        return True
    # elif part[1] == "localhost" or part[1] == "127.0.0.1":
    #     raise NotValid("AnyURI")

    return True
        


src/p/y/pysaml2-2.0.0/tests/test_13_validate.py   pysaml2(Download)
from saml2.validate import valid_string
from saml2.validate import valid_instance
from saml2.validate import valid_any_uri
from saml2.validate import NotValid
from saml2.validate import valid_anytype
def test_valid_anyuri():
    assert valid_any_uri("urn:oasis:names:tc:SAML:2.0:attrname-format:uri")
 
def test_valid_instance():
    attr_statem = saml.AttributeStatement()

src/p/y/pysaml2-HEAD/tests/test_13_validate.py   pysaml2(Download)
from saml2.validate import valid_string
from saml2.validate import valid_instance
from saml2.validate import valid_any_uri
from saml2.validate import NotValid
from saml2.validate import valid_anytype
def test_valid_anyuri():
    assert valid_any_uri("urn:oasis:names:tc:SAML:2.0:attrname-format:uri")
 
 
def test_valid_instance():