Declare type with avro
===

Using Python's avro package, how can I declare a "record" type, and use that type as the field of another?

E.g., I would like to do this:

    from avro import schema
    SUB_SCHEMA_STR = """{
        "type": "record",
        "name": "SubSchema",
        "fields": [
            {   "name": "bar"   , "type": "string"   }
        ]
    }"""
    SCHEMA_STR = """{
        "type": "record",
        "name": "Schema",
        "fields": [
            { "name": "test"  , "type": "SubSchema" }
        ]
    }"""
    SUB_SCHEMA = schema.parse(SUB_SCHEMA_STR)
    SCHEMA = schema.parse(SCHEMA_STR)

This raises a `avro.schema.SchemaParseException: Type property not a valid Avro schema.`.  How can I tell `SCHEMA` about `SUB_SCHEMA` without nesting the schema?


