Snapd.Snap

g GObject.Object GObject.Object Snapd.Snap Snapd.Snap GObject.Object->Snapd.Snap

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_apps ()

get_base ()

get_broken ()

get_categories ()

get_channel ()

get_channels ()

get_common_ids ()

get_confinement ()

get_contact ()

get_description ()

get_developer ()

get_devmode ()

get_download_size ()

get_hold ()

get_icon ()

get_id ()

get_install_date ()

get_installed_size ()

get_jailmode ()

get_license ()

get_media ()

get_mounted_from ()

get_name ()

get_prices ()

get_private ()

get_publisher_display_name ()

get_publisher_id ()

get_publisher_username ()

get_publisher_validation ()

get_revision ()

get_screenshots ()

get_snap_type ()

get_status ()

get_store_url ()

get_summary ()

get_title ()

get_tracking_channel ()

get_tracks ()

get_trymode ()

get_version ()

get_website ()

match_channel (name)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

apps

GLib.PtrArray

r/w/co

Apps this snap contains

base

str

r/w/co

Base snap this snap uses

broken

str

r/w/co

Error string if snap is broken

categories

GLib.PtrArray

r/w/co

Categories this snap belongs to

channel

str

r/w/co

Channel the snap is from

channels

GLib.PtrArray

r/w/co

Channels this snap is available on

common-ids

[str]

r/w/co

Common IDs

confinement

Snapd.Confinement

r/w/co

Confinement requested by the snap

contact

str

r/w/co

Method of contacting developer

description

str

r/w/co

Description of the snap

developer

str

d/r/w/co

Developer who created the snap deprecated

devmode

bool

r/w/co

True if the snap is currently installed in devmode

download-size

int

r/w/co

Download size in bytes

hold

GLib.DateTime

r/w/co

Date this snap will re-enable automatic refreshing

icon

str

r/w/co

URL to the snap icon

id

str

r/w/co

Unique ID for this snap

install-date

GLib.DateTime

r/w/co

Date this snap was installed

installed-size

int

r/w/co

Installed size in bytes

jailmode

bool

r/w/co

True if the snap is currently installed in jailmode

license

str

r/w/co

The snap license as an SPDX expression

media

GLib.PtrArray

r/w/co

Media associated with this snap

mounted-from

str

r/w/co

Path snap is mounted from

name

str

r/w/co

The snap name

prices

GLib.PtrArray

r/w/co

Prices this snap can be purchased for

private

bool

r/w/co

True if this snap is only available to its author

publisher-display-name

str

r/w/co

Display name for snap publisher

publisher-id

str

r/w/co

ID for snap publisher

publisher-username

str

r/w/co

Username for snap publisher

publisher-validation

Snapd.PublisherValidation

r/w/co

Validation for snap publisher

revision

str

r/w/co

Revision of this snap

screenshots

GLib.PtrArray

r/w/co

Screenshots of this snap

snap-type

Snapd.SnapType

r/w/co

Snap type

status

Snapd.SnapStatus

r/w/co

State of this snap

store-url

str

r/w/co

Web store URL

summary

str

r/w/co

One line description

title

str

r/w/co

The snap title

tracking-channel

str

r/w/co

Channel the snap is currently tracking

tracks

[str]

r/w/co

Track names

trymode

bool

r/w/co

True if this snap is installed in try mode

version

str

r/w/co

Snap version

website

str

r/w/co

