Skip to content

Credentials

isDefault class-attribute instance-attribute

isDefault: bool = False

token class-attribute instance-attribute

token: str | None = None

refreshToken class-attribute instance-attribute

refreshToken: str | None = None

serverInfo class-attribute instance-attribute

serverInfo: ServerInfo = Field(default_factory=ServerInfo)

userInfo class-attribute instance-attribute

userInfo: UserInfo = Field(default_factory=UserInfo)

id class-attribute instance-attribute

id: str | None = None

from_token classmethod

from_token(token: str, server_url: str | None = None)
Source code in src/specklepy/core/api/credentials.py
@classmethod
def from_token(cls, token: str, server_url: str | None = None):
    acct = cls(token=token)
    acct.serverInfo.url = server_url
    return acct

id class-attribute instance-attribute

id: str | None = None

name class-attribute instance-attribute

name: str | None = None

email class-attribute instance-attribute

email: str | None = None

company class-attribute instance-attribute

company: str | None = None

avatar class-attribute instance-attribute

avatar: str | None = None
Source code in src/specklepy/core/api/credentials.py
def __init__(self, url: str = None) -> None:
    raise SpeckleException(
        message=(
            "The StreamWrapper has moved as of v2.6.0! Please import from"
            " specklepy.api.wrapper"
        ),
        exception=DeprecationWarning(),
    )