Skip to main content

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

  1. Create a virtual environment and activate it
python3 -m venv venv
source venv/bin/activate
  1. Install local pip packages
pip install .
  1. 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)

Source distribution for canonicalwebteam.upload-assets 0.4.1
File Size Uploaded
canonicalwebteam.upload-assets-0.4.1.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for canonicalwebteam.upload-assets 0.4.1
File Interpreter ABI Platform
canonicalwebteam.upload_assets-0.4.1-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

1 release file

0.1.0

1 release file

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