Python with mitmproxy and cloudflare

can I used python with mitmproxy and cloudflare ?

my provider has an cloudflare and I want use python and maybe mitmproxy to deal with the cloudflare.