Skip to main content

PyUpdater Plugin: HTTP upload support

Project description

Build Status PyPi version

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

$ 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 hashes)

Uploaded Source

Built Distribution

pyupdater_http-0.7.0-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

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