Skip to main content

snap-python

snap-python provides an API client to interact with snapd

Click here to read the documentation

Installation

To install snap-python, you can use pip:

pip install snap-python

Usage

Here is a simple example of how to use snap-python:

# uses asyncio, must be run in an event loop
>>> import asyncio
>>> from snap_python.client import SnapClient
>>> sc = SnapClient()
>>> installed_snaps = asyncio.run(sc.snaps.list_installed_snaps())
>>> [snap.name for snap in installed_snaps.result]
[..., 'vlc', 'snapcraft', 'firefox', 'store-tui', 'gtk-common-themes', 'thunderbird', ...]

Get details for installed snap vlc

# uses asyncio, must be run in an event loop
>>> import asyncio
>>> from snap_python.client import SnapClient
>>> sc = SnapClient()
>>> vlc_snap = asyncio.run(sc.snaps.get_snap_info("vlc"))
>>> vlc_snap.result.version
'3.0.20-1-g2617de71b6'

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Metadata

Release files for snap-python 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snap-python 0.1.7
File Size Uploaded
snap_python-0.1.7.tar.gz 19.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for snap-python 0.1.7
File Interpreter ABI Platform
snap_python-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 46.3 kB

Release files / snap_python-0.1.7.tar.gz

Download URL snap_python-0.1.7.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
dea741da3b70fc9f1dc6f8e7a7489d97270d98539d7309d280ba64ca546ab71b
BLAKE2b-256 checksum
How to use checksums
ff9357ea94887f493362d980c98223d19f8e2c9723555ca3f51c1bdfd6818e4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure

Release files / snap_python-0.1.7-py3-none-any.whl

Download URL snap_python-0.1.7-py3-none-any.whl
Size 27.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc9615c2c6b9b52e0d8d348bbb1fc115b9f00ac6afb4149227b3bf8240a69e84
BLAKE2b-256 checksum
How to use checksums
e903a3c3751e08ec10693bdc5137cf8a7c644726b77ebcd6a48dadb2eec6b521
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page