code: def save(self):
          
  
          import json
  
          payload = {}
          payload.update(self._store)
          payload["user"] = payload["username"]
          payload["passwd"] = payload["password"]
          del(payload["username"])
          del(payload["password"])
  
          payload = json.dumps(payload, default=str)
          if not self.URL :
              if "username" not in self._store or "password" not in self._store :
                  raise KeyError("You must define self['name'] and self['password'] to be able to create a new user")
  
              r = self.connection.session.post(self.users.URL, data = payload)
              data = r.json()
              if r.status_code == 201 :
                  self._set(data)
              else :
                  raise CreationError("Unable to create new user", data)
          else :
              r = self.connection.session.put(self.URL, data = payload)
              data = r.json()
              if r.status_code == 200 :
                  self._set(data)
              else :
                  raise UpdateError("Unable to update user, status: %s" %r.status_code, data)
docs: Save/updates the user