A command-line tool for managing assets.ubuntu.com
This is intended to be a simple command-line tool for uploading assets to an https://assets.ubuntu.com-like assets server.
Installation
Snap install
On a snap-enabled system, you can simply:
sudo snap install upload-assets
Pip install
If you can't install the snap, you can install with pip.
First install python3 pip, then:
sudo pip3 install canonicalwebteam.upload-assets
Manual Install from this repo
- Create a virtual environment and activate it
python3 -m venv venv
source venv/bin/activate
- Install local pip packages
pip install .
- Install pip packages from requirements
pip install -r requirements.txt
Usage
You should now have access to the upload-assets command:
$ UPLOAD_ASSETS_API_TOKEN=XXXXXXXX upload-assets \
-d assets.EXAMPLE.com \
~/EXAMPLE_DIRECTORY ./EXAMPLE_IMAGE.png
[
{"url": "https://assets.ubuntu.com/v1/2071d161-EXAMPLE_IMAGE.png", "filepath": "/home/robin/EXAMPLE_IMAGE.png"},
{"url": "https://assets.ubuntu.com/v1/2071d161-IMAGE1.png", "filepath": "/home/robin/EXAMPLE_DIRECTORY/IMAGE1.png"},
{"url": "https://assets.ubuntu.com/v1/2071d161-IMAGE2.png", "filepath": "/home/robin/EXAMPLE_DIRECTORY/IMAGE2.png"}
]
Configuration
To avoid specifying them every time, you can store both the URL and the token for the assets API in environment variables:
$ export UPLOAD_ASSETS_API_TOKEN=<api-token>
$ export UPLOAD_ASSETS_API_DOMAIN=assets.example.com
$ upload-assets EXAMPLE_IMAGE.png
Metadata
Release files for canonicalwebteam.upload-assets 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| canonicalwebteam.upload-assets-0.4.1.tar.gz | 5.0 kB | Without provenance | Details for canonicalwebteam.upload-assets-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| canonicalwebteam.upload_assets-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for canonicalwebteam.upload_assets-0.4.1-py3-none-any.whl |
Total release size: 10.6 kB
Release files / canonicalwebteam.upload-assets-0.4.1.tar.gz
| Download URL | canonicalwebteam.upload-assets-0.4.1.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b175eab8d4bb485c8188b3fd085284a8948730b1af308fda7764f59c8e39fcd4
|
|
BLAKE2b-256 checksum How to use checksums |
f5de89fa2806f5835fb505ff3c7f8371e8fd6e679a420d57a4ada9584c013a85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.17
|
Release files / canonicalwebteam.upload_assets-0.4.1-py3-none-any.whl
| Download URL | canonicalwebteam.upload_assets-0.4.1-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf299cce4e6b64c79af4da2e33f4aac80a090d1e9f36639f56fc6d633fec3d7f
|
|
BLAKE2b-256 checksum How to use checksums |
cc9074142d583d43a910767ea5d8bfa8c460ced6c0ab5d56cca31bb4298a43a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.17
|
Security for canonicalwebteam.upload-assets 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.