Skip to content

Python Wrapper for the Nakama Server

License

Notifications You must be signed in to change notification settings

JeromeK13/nakamapy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nakamapy

A partly implemented OOP Python-Wrapper for Nakama Server

Examples

Client

The Client will be used to connect to the Server

client = Nakama(server_key='defaultkey', server_ip='127.0.0.1', server_port=7350)

Session

Sessions are used to Interact with the Server

session = asyncio.get_event_loop().run_until_complete(client.authenticate_device('exampleDeviceUser'))
print(session.token)
print(session.user_id)
print(session.username)
print(session.expire_date)
print(session.is_expired)

Socket

With the Socket connection you exchange realtime data with the Server

socket = client.create_socket()
asyncio.get_event_loop().run_until_complete(socket.connect())

Account

Use the Account Object to get all informations about the current User.

account = asyncio.get_event_loop().run_until_complete(client.fetch_account(session_token=session.token))
print(account.wallet, account.user)

About

Python Wrapper for the Nakama Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages