PyUpdater Plugin: HTTP upload support
Project description
Parameters
server_url
- add basic auth if you need itdata_params
- additional params that will be passed with filefilename_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
$ 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
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
:
---
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
{
"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"
}
}
}
}
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
pyupdater_http-0.7.0.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file pyupdater_http-0.7.0.tar.gz
.
File metadata
- Download URL: pyupdater_http-0.7.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.9.9 Linux/6.0.10-arch2-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e915efa81f62541ebd58070b897a225f73a960cadcc03afe50f11215af61f6b |
|
MD5 | 596c51c5827213d5e40185fd1aef2237 |
|
BLAKE2b-256 | 16b75a331f6491fa7480a805ffd96ecabdcef9b8c36a818f79b713e2b68f7b0b |
File details
Details for the file pyupdater_http-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: pyupdater_http-0.7.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.9.9 Linux/6.0.10-arch2-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c0f863bd7824ce1949a7866ac3be49330a6e50643635519a053269f06a8bbb4 |
|
MD5 | a4b3ede00021242ba2dd3f8b922db9f1 |
|
BLAKE2b-256 | d0a57896f6ef11a66da4088d63b8c4b6c3c0fe2c809e94972a475eb0b4b81085 |