Skip to main content

A Dependency Graph Manager

Project description

A dependency graph analysis and processing tool written in Python..

codecov CircleCI PyPI version License Code style: black


In a micro-services scenario, we usually have multiple services with various dependencies. This give us many advantages such as loose coupling, high maintainability & testability.

On the other hand, it brings on its own complexity. Services have multiple dependencies between each other, and it can quickly get difficult to manage.


This tool allows us to scan a services’ spec, then determine in what order we can start them or stop them. In order to make things faster, we can start or stop them in parallel in some cases. Namely:

  • Services should be started in parallel if all their dependencies (if any) have already started.
  • Services should be stopped in parallel if all their dependents (if any) have already stopped.


From the PyPi repository

Use the package manager pip to install mograph.

pip install mograph

Manually from this repository

You can also clone this repository, install its dependencies and run the tool from there.

# Clone the repository
git clone && cd mograph

# Install the project
python3 develop


The program works as follows:

  1. Load a yaml file describing some services with dependencies.
  2. Analyze the dependencies and build the graph.
  3. Print the starting (or stopping) sequence.

The yaml file looks something like this:

# services.yaml

  deps: []
  deps: []
    - mysql
    - kibana
    - zookeeper

To run the program, invoke it with either the start command or stop:

mograph start ./services.yaml

# or (depending on your configuration)

python3 -m mograph ./services.yaml

The output should be:


0   : ['mysql', 'zookeeper']
1   : ['kibana']
2   : ['fullhouse']

And for the stop command, it should look like this:


0   : ['fullhouse']
1   : ['zookeeper', 'kibana']
2   : ['mysql']

Tech Stack



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mograph, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size mograph-0.1.5-py3-none-any.whl (12.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size mograph-0.1.5.tar.gz (11.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page