Skip to main content

pyceo Tests Coverage Status

It looks good and delegates all the real work to you ;)

A minimal and ridiculously good looking command-line-interface toolkit.

In four points:

  • Completely customizable help page, but pretty by default.
  • Add new commands at any time and from other files.
  • No sub-commands but grouping of commands instead.
  • Easy to use and understand.

An example

pyceo output

This autogenerated (and completely customizable) help message comes from running the example below:

# example.py
from pyceo import Manager, param, option


cli = Manager("Welcome to Proper v1.2.3")


@cli.command(help="Creates a new Proper application at `path`.")
@param("path", help="Where to create the new application.")
@option("quiet", help="Supress all output.")
def new(path):
    """The `proper new` command creates a new Proper application with a default
    directory structure and configuration at the path you specify.

    Example: `proper new ~/Code/blog`
    This generates a skeletal Proper application at `~/Code/blog`.
    """
    pass


@cli.command()
@option("num", type=int)  # Optional type
def fizzbuzz(num=3):
    """A bad fizz buzz."""
    print("fizz " * num + "buzz")


@cli.command(group="db")
@option("message", help="Revision message")
@option("sql", help="Dont emit SQL to database - dump to standard output instead")
@option("head", help="Specify head or <branchname>@head to base new revision on")
def migrate(**kwargs):
    """Autogenerate a new revision file.

    This is an alias for "revision --autogenerate"."""
    pass


@cli.command(group="db")
@option("name", help="Name of section in .ini file to use for Alembic config")
def branches(**kwargs):
    """Show current branch points.
    """
    pass


if __name__ == "__main__":
    # cli.run(default="new")
    cli.run()

How minimal?

pyceo doesn't include any related features like prompts, progress bars, table formatting, file editing, etc. It doesn't matter because for those features many dedicated python libraries can be used.

You could say it focuses on its core competencies while synergetically interface with other libraries to take it to the next level. 💪🚀

Why don't just use optparse or argparse?

Are you kidding? Because this is way easier to use and understand.

Why don't just use click?

Because this looks better and is easier to use and understand.

Why don't just use...?

Because this library fits better my mental model. I hope it matches yours as well.

Metadata

Release files for pyceo 2.191018

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

Source distribution (sdist)

Source distribution for pyceo 2.191018
File Size Uploaded
pyceo-2.191018.tar.gz 10.6 kB Details

Built distribution (wheel)

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

Total release size: 22.9 kB

Release files / pyceo-2.191018.tar.gz

Download URL pyceo-2.191018.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0e55dadf5908c2ed881428aaaaf4d82afded33e774eb475e6b340956e0baded0
BLAKE2b-256 checksum
How to use checksums
feffe45f550e42af5ae9c9848a7efc0434dd1e556be1f835579b38dfaf9b1661
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2

Release files / pyceo-2.191018-py3-none-any.whl

Download URL pyceo-2.191018-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f862a3f7a838b167b3ba36e30c79cc1ec1edffd8512af227823671a4aeb6709
BLAKE2b-256 checksum
How to use checksums
a9e7476c690eee35ccbdcd2d89a6c874cae45d285049669f6b6a48b4b0edbdfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2

Release history Release notifications | RSS feed

4.2.1

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.2

2 release files

3.1.3

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1

2 release files

3.0

2 release files

This release

2.191018 This release

2 release files

2.0.9

3 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

3 release files

2.0.1

2 release files

2.0

2 release files

1.1

1 release file

1.0.3

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.9

1 release file

0.8

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.1

1 release file

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