[![Build Status](https://img.shields.io/github/workflow/status/micro-fan/pyupdater-http/main)](https://github.com/micro-fan/pyupdater-http/actions)
[![PyPi version](https://img.shields.io/pypi/v/pyupdater-http.svg)](https://pypi.python.org/pypi/pyupdater-http)
## Parameters
* `server_url` - add basic auth if you need it
* `data_params` - additional params that will be passed with file
* `filename_param` - field name for file name if your server need it
## Usage Example
### with `codeskyblue/gohttpserver`
Traefik is optional, you can export direct ports. This is just reminder of how we're doing it
```bash
$ pip install --user -U dot-tools
$ exec zsh
# if you have local packages in your `PATH`
# like: `/home/user/.local/bin/traefik_run`
$ traefik_run up -d
```
Then launch your web site
```yaml
version: '3.9'
services:
releases_server:
image: codeskyblue/gohttpserver:1.1.0
container_name: releases_server
# define only if you want to have basic-auth
command: --auth-type http --auth-http basic_auth_user:basic_auth_password
volumes:
- ./uploads:/app/public
# you can export ports if you're not using traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.releases.rule=Host(`releases.example.com`)"
- "traefik.http.routers.releases.entrypoints=web"
```
And put into `uploads` directory file `.ghs.yaml`:
```yaml
---
upload: false
delete: false
users:
- email: "cybergrind@example.com"
delete: true
upload: true
token: auth_token_for_upload
```
And add configuration in your `config.pyu`
```json
{
"app_config": {
"PLUGIN_CONFIGS": {
"httpuploader-@cybergrind": {
"server_url": "http://basic_auth_user:basic_auth_password@releases.example.com/",
"data_params": {
"token": "auth_token_for_upload"
},
"timeout": 600,
"filename_param": "filename"
}
}
}
}
```
Raw data
{
"_id": null,
"home_page": "https://github.com/micro-fan/pyupdater-http",
"name": "pyupdater-http",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "pyupdater,pyupdater-plugin,http",
"author": "Kirill Pinchuk",
"author_email": "cybergrind@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/16/b7/5a331f6491fa7480a805ffd96ecabdcef9b8c36a818f79b713e2b68f7b0b/pyupdater_http-0.7.0.tar.gz",
"platform": null,
"description": "[![Build Status](https://img.shields.io/github/workflow/status/micro-fan/pyupdater-http/main)](https://github.com/micro-fan/pyupdater-http/actions)\n[![PyPi version](https://img.shields.io/pypi/v/pyupdater-http.svg)](https://pypi.python.org/pypi/pyupdater-http)\n\n\n## Parameters\n\n* `server_url` - add basic auth if you need it\n* `data_params` - additional params that will be passed with file\n* `filename_param` - field name for file name if your server need it\n\n\n## Usage Example\n\n### with `codeskyblue/gohttpserver`\n\n\nTraefik is optional, you can export direct ports. This is just reminder of how we're doing it\n\n```bash\n$ pip install --user -U dot-tools\n$ exec zsh\n\n# if you have local packages in your `PATH`\n# like: `/home/user/.local/bin/traefik_run`\n\n$ traefik_run up -d\n```\n\nThen launch your web site\n\n```yaml\nversion: '3.9'\n\nservices:\n releases_server:\n image: codeskyblue/gohttpserver:1.1.0\n container_name: releases_server\n # define only if you want to have basic-auth\n command: --auth-type http --auth-http basic_auth_user:basic_auth_password\n volumes:\n - ./uploads:/app/public\n # you can export ports if you're not using traefik\n labels:\n - \"traefik.enable=true\"\n - \"traefik.http.routers.releases.rule=Host(`releases.example.com`)\"\n - \"traefik.http.routers.releases.entrypoints=web\"\n\n```\n\nAnd put into `uploads` directory file `.ghs.yaml`:\n\n```yaml\n---\nupload: false\ndelete: false\nusers:\n- email: \"cybergrind@example.com\"\n delete: true\n upload: true\n token: auth_token_for_upload\n```\n\nAnd add configuration in your `config.pyu`\n\n```json\n{\n \"app_config\": {\n \"PLUGIN_CONFIGS\": {\n \"httpuploader-@cybergrind\": {\n \"server_url\": \"http://basic_auth_user:basic_auth_password@releases.example.com/\",\n \"data_params\": {\n \"token\": \"auth_token_for_upload\"\n },\n \"timeout\": 600,\n \"filename_param\": \"filename\"\n }\n }\n }\n}\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "PyUpdater Plugin: HTTP upload support",
"version": "0.7.0",
"split_keywords": [
"pyupdater",
"pyupdater-plugin",
"http"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "a4b3ede00021242ba2dd3f8b922db9f1",
"sha256": "7c0f863bd7824ce1949a7866ac3be49330a6e50643635519a053269f06a8bbb4"
},
"downloads": -1,
"filename": "pyupdater_http-0.7.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a4b3ede00021242ba2dd3f8b922db9f1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 2975,
"upload_time": "2022-11-30T08:39:32",
"upload_time_iso_8601": "2022-11-30T08:39:32.349079Z",
"url": "https://files.pythonhosted.org/packages/d0/a5/7896f6ef11a66da4088d63b8c4b6c3c0fe2c809e94972a475eb0b4b81085/pyupdater_http-0.7.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "596c51c5827213d5e40185fd1aef2237",
"sha256": "0e915efa81f62541ebd58070b897a225f73a960cadcc03afe50f11215af61f6b"
},
"downloads": -1,
"filename": "pyupdater_http-0.7.0.tar.gz",
"has_sig": false,
"md5_digest": "596c51c5827213d5e40185fd1aef2237",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 3091,
"upload_time": "2022-11-30T08:39:34",
"upload_time_iso_8601": "2022-11-30T08:39:34.478357Z",
"url": "https://files.pythonhosted.org/packages/16/b7/5a331f6491fa7480a805ffd96ecabdcef9b8c36a818f79b713e2b68f7b0b/pyupdater_http-0.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-11-30 08:39:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "micro-fan",
"github_project": "pyupdater-http",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pyupdater-http"
}