Python cancel buff

is there a way to cancel buffs with python?
i want to cancel one buff thats on me

You have to do it by injecting packets… example in this plugin