A command-line tool for uploading assets to an assets server.
Project description
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
Usage
You should now have access to the upload-assets
command:
$ upload-assets \
--api-domain assets.EXAMPLE.com \
--api-token XXXXXXXX \
~/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
Project details
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
Close
Hashes for canonicalwebteam.upload-assets-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92667e2a45d633963e3f65bece4956f0229f851423934690f483d90fc2988a42 |
|
MD5 | f46978c33695c93dfa10f57ff7f58a04 |
|
BLAKE2b-256 | 2b7779e67a40fa152db401bfa2b98998cfa891211dce965fa998243f00fb414e |
Close
Hashes for canonicalwebteam.upload_assets-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94a37b5ebb6970c9df165b42dd5d7b31022182067ea5c9a4eb167eed80f7f5a0 |
|
MD5 | 6f9ef4e3fc2d701cb742f7ce0b294b16 |
|
BLAKE2b-256 | f6897a85747952355c1352f7aa17ac8b218e2610bbf258793db1e6809868affe |