Skip to main content

Makim

CI Python Versions Package Version License Discord

Makim is inspired by tools like Make and Ansible, focusing on improving task definition and dependency management. Instead of using the Makefile format, it utilizes YAML for defining tasks.


Features

  • Help Text as First-Class: Add detailed help text to tasks and arguments for clear documentation.
  • Task Arguments: Define and manage arguments with types, defaults, and descriptions.
  • Dependencies with Conditional Control: Set task dependencies with if conditionals to manage execution dynamically.
  • Environment Variables: Scope variables globally, by group, or by task to reduce redundancy and maintain modularity.
  • Jinja2 Templating: Access arguments, variables, or environment variables via Jinja2 templates.
  • Matrix Configuration: Automate tasks across multiple parameter combinations (ideal for CI/CD workflows).
  • Hooks: Use pre-run and post-run hooks to customize task lifecycles.
  • Scheduler: Cron-like scheduling with APScheduler integration for periodic tasks.
  • Remote Execution: Execute tasks on remote servers via SSH with flexible configurations.
  • File Logging: Log outputs to files with custom formatting and stream control.
  • Retry Mechanism: Adds resilience by retrying tasks that encounter errors.
  • Validation: Ensures .makim.yaml configurations are correct with schema validation.

How to use it

First you need to place the config file .makim.yaml in the root of your project. This is an example of a configuration file:

groups:
  build:
    env:
      GROUP_ENV: group_value
    tasks:
      clean:
        help: Clean build artifacts
        args:
          cache:
            type: bool
            action: store_true
            help: Remove all cache files
        log:
          path: ./logs/clean.txt
          level: err
          format: "%(asctime)s - %(file)s - %(levelname)s - %(message)s"
        run: |
          echo "Cleaning build directory..."
          rm -rf build/
      compile:
        help: Compile the project
        hooks:
          pre-run:
            - task: build.clean # Run 'clean' before 'compile'
        run: |
          echo "Compiling the project..."

# Scheduler for automated tasks
scheduler:
  daily-clean:
    task: build.clean
    schedule: "0 0 * * *" # Every day at midnight

Some examples of how to use it:

  • run the compile task: makim build.compile

  • run the clean task with argument: makim build.clean --cache

The help menu for the .makim.yaml file would looks like this:

$ makim --help

 Usage: makim [OPTIONS] COMMAND [ARGS]...

 Makim is a tool that helps you to organize and simplify your helper commands.

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --version             -v            Show the version and exit                │
│ --file                        TEXT  Makim config file [default: .makim.yaml] │
│ --dry-run                           Execute the command in dry mode          │
│ --verbose                           Execute the command in verbose mode      │
│ --skip-hooks                        Skip hooks while executing the command   │
│ --install-completion                Install completion for the current       │
│                                     shell.                                   │
│ --show-completion                   Show completion for the current shell,   │
│                                     to copy it or customize the              │
│                                     installation.                            │
│ --help                              Show this message and exit.              │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ build ──────────────────────────────────────────────────────────────────────╮
│ build.clean                         Clean build artifacts                    │
│ build.compile                       Compile the project                      │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Extensions ─────────────────────────────────────────────────────────────────╮
│ cron                                Tasks Scheduler                          │
╰──────────────────────────────────────────────────────────────────────────────╯

 If you have any problem, open an issue at: https://github.com/makim-org/makim

As you can see, the help menu automatically adds information defined by all the help key, inside the .makim.yaml file.

Playground

Experience makim directly in your browser using Google Colab! Google Colab is an online platform that allows you to write, run, and share Python code through your browser. It is especially useful for machine learning, data analysis, and education.

To try makim, simply click the following link, make a copy of the notebook to your drive, and then you can modify and execute the code as needed:

Experiment with makim on Google Colab

Support & Acknowledgments

Help keep useful automation accessible

Makim makes everyday development tasks easier to define, share, and run. The value of a good automation tool is that it keeps working as projects, environments, and dependencies evolve. Financial support helps create time for maintaining existing features, improving reliability, testing supported workflows, and making the documentation clearer for newcomers.

Support Makim development on Open Collective. One-time and recurring contributions are welcome; even modest support helps sustain the work.

The people and organizations behind the work

Makim is developed and maintained through SciStitch, together with its open-source contributors. We thank Open Science Labs (OSL) for its institutional support, and everyone who writes code, reports issues, reviews changes, shares ideas, or uses Makim in their projects. Your participation helps make the tool better for others.

SciStitch    Open Science Labs

Metadata

Release files for makim 1.29.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 makim 1.29.1
File Size Uploaded Provenance Actions
makim-1.29.1.tar.gz 29.8 kB Without provenance Details for makim-1.29.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for makim 1.29.1
File Interpreter ABI Platform Actions
makim-1.29.1-py3-none-any.whl Python 3 none any Details for makim-1.29.1-py3-none-any.whl

Total release size: 61.0 kB

Release files / makim-1.29.1.tar.gz

Download URL makim-1.29.1.tar.gz
Size 29.8 kB
Tags Source
SHA-256 checksum
How to use checksums
170f1918064eaf7442f4ca1470d44864e495e2f4136f007c42e8eb862847cbe8
BLAKE2b-256 checksum
How to use checksums
fbece11d297818e50e618ebbcdb7c546eecae7cbc7e09f123232c56308b85e23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.2 CPython/3.11.18 Linux/7.0.0-1020-azure

Release files / makim-1.29.1-py3-none-any.whl

Download URL makim-1.29.1-py3-none-any.whl
Size 31.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
135ac03fdd2efaf4a7a1f00d67074477b9c62d63050fd6b00b41cb143fdd3d16
BLAKE2b-256 checksum
How to use checksums
b6bd9e763850ac658f768ab7635bf44ef987fdf9fe7a3ba5a48d9c50b87f06f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.2 CPython/3.11.18 Linux/7.0.0-1020-azure

Security for makim 1.29.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.29.1 This release

2 release files No provenance

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