Skip to main content
https://secure.travis-ci.org/lukaszb/monolith.png?branch=master

Monolith

monolith is simple framwork for creating command line tools. Subcommands are class based (approach and part of implementation was inspired by Django management commands, however monolith uses argparse instead of optparse).

Supported Python versions are 2.6/2.7, 3.2+ and PyPy.

Latest documentation can be found at https://monolith.readthedocs.org/en/latest/.

Example

#!/usr/bin/env python
"""
Example of how to create git-like execution manager with monolith.
This is completely fake command.
"""
from __future__ import print_function
from monolith.cli import SimpleExecutionManager
from monolith.cli import BaseCommand
from monolith.cli import LabelCommand
from monolith.cli import arg

class AddCommand(LabelCommand):

    def handle_label(self, label, namespace):
        print("A %s" % label)


class CommitCommand(BaseCommand):
    args = BaseCommand.args + [
        arg('-a', '--add', action='store_true', default=False),
        arg('-m', '--message', help="Commit's message", required=True),
    ]

    def handle(self, namespace):
        print('Commit message: %r' % namespace.message)
        if namespace.add:
            print(' * add switch given!')


def main():
    manager = SimpleExecutionManager('mygit', commands={
        'add': AddCommand,
        'commit': CommitCommand,
    })
    manager.execute()

if __name__ == '__main__':
    main()

Metadata

Release files for monolith 0.3.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 monolith 0.3.1
File Size Uploaded Provenance Actions
monolith-0.3.1.tar.gz 11.6 kB Without provenance Details for monolith-0.3.1.tar.gz

Release files / monolith-0.3.1.tar.gz

Download URL monolith-0.3.1.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c775dfcbf1de7d88d4f4da1df5cfac8d284a23495d2cd644d19434605cd53d0c
BLAKE2b-256 checksum
How to use checksums
f1cfb9349c9d90f8e0b84b9cb88e53ec0455dd0b895a728a050cbc85d33719d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for monolith 0.3.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.

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