import asyncio
from fyatu import AsyncFyatu
async def main():
fyatu = AsyncFyatu(
app_id="your_app_id",
secret_key="your_secret_key"
)
# Create multiple collections concurrently
collections = await asyncio.gather(
fyatu.collections.create(amount=10, currency="USD", reference="order_1"),
fyatu.collections.create(amount=20, currency="USD", reference="order_2"),
fyatu.collections.create(amount=30, currency="USD", reference="order_3"),
)
for collection in collections:
print(f"Created: {collection.id}")
await fyatu.close()
asyncio.run(main())