Bike rides to villages in the Tlacolula Valley to the east of Oaxaca City are generally easy affairs. The terrain is mainly flat, and there is a good network of dirt roads linking the many small communities. It is a simple matter to use the bike path on the old Ferrocarril to get from the center of Oaxaca out to Tule, which then serves as a springboard to other destinations.
The track illustrated below shows the route from my home in San Felipe del Agua to the village of San Sebastian Teitipac. The total distance is 44 miles (70.8 km), with an elevation gain & loss of 1498 feet (456.6 meters). The elevation chart below shows the ride just on the return trip; you have to imagine the missing mirror image for the outgoing segment. If you elect to use the Zocalo as the start / end point rather than San Felipe, you can deduct 7 miles and 750 feet in elevation from the figures above.