Accounts

accounts.verify_credentials(server_url, *, username='', password='', oauth={})

Tests if supplied user credentials are valid.

Parameters:
  • server_url (str) – URL of the server
  • username (str) – (optional) name of the authenticating user
  • password (str) – (optional) password of the authenticating user
  • oauth (dict) – (optional) OAuth dict
Raises:

AuthenticationError – if the supplied credentials are invalid

Return type:

dict

Returns:

User dict

accounts.register(server_url, nickname, password, confirm, *, email=None, fullname=None, homepage=None, location=None, bio=None)

Register a new user.

Parameters:
  • server_url (str) – URL of the server
  • nickname (str) – name of the new user
  • password (str) – desired password
  • confirm (str) – password confirmation
  • email (str) – (optional) email associated with the new user
  • fullname (str) – (optional) full name associated with the profile
  • homepage (str) – (optional) URL associated with the profile. Will be prepended with “http://” if not present
  • location (str) – (optional) the city or country describing where the user is located. The contents are not normalized or geocoded in any way
  • bio (str) – (optional) user’s description
Return type:

dict

Returns:

User dict

accounts.update_profile(server_url, *, name=None, url=None, location=None, description=None, profile_link_color=None, username='', password='', oauth={})

Updates the authenticating user’s profile.

Parameters:
  • server_url (str) – URL of the server
  • name (str) – (optional) full name associated with the profile
  • url (str) – (optional) URL associated with the profile. Will be prepended with “http://” if not present
  • location (str) – (optional) the city or country describing where the user is located. The contents are not normalized or geocoded in any way
  • description (str) – (optional) user’s description
  • profile_link_color (str) – (optional) color of the profile links
  • username (str) – (optional) name of the authenticating user
  • password (str) – (optional) password of the authenticating user
  • oauth (dict) – (optional) OAuth dict
Return type:

dict

Returns:

User dict

accounts.update_profile_image(server_url, image *, username='', password='', oauth={})

Updates the authenticating user’s profile image.

Parameters:
  • server_url (str) – URL of the server
  • username (str) – (optional) name of the authenticating user
  • password (str) – (optional) password of the authenticating user
  • oauth (dict) – (optional) OAuth dict
  • image – (optional) a file-like object to upload as profile image
Return type:

dict

Returns:

User dict