A command-line tool for uploading assets to an assets server.
Project description
This is intended to be a simple command-line tool for uploading assets to an https://assets.ubuntu.com-like assets server.
Installation
First install python3 pip, then:
sudo pip3 install canonicalwebteam.upload-assets
Usage
You should now have access to the upload-assetscommand:
$ upload-assets \
--api-url https://assets.EXAMPLE.com/v1/ \
--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=https://assets.example.com/v1/
$ 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
Close
Hashes for canonicalwebteam.upload-assets-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | df1c22eae53cda7fe5bfcc0d4ca629571754fd6e13bd79ab959d3b4c82a61487 |
|
MD5 | 98c038ca5cf638844c40a61621602073 |
|
BLAKE2b-256 | 3afab4cd10a19dc8a9f8cde4f5ce2610115f027d9e2c4cc89e6bc8fbe326b6cd |