Closed LixCp closed 7 months ago
try to update marzpy to 0.0.5 (pip install marzpy --upgrade)
from marzpy.api.user import User
from marzpy import Marzban
import asyncio
async def main():
panel = Marzban("username","password","https://example.com")
token = await panel.get_token()
new_user = User(
username="Mewhrzad",
proxies={
"vmess": {"id": "35e7e39c-7d5c-1f4b-8b71-508e4f37ff53"},
},
inbounds={"vmess": ["VMess TCP"]},
expire=0,
data_limit=0,
data_limit_reset_strategy="no_reset",
status="active"
)
result = await panel.add_user(user=new_user, token=token)
print(result)
asyncio.run(main())
return : module aiohttp has no attribute exceptions