pryv.user¶
This module defines users related functions. In particular, it defines the functions used to authenticate a user.
-
class
pryv.user.User(name)¶ Bases:
objectThis class defines a user.
-
__init__(name)¶ Creates a new instance of a user.
Parameters: name ( str) – The name of the user.
-
-
pryv.user.authenticate(username, password)¶ Authenticates the user with the given name and password.
Parameters: - username (
str) – The name of the user. - password (
str) – The password.
Returns: Trueif the pair user name / password is valid;Falseotherwise.Return type: bool- username (
-
pryv.user.count()¶ Counts the number of configured users.
Returns: The number of users. Return type: int
-
pryv.user.create(username, password)¶ Creates a new user and returns it.
Parameters: - username (
str) – The name of the user. - password (
str) – The password of the user.
Returns: The instance of the user.
Return type: - username (