maestral.core ============= .. py:module:: maestral.core .. autoapi-nested-parse:: Dataclasses for our internal and external APIs. Module Contents --------------- .. py:class:: AccountType Bases: :py:obj:`enum.Enum` Enum of account types .. py:attribute:: Basic :value: 'basic' .. py:attribute:: Pro :value: 'pro' .. py:attribute:: Business :value: 'business' .. py:attribute:: Other :value: 'other' .. py:class:: Team A group of users with joint access to shared folders .. py:attribute:: id :type: str Unique identifier of the team .. py:attribute:: name :type: str Display name of the team .. py:class:: RootInfo Namespace info for the root of a shared filesystem .. py:attribute:: root_namespace_id :type: str Unique ID of the user's root namespace .. py:attribute:: home_namespace_id :type: str Unique ID of the user's personal namespace This will be different from :attr:`root_namespace_id` when Maestral is set up to sync the shared folder of a team. .. py:class:: UserRootInfo Bases: :py:obj:`RootInfo` Namespace info for the root of a shared filesystem .. py:class:: TeamRootInfo Bases: :py:obj:`RootInfo` Namespace info for the root of a shared filesystem .. py:attribute:: home_path :type: str Path of the user's personal home folder relative to the root namespace Only present for accounts set up as part of a team when syncing the entire team's folder. .. py:class:: Account Represents the user's account .. py:attribute:: account_id :type: str Unique account ID .. py:attribute:: display_name :type: str The user's name for display purposes .. py:attribute:: email :type: str The user's email address .. py:attribute:: email_verified :type: bool Whether the email address was verified .. py:attribute:: profile_photo_url :type: str | None A URL to the user's photo .. py:attribute:: disabled :type: bool Whether the account is disabled .. py:class:: FullAccount Bases: :py:obj:`Account` Represents the user's account and sync information .. py:attribute:: country :type: str | None The user's country .. py:attribute:: locale :type: str The user's locale .. py:attribute:: team :type: Team | None The team that a user belongs to, if any .. py:attribute:: team_member_id :type: str | None The member ID of user in a team, if any .. py:attribute:: account_type :type: AccountType The account type .. py:attribute:: root_info :type: RootInfo The user's root namespace to sync .. py:class:: SpaceUsage Space usage information .. py:attribute:: used :type: int Space used by in bytes .. py:attribute:: allocated :type: int Space available in bytes .. py:class:: PersonalSpaceUsage Bases: :py:obj:`SpaceUsage` Space usage information for a user .. py:attribute:: team_usage :type: SpaceUsage | None Space usage of a user's team, if any .. py:class:: WriteMode Bases: :py:obj:`enum.Enum` Enum of write modes when uploading a file .. py:attribute:: Add :value: 'add' .. py:attribute:: Update :value: 'update' .. py:attribute:: Overwrite :value: 'overwrite' .. py:class:: Metadata Base class for sync item metadata .. py:attribute:: name :type: str Name of the file or folder .. py:attribute:: path_lower :type: str Normalised path on the server .. py:attribute:: path_display :type: str Cased path for display purposes and the local file system .. py:class:: DeletedMetadata Bases: :py:obj:`Metadata` Metadata of a deleted item .. py:class:: FileMetadata Bases: :py:obj:`Metadata` File metadata .. py:attribute:: id :type: str Unique ID on the server .. py:attribute:: client_modified :type: datetime.datetime Modified time in UTC as provided by clients .. py:attribute:: server_modified :type: datetime.datetime Server-side modified time in UTC .. py:attribute:: rev :type: str Unique ID of this version of a file .. py:attribute:: size :type: int File size in bytes .. py:attribute:: symlink_target :type: str | None If the file is a symlink, path of the target relative to the root namespace .. py:attribute:: shared :type: bool Whether the file is shared .. py:attribute:: modified_by :type: str | None Unique ID of the account that created / modified this revision .. py:attribute:: is_downloadable :type: bool Whether the file can be downloaded .. py:attribute:: content_hash :type: str A content hash of the file .. py:class:: FolderMetadata Bases: :py:obj:`Metadata` Folder metadata .. py:attribute:: id :type: str Unique ID on the server .. py:attribute:: shared :type: bool Whether the folder is shared .. py:class:: ListFolderResult Result from listing the contents of a folder .. py:attribute:: entries :type: list[Metadata] List of entries .. py:attribute:: has_more :type: bool Whether there are more entries than listed .. py:attribute:: cursor :type: str Cursor to iterate and fetch more entries .. py:class:: LinkAccessLevel Bases: :py:obj:`enum.Enum` Enum of access levels to shared links .. py:attribute:: Viewer :value: 'viewer' .. py:attribute:: Editor :value: 'editor' .. py:attribute:: Other :value: 'other' .. py:class:: LinkAudience Bases: :py:obj:`enum.Enum` Enum of shared link audience .. py:attribute:: Public :value: 'public' .. py:attribute:: Team :value: 'team' .. py:attribute:: NoOne :value: 'no_one' .. py:attribute:: Other :value: 'other' .. py:class:: LinkPermissions Permissions for a shared link .. py:attribute:: can_revoke :type: bool If the link can be revoked .. py:attribute:: allow_download :type: bool If the link allows users to download the item .. py:attribute:: effective_audience :type: LinkAudience The effective audience of link (who can use it) .. py:attribute:: link_access_level :type: LinkAccessLevel The type of access that the link grants to the item (how they can use it) .. py:attribute:: require_password :type: bool | None Whether a password is required when accessing the item through this link Note that users who already have access to an item otherwise will not need a password regardless of this value. .. py:class:: SharedLinkMetadata Metadata for a shared link .. py:attribute:: url :type: str The URL string .. py:attribute:: name :type: str The basename of the item .. py:attribute:: path_lower :type: str | None The normalised path of the item .. py:attribute:: expires :type: datetime.datetime | None Expiry time for a link in UTC .. py:attribute:: link_permissions :type: LinkPermissions Permissions that a link grants its users .. py:class:: ListSharedLinkResult Result from listing shared links .. py:attribute:: entries :type: list[SharedLinkMetadata] List of shared link metadata .. py:attribute:: has_more :type: bool Whether there are more items to fetch .. py:attribute:: cursor :type: str A cursor to continue iterating over shared links .. py:class:: UpdateCheckResult Information on update availability .. py:attribute:: update_available :type: bool Whether an update to Maestral is available .. py:attribute:: latest_release :type: str The latest release that can be updated to .. py:attribute:: release_notes :type: str Release notes for all releases between the currently running version up to and including the latest version