Clean and dice a red onion - half if its large or use one medium sized onion.
Put a kadhai/wok on the stove on medium high heat and add oil to it when warm. Followed by peanuts. Fry them until deep brown but not burnt. Keep fried peanuts on a paper towel lined plate to drain excess oil.
In the same kadhai, add more oil if needed and begin making the tempering. Heat oil on medium high and then add rai (mustard), jeera (cumin) and kari patta (curry leaves). When the seeds are spluttering and curry leaves fragrant add the chopped onion. Sauté until translucent and just beginning to brown. You could cover the kadhai / pan and leave it on low heat while you prepare the tamarind paste.
While the onions soften and gently sauté on low heat, mix spices in tamarind paste. Add dry spices, salt and sugar to the tamarind and mix well. Add additional water to the paste if neede to combine well.
When the onions look done, add rice to the pan and gently try to coax it apart. Use the back of your spatula or spoon to press down and loosen rice grains apart.
Add the tamarind paste and water in to the rice. Mix in well until all the rice has been evenly coated. Add a tablespoon of water at a time if needed.Turn down the heat to the lowest possible on your stove and let it steam until serving. Crack some pepper over it before serving.
Top each serving of tamarind rice with peanuts fried before or mix in all the fried peanuts into the cooked rice. Serve with chilled plain yogurt.