__init__ constructor
Leave feedback
On this page
Initializes a new instance of User class.
def __init__(self):
...
Initializes a new instance of User.
def __init__(self, id, name, role):
...
| Parameter | Type | Description |
|---|---|---|
| id | int |
The user id. |
| name | str |
The user name. |
| role | Role |
The user role. |
from groupdocs.annotation.models import User, Role
# Create a user with a name and role
user = User(name="Tom", role=Role.EDITOR)
# Create a user with an explicit id
user_with_id = User(id=123, name="Jack", role=Role.VIEWER)
- class
User
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.