clinterface


Nameclinterface JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/josemvas/clinterface
SummarySimple command line interface library
upload_time2024-04-04 01:58:07
maintainerNone
docs_urlNone
authorNone
requires_python>=3.3
licenseLGPLv3+
keywords console cli prompt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- -*- mode: markdown -*- -->

clinterface
===========

**clinterface** is a simple command line interface library to
display tab-completion prompts and interactive menus.

Quick start
-----------

Import the module

    from clinterface import prompts

Create a default Selector instance

    selector = prompts.Selector()

or create a customized Selector instance

    selector = prompts.Selector(
        shift = 1,
        indent = 3,
        align = 2,
        margin = 1,
        pad_left = 1,
        pad_right = 1,
        radiobullet = '*',
        checkbullet = '+',
    )

Set the options and defaults from a list

    selector.set_options([
        'Monday',
        'Tuesday',
        'Wednesday',
        'Thursday',
        'Friday',
        'Saturday',
        'Sunday',
    ])
    selector.set_single_default('Friday')
    selector.set_multiple_defaults(['Friday', 'Saturday', 'Sunday'])

or alternativey set the options and defaults from a dictionary

    selector.set_options({
        'Mon':'Monday',
        'Tues':'Tuesday',
        'Wed':'Wednesday',
        'Thurs':'Thursday',
        'Fri':'Friday',
        'Sat':'Saturday',
        'Sun':'Sunday',
    })
    selector.set_single_default('Fri')
    selector.set_multiple_defaults(['Fri', 'Sat', 'Sun'])

Prompt for a single choice

    selector.set_message('Choose the best day of the week:')
    selector.single_choice()

Prompt for multiple choices

    selector.set_message('Choose the good days of the week:')
    selector.multiple_choices()



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/josemvas/clinterface",
    "name": "clinterface",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.3",
    "maintainer_email": null,
    "keywords": "console cli prompt",
    "author": null,
    "author_email": null,
    "download_url": null,
    "platform": null,
    "description": "<!-- -*- mode: markdown -*- -->\n\nclinterface\n===========\n\n**clinterface** is a simple command line interface library to\ndisplay tab-completion prompts and interactive menus.\n\nQuick start\n-----------\n\nImport the module\n\n    from clinterface import prompts\n\nCreate a default Selector instance\n\n    selector = prompts.Selector()\n\nor create a customized Selector instance\n\n    selector = prompts.Selector(\n        shift = 1,\n        indent = 3,\n        align = 2,\n        margin = 1,\n        pad_left = 1,\n        pad_right = 1,\n        radiobullet = '*',\n        checkbullet = '+',\n    )\n\nSet the options and defaults from a list\n\n    selector.set_options([\n        'Monday',\n        'Tuesday',\n        'Wednesday',\n        'Thursday',\n        'Friday',\n        'Saturday',\n        'Sunday',\n    ])\n    selector.set_single_default('Friday')\n    selector.set_multiple_defaults(['Friday', 'Saturday', 'Sunday'])\n\nor alternativey set the options and defaults from a dictionary\n\n    selector.set_options({\n        'Mon':'Monday',\n        'Tues':'Tuesday',\n        'Wed':'Wednesday',\n        'Thurs':'Thursday',\n        'Fri':'Friday',\n        'Sat':'Saturday',\n        'Sun':'Sunday',\n    })\n    selector.set_single_default('Fri')\n    selector.set_multiple_defaults(['Fri', 'Sat', 'Sun'])\n\nPrompt for a single choice\n\n    selector.set_message('Choose the best day of the week:')\n    selector.single_choice()\n\nPrompt for multiple choices\n\n    selector.set_message('Choose the good days of the week:')\n    selector.multiple_choices()\n\n\n",
    "bugtrack_url": null,
    "license": "LGPLv3+",
    "summary": "Simple command line interface library",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://github.com/josemvas/clinterface"
    },
    "split_keywords": [
        "console",
        "cli",
        "prompt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5acb3e966ab21740157d0ec5b0e57c335f62396ea5a0a3bdcb354886409321e",
                "md5": "5e66f7b41ea53e6e3aad65559a33cf85",
                "sha256": "cc6e8cbc40879654a8c7eece9158e43113df341427180d07448ee059562234b8"
            },
            "downloads": -1,
            "filename": "clinterface-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5e66f7b41ea53e6e3aad65559a33cf85",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.3",
            "size": 11282,
            "upload_time": "2024-04-04T01:58:07",
            "upload_time_iso_8601": "2024-04-04T01:58:07.049833Z",
            "url": "https://files.pythonhosted.org/packages/c5/ac/b3e966ab21740157d0ec5b0e57c335f62396ea5a0a3bdcb354886409321e/clinterface-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-04 01:58:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "josemvas",
    "github_project": "clinterface",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "clinterface"
}
        
Elapsed time: 2.71306s