Note that USA was very quiet about the accusations and didn't even protest when Turkey started a siege on a US military base.
Not because USA was involved in the coup (at least so I assume) or because Obama is a weak leader (as many complained) but simply because despite all the stuff that Erdogan has done, despite all the killings, the treatment of the minorities, his dealings with ISIS, his radical Islam beliefs that he is giving more ground in Turkey by removing all moderates from power, despite all of that USA does not want to lose Turkey as an ally.
Yeah, people are being executed as enemies of the state/Islam but USA still considers it better to have a strategically placed ally in Turkey rather than make them move closer to Russia. (Well, they have had quite hostile relationship with Russia recently. Like shooting at each other and killing soldiers hostile, but I have no doubt that both Putin and Erdogan would forget such little details if they believed that becoming allies was in their interest.)