wmo-im / wis2downloader

The backend Python package for downloading real-time data from the WIS2 network.
Apache License 2.0
0 stars 0 forks source link

add schemas for config files #16

Open david-i-berry opened 1 month ago

david-i-berry commented 1 month ago
david-i-berry commented 3 weeks ago

config.json schema added to readme (in yaml)

schema:
  type: object
  properties:
    broker_hostname:
      type: string
      description: The hostname of the global broker to subscribe to.
      example: globalbroker.meteo.fr
    broker_password:
      type: string
      description: The password to use when connecting to the specified global broker.      
      example: everyone
    broker_port:
      type: number
      description: The port the global broker is using for the specified protocol.
      example: 443
    broker_protocol:
      type: string
      description: The protocol (websockets or tcp) to use when connecting to the global broker.
      example: websockets
    broker_username:
      type: string
      description: The username to use when connecting to the global broker.
      example: everyone
    download_workers:
      type: number
      description: The number of download worker threads to spawn.
      example: 1
    download_dir:
      type: string
      description: The path to download data to.
      example: ./downloads
    flask_host:
      type: string
      description: Network interface on which flask should listen when run in dev mode.
      example: 0.0.0.0
    flask_port:
      type: number
      description: The port on which flask should listen when run in dev mode.
      example: 5050
    log_path:
      type: string
      description: Path to write log files to.
      example: ./logs
    max_disk_usage:
      type: number
      description: Maximum size (MB) for the download path.
      example: 10
    save_logs:
      type: boolean
      description: Write log files to disk (true) or stdout (false)
      example: false
    mqtt_session_info:
      type: string
      description: 
        File to save session information (active subscriptions and MQTT client id) to. 
        Used to persist subscriptions on restart.
      example: mqtt_session.json