# A command-line tool for managing [assets.ubuntu.com](https://github.com/canonical-web-and-design/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](https://snapcraft.io/)-enabled system, you can simply:
``` bash
sudo snap install upload-assets
```
### Pip install
If you can't install the snap, you can install with pip.
First [install python3 pip](http://stackoverflow.com/questions/6587507/how-to-install-pip-with-python-3), then:
``` bash
sudo pip3 install canonicalwebteam.upload-assets
```
## Usage
You should now have access to the `upload-assets` command:
``` bash
$ 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:
``` bash
$ export UPLOAD_ASSETS_API_TOKEN=<api-token>
$ export UPLOAD_ASSETS_API_DOMAIN=assets.example.com
$ upload-assets EXAMPLE_IMAGE.png
```
Raw data
{
"_id": null,
"home_page": "https://github.com/canonical-web-and-design/upload-assets",
"name": "canonicalwebteam.upload-assets",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Canonical webteam",
"author_email": "robin+pypi@canonical.com",
"download_url": "https://files.pythonhosted.org/packages/2b/77/79e67a40fa152db401bfa2b98998cfa891211dce965fa998243f00fb414e/canonicalwebteam.upload-assets-0.3.0.tar.gz",
"platform": null,
"description": "# A command-line tool for managing [assets.ubuntu.com](https://github.com/canonical-web-and-design/assets.ubuntu.com)\n\nThis is intended to be a simple command-line tool for uploading assets to an <https://assets.ubuntu.com>-like assets\nserver.\n\n## Installation\n\n### Snap install\n\nOn a [snap](https://snapcraft.io/)-enabled system, you can simply:\n\n``` bash\nsudo snap install upload-assets\n```\n\n### Pip install\n\nIf you can't install the snap, you can install with pip.\n\nFirst [install python3 pip](http://stackoverflow.com/questions/6587507/how-to-install-pip-with-python-3), then:\n\n``` bash\nsudo pip3 install canonicalwebteam.upload-assets\n```\n\n## Usage\n\nYou should now have access to the `upload-assets` command:\n\n``` bash\n$ upload-assets \\\n --api-domain assets.EXAMPLE.com \\\n --api-token XXXXXXXX \\\n ~/EXAMPLE_DIRECTORY ./EXAMPLE_IMAGE.png\n[\n {\"url\": \"https://assets.ubuntu.com/v1/2071d161-EXAMPLE_IMAGE.png\", \"filepath\": \"/home/robin/EXAMPLE_IMAGE.png\"},\n {\"url\": \"https://assets.ubuntu.com/v1/2071d161-IMAGE1.png\", \"filepath\": \"/home/robin/EXAMPLE_DIRECTORY/IMAGE1.png\"},\n {\"url\": \"https://assets.ubuntu.com/v1/2071d161-IMAGE2.png\", \"filepath\": \"/home/robin/EXAMPLE_DIRECTORY/IMAGE2.png\"}\n]\n```\n\n## Configuration\n\nTo avoid specifying them every time, you can store both the URL and the token for the assets API in environment variables:\n\n``` bash\n$ export UPLOAD_ASSETS_API_TOKEN=<api-token>\n$ export UPLOAD_ASSETS_API_DOMAIN=assets.example.com\n$ upload-assets EXAMPLE_IMAGE.png\n```\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "A command-line tool for uploading assets to an assets server.",
"version": "0.3.0",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f6897a85747952355c1352f7aa17ac8b218e2610bbf258793db1e6809868affe",
"md5": "6f9ef4e3fc2d701cb742f7ce0b294b16",
"sha256": "94a37b5ebb6970c9df165b42dd5d7b31022182067ea5c9a4eb167eed80f7f5a0"
},
"downloads": -1,
"filename": "canonicalwebteam.upload_assets-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6f9ef4e3fc2d701cb742f7ce0b294b16",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4700,
"upload_time": "2023-01-23T08:42:45",
"upload_time_iso_8601": "2023-01-23T08:42:45.443273Z",
"url": "https://files.pythonhosted.org/packages/f6/89/7a85747952355c1352f7aa17ac8b218e2610bbf258793db1e6809868affe/canonicalwebteam.upload_assets-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2b7779e67a40fa152db401bfa2b98998cfa891211dce965fa998243f00fb414e",
"md5": "f46978c33695c93dfa10f57ff7f58a04",
"sha256": "92667e2a45d633963e3f65bece4956f0229f851423934690f483d90fc2988a42"
},
"downloads": -1,
"filename": "canonicalwebteam.upload-assets-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "f46978c33695c93dfa10f57ff7f58a04",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4078,
"upload_time": "2023-01-23T08:42:46",
"upload_time_iso_8601": "2023-01-23T08:42:46.963477Z",
"url": "https://files.pythonhosted.org/packages/2b/77/79e67a40fa152db401bfa2b98998cfa891211dce965fa998243f00fb414e/canonicalwebteam.upload-assets-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-23 08:42:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "canonical-web-and-design",
"github_project": "upload-assets",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "canonicalwebteam.upload-assets"
}