semvec/pypi-packages huggingface dataset:
pytnu 1.0.1
An easy text-menu creation interface
License: MIT

# pytnu
An easy interface to create text-menus with
  
## About The Project

pytnu is a lightweight, easy to use menu creation interface that allows you to create easy text-based menus. It supports nested menus and allows the user to easily build a user interface;


<p align="right">(<a href="#top">back to top</a>)</p>

<!-- GETTING STARTED -->
## Getting Started

This is an example of how you may give instructions on setting up your project locally.
To get a local copy up and running follow these simple example steps.

### Prerequisites

This package uses no prerequisites and no external packages are necessary.

### Installation

1. Install the package using pip
   ```sh
   pip install pytnu
<p align="right">(<a href="#top">back to top</a>)</p>



<!-- USAGE EXAMPLES -->
## Usage
![enter image description here](https://i.imgur.com/U239Xai.png)

 1. Import pytnu 
 2. Create a dictionary with your options and descriptions
`options = {name: (description, functionName)}`
Name is the keyword the user inputs to call the option
Description is the text that tells the user what the option does
functionName is the name of the function to be called, without the parenthesis.

 4. Create a Menu object using `Menu(options)`
 5. To start the menu, use `Menu.start()`

To re-create the menu seen above:

    options = {"opt1": ("Prints Foo", printFoo), "opt2": ("Prints Bar", printBar)}
    menu = Menu(options)
    menu.start()
<p align="right">(<a href="#top">back to top</a>)</p>

## Methods

 

    Menu.addOption(name, description, funcName)
Adds an option to the available options of a menu class

    Menu.delOption(name)
  Deletes an option based on the given name 

<p align="right">(<a href="#top">back to top</a>)</p>
module-cli 22.4.2
Bootstrap extensible single-module python CLIs
License: MIT
Requires Python: >=3.7,<4.0
Keywords: cli,argparse,tool

# module-cli

Bootstrap extensible single-module python CLIs

[![PyPI Version](https://img.shields.io/pypi/v/module-cli.svg)](https://pypi.org/project/module-cli/)
[![codecov](https://codecov.io/gh/andrewrosss/module-cli/branch/main/graph/badge.svg?token=6LjO72NbGd)](https://codecov.io/gh/andrewrosss/module-cli)
[![Tests](https://github.com/andrewrosss/module-cli/workflows/Tests/badge.svg)](https://github.com/andrewrosss/module-cli/actions/workflows/test.yaml)
[![Code Style](https://github.com/andrewrosss/module-cli/actions/workflows/lint.yaml/badge.svg)](https://github.com/andrewrosss/module-cli/actions/workflows/lint.yaml)
[![Type Check](https://github.com/andrewrosss/module-cli/actions/workflows/type-check.yaml/badge.svg)](https://github.com/andrewrosss/module-cli/actions/workflows/type-check.yaml)

## Installation

### With `pipx`

This package is intended to generate python modules that function as CLIs and therefore shouldn't be a dependency of any module/package that it generates. **Because of this it's recommended to use this package via `pipx`**:

```bash
pipx run module-cli /path/to/module.py
```

### With `pip`

If you really want this package as one of _your_ package's dependencies, then install via `pip` in the usual way:

```bash
pip install module-cli
```

Which you can then use the CLI:

```bash
$ module-cli -h
usage: module-cli [-h] [-v] [-D] [out]

Bootstrap a single-module python CLI

positional arguments:
  out            File to write to. (default: -)

optional arguments:
  -h, --help     show this help message and exit
  -v, --version  show program's version number and exit
  -D, --debug    run program in debug mode
```

## Installing your CLI

The modules generated by `module-cli` contain a function `cli()`. This function is the one you'll likely want to point to if you intend to turn your module into an installable command-line application.

- **`setup.cfg`**:

  ```ini
  [options.entry_points]
  console_scripts =
      my_cli = my_pkg.my_module:cli
  ```

- **`setup.py`**:

  ```python
  setup(
      entry_points = {
          'console_scripts': ['my_cli=my_pkg.my_module:cli'],
      }
  )
  ```

- **`pyproject.toml`** (poetry):

  ```toml
  [tool.poetry.scripts]
  my_cli = "my_pkg.my_module:cli"
  ```

## Contributing

1. Have or install a recent version of `poetry` (version >= 1.1)
1. Fork the repo
1. Setup a virtual environment (however you prefer)
1. Run `poetry install`
1. Run `pre-commit install`
1. Add your changes (adding/updating tests is always nice too)
1. Commit your changes + push to your fork
1. Open a PR
option 2.1.0
Rust like Option and Result types in Python
License: MIT
Requires Python: >=3.7,<4

# Option
[![CircleCI](https://circleci.com/gh/MaT1g3R/option/tree/master.svg?style=svg)](https://circleci.com/gh/MaT1g3R/option/tree/master)

Rust-like [Option](https://doc.rust-lang.org/std/option/enum.Option.html) and [Result](https://doc.rust-lang.org/std/result/enum.Result.html) types in Python, slotted and fully typed.

An `Option` type represents an optional value, every `Option` is either `Some` and contains Some value, or `NONE`

A `Result` type represents a value that might be an error. Every `Result` is either `Ok` and contains a success value, or `Err` and contains an error value.

Using an `Option` type forces you to deal with `None` values in your code and increase type safety.

Using a `Result` type simplifies error handling and reduces `try` `except` blocks.

## Quick Start
```Python
from option import Result, Option, Ok, Err
from requests import get


def call_api(url, params) -> Result[dict, int]:
    result = get(url, params)
    code = result.status_code
    if code == 200:
        return Ok(result.json())
    return Err(code)


def calculate(url, params) -> Option[int]:
    return call_api(url, params).ok().map(len)


dict_len = calculate('https://example.com', {})
```

## Install
Option can be installed from PyPi:
```bash
pip install option
```

## Documentation
The documentation lives at https://mat1g3r.github.io/option/

## License
MIT