Spaces:
Paused
Paused
Download create_user.py from YOSOYYONOSOYOTRO/crowdata: direct link, hf CLI and curl.
- Browser
- Download file 540 Bytes
-
https://huggingface.co/spaces/YOSOYYONOSOYOTRO/crowdata/resolve/main/create_user.py
- Command line
-
hf download hf://spaces/YOSOYYONOSOYOTRO/crowdata/create_user.py
-
curl -L -o create_user.py https://huggingface.co/spaces/YOSOYYONOSOYOTRO/crowdata/resolve/main/create_user.py
540 Bytes
| import asyncio | |
| import sys | |
| from app.auth.manager import get_user_manager | |
| async def test(): | |
| async for udb in get_user_manager(): | |
| try: | |
| user = await udb.create({ | |
| 'email': 'test@test.com', | |
| 'password': 'test123456', | |
| 'full_name': 'Test User' | |
| }) | |
| print('User created:', user.email, file=sys.stderr) | |
| except Exception as e: | |
| print('Error:', type(e).__name__, str(e), file=sys.stderr) | |
| if __name__ == "__main__": | |
| asyncio.run(test()) |