Skip to main content

micro-update-manager

micro-update-manager is a Python package designed for monitoring and updating Python packages. It manages and restarts dependent microservices as necessary, making it ideal for maintaining large-scale distributed systems, IoT setups, and embedded systems where package updates and service restarts are crucial.

Features

  • Monitor Python Packages: Automatically checks for updates to specified Python packages.
  • Service Management: Manages and restarts services (microservices, IoT devices, etc.) based on package updates.
  • Configurable Interfaces: Supports various communication interfaces, including HTTP (with plans for gRPC and REST).
  • Highly Configurable: Uses a YAML configuration file to specify package monitoring rules, service restart conditions, and more.

Installation

You can install the package via pip:

pip install micro_update_manager

Or clone the repository and install it locally:

git clone https://github.com/yourusername/micro_update_manager.git
cd micro_update_manager
pip install .

Usage

Configuration

Create a config.yaml file to define the packages to monitor and the services to manage. Below is an example configuration:

refresh_interval: 1800  # 30 minutes

packages:
  - name: "example_package"
    requires_restart: true
    processes_to_restart:
      - "microservice_A"
      - "microservice_B"

processes:
  microservice_A:
    interface:
      type: "http"
      host: "localhost"
      port: 5001
      endpoint: "/can_restart"
    command: "docker restart microservice_A"
    params: ""

  microservice_B:
    interface:
      type: "http"
      host: "localhost"
      port: 5002
      endpoint: "/can_restart"
    command: "docker restart microservice_B"
    params: ""

Running the Manager

To start the micro-update-manager, use the following command:

micro-update-manager

This will load the configuration from config.yaml, monitor the specified packages, and manage the restarting of services as needed.

Example Script

Here’s an example of how you can use the micro-update-manager in your own Python scripts:

from micro_update_manager import main

if __name__ == "__main__":
    main()

Development Setup

If you want to contribute to the development of micro_update_manager, follow these steps:

  1. Clone the repository:
git clone https://github.com/yourusername/micro_update_manager.git
  1. Install the development dependencies:
pip install -e .[dev]
  1. Run tests to ensure everything is working:
pytest

Contributing

Contributions are welcome! Please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

  • Thanks to all contributors and users who have provided feedback and ideas.
  • Special mention to the open-source community for providing the tools and libraries that made this project possible.

Contact

If you have any questions, feel free to reach out:

Release files for micro-update-manager 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for micro-update-manager 0.1.1
File Size Uploaded
micro_update_manager-0.1.1.tar.gz 13.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for micro-update-manager 0.1.1
File Interpreter ABI Platform
micro_update_manager-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 26.5 kB

Release files / micro_update_manager-0.1.1.tar.gz

Download URL micro_update_manager-0.1.1.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
83fd10efce6cbf86e1b56072bb429b47aab49a930625f2e68dabb6ae43220053
BLAKE2b-256 checksum
How to use checksums
df4cc9f0c7e89bb419d355b40e88592e316b967faff0dc556e78052cf5dd1e7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / micro_update_manager-0.1.1-py3-none-any.whl

Download URL micro_update_manager-0.1.1-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73a17dedf652d2a8a7321afb471c45770b65c23c4f438551c62d7b95d3fa6870
BLAKE2b-256 checksum
How to use checksums
8b0d42498c5f93893b36f2f5e5b22a22eab4baa4c2bd9b053aba729a376d7c62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page