import asyncio

from nio import AsyncClient


async def main() -> None:
    for i in range(5):
        client = AsyncClient("http://127.0.0.1:8008", user="admin")
        await client.register(username=f"user{i}", password="password")
        await asyncio.sleep(0.5)

    await client.close()


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