title: Starting with Python 3 and Avro 1.7.6, what are the steps? (Q&A)
body: <p>This is a Q&amp;A, meaning I am sharing my solution/answer to a problem I faced:</p>
  
  <p>The problem was that the <a href="http://avro.apache.org/docs/current/gettingstartedpython.html" rel="nofollow">getting started guide</a> from the apache site was not entirely up- -to-date and after a bit of fiddling I manage to get the sample to work. </p>
  
  <ol>
  <li>First wget the latest release from <a href="https://github.com/apache/avro/releases" rel="nofollow">here</a></li>
  <li>Go to the py3 subfolder under lang and build the project via your python 3 (read more <a href="http://avro.apache.org/docs/current/gettingstartedpython.html" rel="nofollow">here</a>)</li>
  <li><p>Create user.avsc in the same folder as the python code is going to be located.</p>
  
  <p>The schema:</p>
  
  <pre><code> {
  
    "namespace": "example.avro",
    "type": "record",
    "name": "User",
    "fields": [
        {"name": "name", "type": "string"},
        {"name": "favorite_number",  "type": ["int", "null"]},
        {"name": "favorite_color", "type": ["string", "null"]}
    ]
   }
  </code></pre></li>
  <li><p>Create the .py from the code provided below (Mind that I had to make minor changes to the code in <a href="http://avro.apache.org/docs/current/gettingstartedpython.html" rel="nofollow">here</a> to get this to work).</p>
  
  <p>The modified code is as follows.</p>
  
  <pre><code>import avro.schema
  from avro.datafile import DataFileReader, DataFileWriter
  from avro.io import DatumReader, DatumWriter
  
  schema = avro.schema.Parse(open("user.avsc").read())
  
  writer = DataFileWriter(open("users.avro", "wb"), DatumWriter(), schema)
  writer.append({"name": "Alyssa", "favorite_number": 256})
  writer.append({"name": "Ben", "favorite_number": 7, "favorite_color": "red"})
  writer.close()
  
  reader = DataFileReader(open("users.avro", "rb"), DatumReader())
  for user in reader:
      print(user)
  
  reader.close()
  </code></pre></li>
  </ol>