semvec/pypi-packages huggingface dataset:
fruit-stand 1.0.3
Generate lists and dictionaries with fruit names and random pricing data for demonstrating fundamentals in Python.
Requires Python: >=3.6

# Fruit Stand

### v1.0.3

Fruit Stand generates lists or dictionaries of fruits to streamline to demonstration of Python fundumentals involving the two data types.

## Installation

`pip install fruit_stand`

## Usage

`import fruit_stand`

Fruit Stand contains four functions:

1.  `all_fruits()`
    > This returns a list of all the fruits that Fruit Stand has.

2. `shopping_list(n = 10)`
   > Returns a list of `n` fruit names. 

3. `fruit_prices(n = 10)`
    > Returns a dictionary containing `n` number of fruits as keys and random float values between 0.0 and 1.0 representing their price.

4. `fill_basket(n = 10)`
    > Returns a dictionary containing `n` number of fruits with dictionaries as values. These nested dictionaries contain:

    * `quantity` - Random integer value between 1 and 10 representing how many of this item are in the basket
    * `price_per` - A random float value between 0.0 and 1.0 representing the price per item.
    * `item_total` - The product of multiplying `quantity` by `price_per`

If no value for `n` is passed to these functions, they will return 10 items each by default.

If anything other than an integer is passed to these functions, a TypeError will be raised, and `None` will be returned.
argparsethis 1.1.2
A drop-in replacement to Python's built-in argparse, that provides the capability to argparse any arbitrary string, not just command line arguments.
Requires Python: >=3.6

# argparsethis

A drop-in replacement to Python's built-in argparse, that provides the capability to argparse *any* arbitrary string, not just command line arguments. Is sourced from https://github.com/python/cpython/blob/3.8/Lib/argparse.py.

## Installation
`pip[3] install argparsethis`

## Usage
When creating your ArguementParser, just override the parameter `input_list`  as a list of strings to parse. We recommend using `shlex` to split any raw strings into a list correctly. If `input_list` is not overridden, it will use standard command line arguments like normal. Also adds the `exit_on_error` parameter, if you want to raise an `ArgumentException` in the event of a parsing error or printing out the help, instead of just exiting (the default behavior).

```
import shlex
import argparsethis as argparse

# Argument parsing which outputs a dictionary.
def parse_args(input_str):
    #Setup the argparser and all args
    input_list = shlex.split(input_str)

    parser = argparse.ArgumentParser(input_list = input_list, exit_on_error = False)
    parser.add_argument("-q", "--quiet", help="suppress extra output", action="store_true", default=False)

    return parser.parse_args()

argv1 = parse_args("test -h")
argv2 = parse_args("test -q")

if not argv2.quiet:
    print("LOUD NOISES")
else:
    print("Please be quiet")
```