Skip to main content

snap-http

check

snap-http is a Python library used to interact with snapd's REST API, allowing you to programmatically install and manage snaps in your Python applications. It has no dependencies other than Python 3.8 or higher.

Installation

pip install snap-http

Usage

Take a look at the api module to see what methods are available. Here's a couple examples:

List installed snaps

>>> import snap_http
>>> response = snap_http.list()
>>> for snap in response.result:
...     print(snap["name"])
juju
snapd
core20
snapcraft
snap-store
<etc>

Install a snap

Most actual changes to snaps happen asynchronously, so you need to check back on the change using the change ID if you want to know the final result.

N.B.: installation may require root permissions.

>>> import snap_http
>>> response = snap_http.install("hello")
>>> response
SnapdResponse(type='async', status_code=202, status='Accepted', result=None, sources=None, change='1395')
>>> response = snap_http.check_change(response.change)
>>> response.result["status"]
'Done'

Metadata

Release files for snap-http 1.12.1

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-http 1.12.1
File Size Uploaded
snap_http-1.12.1.tar.gz 17.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for snap-http 1.12.1
File Interpreter ABI Platform
snap_http-1.12.1-py3-none-any.whl Python 3 none any Details

Total release size: 40.7 kB

Release files / snap_http-1.12.1.tar.gz

Download URL snap_http-1.12.1.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
75e3ea0bd14bbf6498af24935160525f82035fbd0b001a86ccc541de230f5a9c
BLAKE2b-256 checksum
How to use checksums
946b18772132cd28914a99847913daef9c0f44ecea8f999baf51c9c7bfc7dae0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.12.3 Linux/7.0.0-28-generic

Release files / snap_http-1.12.1-py3-none-any.whl

Download URL snap_http-1.12.1-py3-none-any.whl
Size 22.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
972978c7e873beca9741a3ccc2e59c68b622fe5f2cf5c2bd7a49af3c0a04661a
BLAKE2b-256 checksum
How to use checksums
7f9806e7e07676d3de4d38673f42afd9496088008e32334010bd512787a66cb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.12.3 Linux/7.0.0-28-generic

Release history Release notifications | RSS feed

This release

1.12.1 This release

2 release files

1.12.0

2 release files

1.11.0

2 release files

1.10.1

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

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