Interact with snapd and snapstore(s) from Python
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file snap_python-0.1.4.tar.gz.
File metadata
- Download URL: snap_python-0.1.4.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.12.10 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a44133d2974f4d80481770d29504a4da8d0ac4637ead7227fc046952f0b1c25
|
|
| MD5 |
1464cf0848d84b607a88395aa336c9f8
|
|
| BLAKE2b-256 |
b36a4730804742e8410cc665c6e902069138bfc535646715a97e6dfdb2070f3a
|
File details
Details for the file snap_python-0.1.4-py3-none-any.whl.
File metadata
- Download URL: snap_python-0.1.4-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.12.10 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5efc93252e02caf71bf4fdf94d019c34847e2ceffd117f1ed9a60846f8aa65d0
|
|
| MD5 |
77a85a3dcfe15fe7a08972bc140dae76
|
|
| BLAKE2b-256 |
80ae3d514caae2d04fe648102485b776ebf52f794c1c9796958fb0d2078469fe
|