I had the same question and yes! you can update attributes using pyshp.
Here I show you an example:
import shapefile
import pprint as p
def modify(key,value,e):
for i in range(len(e.records)):
if(e.records[i][0]==key):
e.records[i][2]=value
break
def editShape():
e = shapefile.Editor("/home/agus/Desktop/converterPy/provicias/provinces800.shp")
p.pprint(e.records[1])
p.pprint(e.records[3])
p.pprint(e.records[7])
modify("Antofagasta",1,e)
modify("Tocopilla",23,e)
modify("Huasco",90,e)
print("--------- AFTER EDIT ---------")
p.pprint(e.records[1])
p.pprint(e.records[3])
p.pprint(e.records[7])
e.save("/home/agus/Desktop/converterPy/provicias/provinces800.shp")
editShape()
If you run this file this is the result:
['Antofagasta', 'AT', 0]
['Tocopilla', 'TO', 0]
['Huasco', 'HU', 0]
--------- AFTER EDIT ---------
['Antofagasta', 'AT', 1]
['Tocopilla', 'TO', 23]
['Huasco', 'HU', 90]
This overwrite the original shapefile so be carefully.