Skip to main content

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

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-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

canonicalwebteam.upload-assets-0.2.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file canonicalwebteam.upload-assets-0.2.1.tar.gz.

File metadata

  • Download URL: canonicalwebteam.upload-assets-0.2.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for canonicalwebteam.upload-assets-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2f399efe91ab9d87b51fc2a0f18c702804320c9e04a6b21dd4436201d023cb91
MD5 eb2818c400b88b5fbc3a1c83cb1c4d6b
BLAKE2b-256 bdd28b2a9bf04f036c5d907ab1e5041fca6f78188ad4f7b6ad4713d09f59d1cf

See more details on using hashes here.

File details

Details for the file canonicalwebteam.upload_assets-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: canonicalwebteam.upload_assets-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for canonicalwebteam.upload_assets-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f3f5afdbbfdd5c1efb48a6d9547c3e819c6d0bdbd018e3a170650f936b03b31f
MD5 d7a5427e276d30943d029df48ab88b6d
BLAKE2b-256 80cc1219ffe147bc3fe2467537f0e7e09510915a1d7f636b4fbad838464fc19c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page