Website of developer

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Snapd.Snap(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Snapd.SnapClass

Snapd.Snap contains Snap metadata.

New in version 1.0.

get_apps()
Returns:

an array of Snapd.App.

Return type:

[Snapd.App]

Get the apps this snap provides.

New in version 1.0.

get_base()
Returns:

a snap name or None if not set.

Return type:

str or None

Get the base snap this snap uses.

New in version 1.45.

get_broken()
Returns:

an error string or None if not broken.

Return type:

str or None

Get the reason this snap is broken.

New in version 1.25.

get_categories()
Returns:

an array of Snapd.Category.

Return type:

[Snapd.Category]

Gets the categories this snap belongs to.

New in version 1.64.

get_channel()
Returns:

a channel name.

Return type:

str

Get the channel this snap is from, e.g. “stable”.

New in version 1.0.

get_channels()
Returns:

an array of Snapd.Channel.

Return type:

[Snapd.Channel]

Gets the available channels for this snap.

New in version 1.22.

get_common_ids()
Returns:

an array of common ids.

Return type:

[str]

Get common IDs associated with this snap.

New in version 1.41.

get_confinement()
Returns:

a Snapd.Confinement.

Return type:

Snapd.Confinement

Get the confinement this snap is using, e.g. Snapd.Confinement.STRICT.

New in version 1.0.

get_contact()
Returns:

a contact URL.

Return type:

str

Get the means of contacting the snap developer, e.g. “mailto:developer`example`.com”.

New in version 1.13.

get_description()
Returns:

description text.

Return type:

str

Get a multi-line description of this snap. The description is formatted using a subset of Markdown. To parse this use a Snapd.MarkdownParser.

New in version 1.0.

get_developer()
Returns:

a developer name.

Return type:

str

Get the developer who created this snap.

New in version 1.0.

Deprecated since version 1.42: Use Snapd.Snap.get_publisher_username()

get_devmode()
Returns:

True if this snap is running in devmode.

Return type:

bool

Get if this snap is running in developer mode.

New in version 1.0.

get_download_size()
Returns:

a byte count.

Return type:

int

Get the download size of this snap or 0 if unknown.

New in version 1.0.

get_hold()
Returns:

a GLib.DateTime or None.

Return type:

GLib.DateTime or None

Get the date this snap will re-enable automatic refreshing or None if no hold is present.

New in version 1.64.

get_icon()
Returns:

a URL or path.

Return type:

str

Get the icon for this Snap, either a URL or an absolute path to retrieve it from snapd directly.

New in version 1.0.

get_id()
Returns:

an ID.

Return type:

str

Gets the unique ID for this snap.

New in version 1.0.

get_install_date()
Returns:

a GLib.DateTime or None.

Return type:

GLib.DateTime or None

Get the date this snap was installed or None if unknown.

New in version 1.0.

get_installed_size()
Returns:

a byte count.

Return type:

int

Get the installed size of this snap or 0 if unknown.

New in version 1.0.

get_jailmode()
Returns:

True if this snap is running in jailmode.

Return type:

bool

Get if this snap is running in enforced confinement (jail) mode.

New in version 1.8.

get_license()
Returns:

an SPDX license expression or None.

Return type:

str or None

Gets the SPDX license expression for this snap, e.g. “GPL-3.0+”.

New in version 1.19.

get_media()
Returns:

an array of Snapd.Media.

Return type:

[Snapd.Media]

Get media that is associated with this snap.

New in version 1.45.

get_mounted_from()
Returns:

a file path or None.

Return type:

str or None

Gets the path this snap is mounted from, which is a .snap file for installed snaps and a directory for snaps in try mode.

New in version 1.45.

get_name()
Returns:

a name.

Return type:

str

Get the name of this snap. This is used to reference this snap, e.g. for installing / removing.

New in version 1.0.

get_prices()
Returns:

an array of Snapd.Price.

Return type:

[Snapd.Price]

Get the prices that this snap can be purchased at.

New in version 1.0.

get_private()
Returns:

True if this is a private snap.

Return type:

bool

Get if this snap is only available to the developer.

New in version 1.0.

get_publisher_display_name()
Returns:

a publisher display name.

Return type:

str

Get the display name of the publisher who created this snap.

New in version 1.42.

get_publisher_id()
Returns:

a publisher ID.

Return type:

str

Get the ID of the publisher who created this snap.

New in version 1.42.

get_publisher_username()
Returns:

a publisher username.

Return type:

str

Get the username of the publisher who created this snap.

New in version 1.42.

get_publisher_validation()
Returns:

a Snapd.PublisherValidation.

Return type:

Snapd.PublisherValidation

Get the validation for the snap publisher, e.g. Snapd.PublisherValidation.VERIFIED

New in version 1.42.

get_revision()
Returns:

a revision string.

Return type:

str

Get the revision for this snap. The format of the string is undefined. See also Snapd.Snap.get_version().

New in version 1.0.

get_screenshots()
Returns:

an array of Snapd.Screenshot.

Return type:

[Snapd.Screenshot]

Get the screenshots that are available for this snap.

New in version 1.0.

Deprecated since version 1.45: Use Snapd.Snap.get_media()

get_snap_type()
Returns:

a Snapd.SnapType.

Return type:

Snapd.SnapType

Get the type of snap, e.g. Snapd.SnapType.APP

New in version 1.0.

get_status()
Returns:

a Snapd.SnapStatus.

Return type:

Snapd.SnapStatus

Get the current status of this snap, e.g. Snapd.SnapStatus.INSTALLED.

New in version 1.0.

get_store_url()
Returns:

a URL or None.

Return type:

str or None

Get a URL to the web snap store, e.g. “https://snapcraft.io/example”

New in version 1.60.

get_summary()
Returns:

a summary string.

Return type:

str

Get a single line summary for this snap, e.g. “Best app ever!”.

New in version 1.0.

get_title()
Returns:

a title or None.

Return type:

str or None

Get the title for this snap. If not available use the snap name instead.

New in version 1.14.

get_tracking_channel()
Returns:

a channel name.

Return type:

str

Get the channel that updates will be installed from, e.g. “stable”.

New in version 1.7.

get_tracks()
Returns:

an ordered array of track names.

Return type:

[str]

Get the tracks that are available.

New in version 1.22.

get_trymode()
Returns:

True if using trymode.

Return type:

bool

Get if this snap is running in try mode (installed locally and able to be directly modified).

New in version 1.0.

get_version()
Returns:

a version string.

Return type:

str

Get the version for this snap. The format of the string is undefined. See also Snapd.Snap.get_revision().

New in version 1.0.

get_website()
Returns:

a website URL.

Return type:

str

Get the website of the snap developer, e.g. “http://example.com”.

New in version 1.50.

match_channel(name)
Parameters:

name (str) – a channel name.

Returns:

an Snapd.Channel or None.

Return type:

Snapd.Channel or None

Finds the available channel that best matches the given name. If none matches None is returned.

New in version 1.22.

Property Details

Snapd.Snap.props.apps
Name:

apps

Type:

GLib.PtrArray

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Apps this snap contains

Snapd.Snap.props.base
Name:

base

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Base snap this snap uses

Snapd.Snap.props.broken
Name:

broken

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Error string if snap is broken

Snapd.Snap.props.categories
Name:

categories

Type:

GLib.PtrArray

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Categories this snap belongs to

Snapd.Snap.props.channel
Name:

channel

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Channel the snap is from

Snapd.Snap.props.channels
Name:

channels

Type:

GLib.PtrArray

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Channels this snap is available on

Snapd.Snap.props.common_ids
Name:

common-ids

Type:

[str]

Default Value:

[]

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Common IDs

Snapd.Snap.props.confinement
Name:

confinement

Type:

Snapd.Confinement

Default Value:

Snapd.Confinement.UNKNOWN

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Confinement requested by the snap

Snapd.Snap.props.contact
Name:

contact

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Method of contacting developer

Snapd.Snap.props.description
Name:

description

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Description of the snap

Snapd.Snap.props.developer
Name:

developer

Type:

str

Default Value:

None

Flags:

DEPRECATED, READABLE, WRITABLE, CONSTRUCT_ONLY

Developer who created the snap

Deprecated since version ???.

Snapd.Snap.props.devmode
Name:

devmode

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

True if the snap is currently installed in devmode

Snapd.Snap.props.download_size
Name:

download-size

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Download size in bytes

Snapd.Snap.props.hold
Name:

hold

Type:

GLib.DateTime

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Date this snap will re-enable automatic refreshing

Snapd.Snap.props.icon
Name:

icon

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

URL to the snap icon

Snapd.Snap.props.id
Name:

id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Unique ID for this snap

Snapd.Snap.props.install_date
Name:

install-date

Type:

GLib.DateTime

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Date this snap was installed

Snapd.Snap.props.installed_size
Name:

installed-size

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Installed size in bytes

Snapd.Snap.props.jailmode
Name:

jailmode

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

True if the snap is currently installed in jailmode

Snapd.Snap.props.license
Name:

license

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The snap license as an SPDX expression

Snapd.Snap.props.media
Name:

media

Type:

GLib.PtrArray

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Media associated with this snap

Snapd.Snap.props.mounted_from
Name:

mounted-from

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Path snap is mounted from

Snapd.Snap.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The snap name

Snapd.Snap.props.prices
Name:

prices

Type:

GLib.PtrArray

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Prices this snap can be purchased for

Snapd.Snap.props.private
Name:

private

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

True if this snap is only available to its author

Snapd.Snap.props.publisher_display_name
Name:

publisher-display-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Display name for snap publisher

Snapd.Snap.props.publisher_id
Name:

publisher-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

ID for snap publisher

Snapd.Snap.props.publisher_username
Name:

publisher-username

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Username for snap publisher

Snapd.Snap.props.publisher_validation
Name:

publisher-validation

Type:

Snapd.PublisherValidation

Default Value:

Snapd.PublisherValidation.UNKNOWN

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Validation for snap publisher

Snapd.Snap.props.revision
Name:

revision

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Revision of this snap

Snapd.Snap.props.screenshots
Name:

screenshots

Type:

GLib.PtrArray

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Screenshots of this snap

Snapd.Snap.props.snap_type
Name:

snap-type

Type:

Snapd.SnapType

Default Value:

Snapd.SnapType.UNKNOWN

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Snap type

Snapd.Snap.props.status
Name:

status

Type:

Snapd.SnapStatus

Default Value:

Snapd.SnapStatus.UNKNOWN

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

State of this snap

Snapd.Snap.props.store_url
Name:

store-url

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Web store URL

Snapd.Snap.props.summary
Name:

summary

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

One line description

Snapd.Snap.props.title
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The snap title

Snapd.Snap.props.tracking_channel
Name:

tracking-channel

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Channel the snap is currently tracking

Snapd.Snap.props.tracks
Name:

tracks

Type:

[str]

Default Value:

[]

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Track names

Snapd.Snap.props.trymode
Name:

trymode

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

True if this snap is installed in try mode

Snapd.Snap.props.version
Name:

version

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Snap version

Snapd.Snap.props.website
Name:

website

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Website of developer