Skip to content

jonathan-shemer/aiomixpanel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aiomixpanel

aiohttp-based mixpanel client for python3

Usage Example

import os
import asyncio
from uuid import uuid4

from mixpanel import Mixpanel
from aiohttp import ClientSession

from aiomixpanel import AIOConsumer


async def main():
    async with ClientSession() as client:
        mp = Mixpanel(token=os.environ.get("MIXPANEL_TOKEN"), consumer=AIOConsumer(client))
        mp.track(str(uuid4()), "FIRST_EVENT", dict(name="John Doe"))

        await asyncio.sleep(1)

if __name__ == "__main__":
    asyncio.run(main())