Metadata-Version: 2.4
Name: inputapi
Version: 2.1.2
Summary: A simpler way to get user input
Project-URL: github, https://github.com/HomerHaddock/Input-API
Author-email: Homer Haddock <homerhaddock@proton.me>
License:                     GNU GENERAL PUBLIC LICENSE
                               Version 2, June 1991
        
         Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
         51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
         Everyone is permitted to copy and distribute verbatim copies
         of this license document, but changing it is not allowed.
        
                                    Preamble
        
          The licenses for most software are designed to take away your
        freedom to share and change it.  By contrast, the GNU General Public
        License is intended to guarantee your freedom to share and change free
        software--to make sure the software is free for all its users.  This
        General Public License applies to most of the Free Software
        Foundation's software and to any other program whose authors commit to
        using it.  (Some other Free Software Foundation software is covered by
        the GNU Lesser General Public License instead.)  You can apply it to
        your programs, too.
        
          When we speak of free software, we are referring to freedom, not
        price.  Our General Public Licenses are designed to make sure that you
        have the freedom to distribute copies of free software (and charge for
        this service if you wish), that you receive source code or can get it
        if you want it, that you can change the software or use pieces of it
        in new free programs; and that you know you can do these things.
        
          To protect your rights, we need to make restrictions that forbid
        anyone to deny you these rights or to ask you to surrender the rights.
        These restrictions translate to certain responsibilities for you if you
        distribute copies of the software, or if you modify it.
        
          For example, if you distribute copies of such a program, whether
        gratis or for a fee, you must give the recipients all the rights that
        you have.  You must make sure that they, too, receive or can get the
        source code.  And you must show them these terms so they know their
        rights.
        
          We protect your rights with two steps: (1) copyright the software, and
        (2) offer you this license which gives you legal permission to copy,
        distribute and/or modify the software.
        
          Also, for each author's protection and ours, we want to make certain
        that everyone understands that there is no warranty for this free
        software.  If the software is modified by someone else and passed on, we
        want its recipients to know that what they have is not the original, so
        that any problems introduced by others will not reflect on the original
        authors' reputations.
        
          Finally, any free program is threatened constantly by software
        patents.  We wish to avoid the danger that redistributors of a free
        program will individually obtain patent licenses, in effect making the
        program proprietary.  To prevent this, we have made it clear that any
        patent must be licensed for everyone's free use or not licensed at all.
        
          The precise terms and conditions for copying, distribution and
        modification follow.
        
                            GNU GENERAL PUBLIC LICENSE
           TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
        
          0. This License applies to any program or other work which contains
        a notice placed by the copyright holder saying it may be distributed
        under the terms of this General Public License.  The "Program", below,
        refers to any such program or work, and a "work based on the Program"
        means either the Program or any derivative work under copyright law:
        that is to say, a work containing the Program or a portion of it,
        either verbatim or with modifications and/or translated into another
        language.  (Hereinafter, translation is included without limitation in
        the term "modification".)  Each licensee is addressed as "you".
        
        Activities other than copying, distribution and modification are not
        covered by this License; they are outside its scope.  The act of
        running the Program is not restricted, and the output from the Program
        is covered only if its contents constitute a work based on the
        Program (independent of having been made by running the Program).
        Whether that is true depends on what the Program does.
        
          1. You may copy and distribute verbatim copies of the Program's
        source code as you receive it, in any medium, provided that you
        conspicuously and appropriately publish on each copy an appropriate
        copyright notice and disclaimer of warranty; keep intact all the
        notices that refer to this License and to the absence of any warranty;
        and give any other recipients of the Program a copy of this License
        along with the Program.
        
        You may charge a fee for the physical act of transferring a copy, and
        you may at your option offer warranty protection in exchange for a fee.
        
          2. You may modify your copy or copies of the Program or any portion
        of it, thus forming a work based on the Program, and copy and
        distribute such modifications or work under the terms of Section 1
        above, provided that you also meet all of these conditions:
        
            a) You must cause the modified files to carry prominent notices
            stating that you changed the files and the date of any change.
        
            b) You must cause any work that you distribute or publish, that in
            whole or in part contains or is derived from the Program or any
            part thereof, to be licensed as a whole at no charge to all third
            parties under the terms of this License.
        
            c) If the modified program normally reads commands interactively
            when run, you must cause it, when started running for such
            interactive use in the most ordinary way, to print or display an
            announcement including an appropriate copyright notice and a
            notice that there is no warranty (or else, saying that you provide
            a warranty) and that users may redistribute the program under
            these conditions, and telling the user how to view a copy of this
            License.  (Exception: if the Program itself is interactive but
            does not normally print such an announcement, your work based on
            the Program is not required to print an announcement.)
        
        These requirements apply to the modified work as a whole.  If
        identifiable sections of that work are not derived from the Program,
        and can be reasonably considered independent and separate works in
        themselves, then this License, and its terms, do not apply to those
        sections when you distribute them as separate works.  But when you
        distribute the same sections as part of a whole which is a work based
        on the Program, the distribution of the whole must be on the terms of
        this License, whose permissions for other licensees extend to the
        entire whole, and thus to each and every part regardless of who wrote it.
        
        Thus, it is not the intent of this section to claim rights or contest
        your rights to work written entirely by you; rather, the intent is to
        exercise the right to control the distribution of derivative or
        collective works based on the Program.
        
        In addition, mere aggregation of another work not based on the Program
        with the Program (or with a work based on the Program) on a volume of
        a storage or distribution medium does not bring the other work under
        the scope of this License.
        
          3. You may copy and distribute the Program (or a work based on it,
        under Section 2) in object code or executable form under the terms of
        Sections 1 and 2 above provided that you also do one of the following:
        
            a) Accompany it with the complete corresponding machine-readable
            source code, which must be distributed under the terms of Sections
            1 and 2 above on a medium customarily used for software interchange; or,
        
            b) Accompany it with a written offer, valid for at least three
            years, to give any third party, for a charge no more than your
            cost of physically performing source distribution, a complete
            machine-readable copy of the corresponding source code, to be
            distributed under the terms of Sections 1 and 2 above on a medium
            customarily used for software interchange; or,
        
            c) Accompany it with the information you received as to the offer
            to distribute corresponding source code.  (This alternative is
            allowed only for noncommercial distribution and only if you
            received the program in object code or executable form with such
            an offer, in accord with Subsection b above.)
        
        The source code for a work means the preferred form of the work for
        making modifications to it.  For an executable work, complete source
        code means all the source code for all modules it contains, plus any
        associated interface definition files, plus the scripts used to
        control compilation and installation of the executable.  However, as a
        special exception, the source code distributed need not include
        anything that is normally distributed (in either source or binary
        form) with the major components (compiler, kernel, and so on) of the
        operating system on which the executable runs, unless that component
        itself accompanies the executable.
        
        If distribution of executable or object code is made by offering
        access to copy from a designated place, then offering equivalent
        access to copy the source code from the same place counts as
        distribution of the source code, even though third parties are not
        compelled to copy the source along with the object code.
        
          4. You may not copy, modify, sublicense, or distribute the Program
        except as expressly provided under this License.  Any attempt
        otherwise to copy, modify, sublicense or distribute the Program is
        void, and will automatically terminate your rights under this License.
        However, parties who have received copies, or rights, from you under
        this License will not have their licenses terminated so long as such
        parties remain in full compliance.
        
          5. You are not required to accept this License, since you have not
        signed it.  However, nothing else grants you permission to modify or
        distribute the Program or its derivative works.  These actions are
        prohibited by law if you do not accept this License.  Therefore, by
        modifying or distributing the Program (or any work based on the
        Program), you indicate your acceptance of this License to do so, and
        all its terms and conditions for copying, distributing or modifying
        the Program or works based on it.
        
          6. Each time you redistribute the Program (or any work based on the
        Program), the recipient automatically receives a license from the
        original licensor to copy, distribute or modify the Program subject to
        these terms and conditions.  You may not impose any further
        restrictions on the recipients' exercise of the rights granted herein.
        You are not responsible for enforcing compliance by third parties to
        this License.
        
          7. If, as a consequence of a court judgment or allegation of patent
        infringement or for any other reason (not limited to patent issues),
        conditions are imposed on you (whether by court order, agreement or
        otherwise) that contradict the conditions of this License, they do not
        excuse you from the conditions of this License.  If you cannot
        distribute so as to satisfy simultaneously your obligations under this
        License and any other pertinent obligations, then as a consequence you
        may not distribute the Program at all.  For example, if a patent
        license would not permit royalty-free redistribution of the Program by
        all those who receive copies directly or indirectly through you, then
        the only way you could satisfy both it and this License would be to
        refrain entirely from distribution of the Program.
        
        If any portion of this section is held invalid or unenforceable under
        any particular circumstance, the balance of the section is intended to
        apply and the section as a whole is intended to apply in other
        circumstances.
        
        It is not the purpose of this section to induce you to infringe any
        patents or other property right claims or to contest validity of any
        such claims; this section has the sole purpose of protecting the
        integrity of the free software distribution system, which is
        implemented by public license practices.  Many people have made
        generous contributions to the wide range of software distributed
        through that system in reliance on consistent application of that
        system; it is up to the author/donor to decide if he or she is willing
        to distribute software through any other system and a licensee cannot
        impose that choice.
        
        This section is intended to make thoroughly clear what is believed to
        be a consequence of the rest of this License.
        
          8. If the distribution and/or use of the Program is restricted in
        certain countries either by patents or by copyrighted interfaces, the
        original copyright holder who places the Program under this License
        may add an explicit geographical distribution limitation excluding
        those countries, so that distribution is permitted only in or among
        countries not thus excluded.  In such case, this License incorporates
        the limitation as if written in the body of this License.
        
          9. The Free Software Foundation may publish revised and/or new versions
        of the General Public License from time to time.  Such new versions will
        be similar in spirit to the present version, but may differ in detail to
        address new problems or concerns.
        
        Each version is given a distinguishing version number.  If the Program
        specifies a version number of this License which applies to it and "any
        later version", you have the option of following the terms and conditions
        either of that version or of any later version published by the Free
        Software Foundation.  If the Program does not specify a version number of
        this License, you may choose any version ever published by the Free Software
        Foundation.
        
          10. If you wish to incorporate parts of the Program into other free
        programs whose distribution conditions are different, write to the author
        to ask for permission.  For software which is copyrighted by the Free
        Software Foundation, write to the Free Software Foundation; we sometimes
        make exceptions for this.  Our decision will be guided by the two goals
        of preserving the free status of all derivatives of our free software and
        of promoting the sharing and reuse of software generally.
        
                                    NO WARRANTY
        
          11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
        FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
        OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
        PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
        OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
        MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
        TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
        PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
        REPAIR OR CORRECTION.
        
          12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
        WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
        REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
        INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
        OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
        TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
        YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
        PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
        POSSIBILITY OF SUCH DAMAGES.
        
                             END OF TERMS AND CONDITIONS
        
                    How to Apply These Terms to Your New Programs
        
          If you develop a new program, and you want it to be of the greatest
        possible use to the public, the best way to achieve this is to make it
        free software which everyone can redistribute and change under these terms.
        
          To do so, attach the following notices to the program.  It is safest
        to attach them to the start of each source file to most effectively
        convey the exclusion of warranty; and each file should have at least
        the "copyright" line and a pointer to where the full notice is found.
        
            <one line to give the program's name and a brief idea of what it does.>
            Copyright (C) <year>  <name of author>
        
            This program is free software; you can redistribute it and/or modify
            it under the terms of the GNU General Public License as published by
            the Free Software Foundation; either version 2 of the License, or
            (at your option) any later version.
        
            This program is distributed in the hope that it will be useful,
            but WITHOUT ANY WARRANTY; without even the implied warranty of
            MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            GNU General Public License for more details.
        
            You should have received a copy of the GNU General Public License along
            with this program; if not, write to the Free Software Foundation, Inc.,
            51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
        
        Also add information on how to contact you by electronic and paper mail.
        
        If the program is interactive, make it output a short notice like this
        when it starts in an interactive mode:
        
            Gnomovision version 69, Copyright (C) year name of author
            Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
            This is free software, and you are welcome to redistribute it
            under certain conditions; type `show c' for details.
        
        The hypothetical commands `show w' and `show c' should show the appropriate
        parts of the General Public License.  Of course, the commands you use may
        be called something other than `show w' and `show c'; they could even be
        mouse-clicks or menu items--whatever suits your program.
        
        You should also get your employer (if you work as a programmer) or your
        school, if any, to sign a "copyright disclaimer" for the program, if
        necessary.  Here is a sample; alter the names:
        
          Yoyodyne, Inc., hereby disclaims all copyright interest in the program
          `Gnomovision' (which makes passes at compilers) written by James Hacker.
        
          <signature of Ty Coon>, 1 April 1989
          Ty Coon, President of Vice
        
        This General Public License does not permit incorporating your program into
        proprietary programs.  If your program is a subroutine library, you may
        consider it more useful to permit linking proprietary applications with the
        library.  If this is what you want to do, use the GNU Lesser General
        Public License instead of this License.
License-File: LICENSE
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# 1. Input API

- [1. Input API](#1-input-api)
  - [1.1. A Brief Description of Input API](#11-a-brief-description-of-input-api)
  - [Installing Input API](#installing-input-api)
  - [1.2. Basic Usage](#12-basic-usage)
    - [1.2.1. Numerical input](#121-numerical-input)
    - [1.2.2. Clearing the terminal](#122-clearing-the-terminal)
    - [1.2.3. Boolean input](#123-boolean-input)
  - [1.3. Advanced Usage](#13-advanced-usage)
    - [1.3.1. Numbers](#131-numbers)
      - [1.3.1.1. Integers](#1311-integers)
        - [1.3.1.1.1. The newLineInt input](#13111-the-newlineint-input)
        - [1.3.1.1.2. The sameLineInt input](#13112-the-samelineint-input)
        - [1.3.1.1.3. Error treatment and handling](#13113-error-treatment-and-handling)
      - [1.3.1.2. Floating point](#1312-floating-point)
        - [1.3.1.2.1. newLineFloat input](#13121-newlinefloat-input)
        - [1.3.1.2.2. sameLineFloat](#13122-samelinefloat)
        - [1.3.1.2.3. Error treatment and handling](#13123-error-treatment-and-handling)
    - [1.3.2. Strings](#132-strings)
      - [1.3.2.1. newLineStr](#1321-newlinestr)
      - [1.3.2.2. sameLineStr](#1322-samelinestr)
      - [1.3.2.3. Error treatment and handling](#1323-error-treatment-and-handling)
    - [1.3.3. Booleans](#133-booleans)
      - [1.3.3.1. yesNo](#1331-yesno)
      - [1.3.3.2. Error treatment and handling](#1332-error-treatment-and-handling)
    - [1.3.4. Menus](#134-menus)
      - [1.3.4.1. singleSelect menus](#1341-singleselect-menus)
        - [1.3.4.1.1. numericSerial](#13411-numericserial)
          - [1.3.4.1.1.1. Usage](#134111-usage)
          - [1.3.4.1.1.2. Parameters](#134112-parameters)
          - [1.3.4.1.1.3. Output](#134113-output)
          - [1.3.4.1.1.4. Error treatment and handling](#134114-error-treatment-and-handling)
        - [1.3.4.1.2. numericIndex](#13412-numericindex)
          - [1.3.4.1.2.1. Usage](#134121-usage)
          - [1.3.4.1.2.2. Parameters](#134122-parameters)
          - [1.3.4.1.2.3. Output](#134123-output)
          - [1.3.4.1.2.4. Error treatment and handling](#134124-error-treatment-and-handling)
        - [1.3.4.1.3. alphabetical](#13413-alphabetical)
          - [1.3.4.1.3.1. Usage](#134131-usage)
          - [1.3.4.1.3.2. Parameters](#134132-parameters)
          - [1.3.4.1.3.3. Output](#134133-output)
          - [1.3.4.1.3.4. Error treatment and handling](#134134-error-treatment-and-handling)
      - [1.3.4.2. multiSelect menus](#1342-multiselect-menus)
        - [1.3.4.2.1. returnSelected menus](#13421-returnselected-menus)
          - [1.3.4.2.1.1. numericSerial](#134211-numericserial)
          - [1.3.4.2.1.2. Usage](#134212-usage)
          - [1.3.4.2.1.3. Parameters](#134213-parameters)
          - [1.3.4.2.1.4. Output](#134214-output)
          - [1.3.4.2.1.5. Error treatment and handling](#134215-error-treatment-and-handling)
        - [1.3.4.2.2. returnDeselected](#13422-returndeselected)
          - [1.3.4.2.2.1. numericSerial](#134221-numericserial)
          - [1.3.4.2.2.2. Usage](#134222-usage)
          - [1.3.4.2.2.3. Parameters](#134223-parameters)
          - [1.3.4.2.2.4. Output](#134224-output)
          - [1.3.4.2.2.5. Error treatment and handling](#134225-error-treatment-and-handling)
    - [1.3.5. RDCs](#135-rdcs)
      - [1.3.5.1. RDC](#1351-rdc)
        - [1.3.5.1.1. Usage](#13511-usage)
        - [1.3.5.1.2. Parameters](#13512-parameters)
        - [1.3.5.1.3. Output](#13513-output)
        - [1.3.5.1.4. Error treatment and handling](#13514-error-treatment-and-handling)
      - [1.3.5.2. newLineRDC](#1352-newlinerdc)
        - [1.3.5.2.1. Usage](#13521-usage)
        - [1.3.5.2.2. Parameters](#13522-parameters)
        - [1.3.5.2.3. Output](#13523-output)
        - [1.3.5.2.4. Error treatment and handling](#13524-error-treatment-and-handling)
      - [1.3.5.3. sameLineRDC](#1353-samelinerdc)
        - [1.3.5.3.1. Usage](#13531-usage)
        - [1.3.5.3.2. Parameters](#13532-parameters)
        - [1.3.5.3.3. Output](#13533-output)
        - [1.3.5.3.4. Error treatment and handling](#13534-error-treatment-and-handling)
    - [1.3.6. otherFunc](#136-otherfunc)
      - [1.3.6.1. pause](#1361-pause)
        - [1.3.6.1.1. standard](#13611-standard)
          - [1.3.6.1.1.1. Usage](#136111-usage)
          - [1.3.6.1.1.2. Parameters](#136112-parameters)
          - [1.3.6.1.1.3. Output](#136113-output)
          - [1.3.6.1.1.4. Error treatment and handling](#136114-error-treatment-and-handling)
        - [1.3.6.1.2. showValue](#13612-showvalue)
          - [1.3.6.1.2.1. Usage](#136121-usage)
          - [1.3.6.1.2.2. Parameters](#136122-parameters)
          - [1.3.6.1.2.3. Error treatment and handling](#136123-error-treatment-and-handling)
      - [1.3.6.2. clearScreen](#1362-clearscreen)
        - [1.3.6.2.1. auto](#13621-auto)
          - [1.3.6.2.1.1. Usage](#136211-usage)
        - [1.3.6.2.2. manual](#13622-manual)
          - [1.3.6.2.2.1. Usage](#136221-usage)
          - [1.3.6.2.2.2. Parameters](#136222-parameters)
          - [1.3.6.2.2.3. How to properly use manual](#136223-how-to-properly-use-manual)
  - [1.4. TODO](#14-todo)
    - [1.4.1. In Major Updates](#141-in-major-updates)
      - [1.4.1.1. Pre-set Inputs](#1411-pre-set-inputs)
      - [1.4.1.2. Iterable Inputs](#1412-iterable-inputs)
      - [1.4.1.3. A Config Function](#1413-a-config-function)
      - [1.4.1.4. Call later/repeat input](#1414-call-laterrepeat-input)
    - [1.4.2. In Minor Updates](#142-in-minor-updates)
      - [1.4.2.1. New multiSelect Menu Types](#1421-new-multiselect-menu-types)
      - [1.4.2.2. New singleSelect Menu Type](#1422-new-singleselect-menu-type)
      - [1.4.2.3. Adding A Changelog](#1423-adding-a-changelog)

## 1.1. A Brief Description of Input API

Input API is a python package made and maintained by Homer Haddock for the express purpose of making terminal I/O both easier and simpler! When using Input API you are given several options for input, including but not limited to:

- Numbers
  - Both integers and floating point numbers
- Booleans
- Strings
- Menus

## Installing Input API

When receiving a copy of Input API you need to install it first, here is a short tutorial on how to install the Input API.

1. Install Python (v3.7 or greater)
2. Open the folder that has the .whl file for the Input API (e.g. `inputapi-2.0.0-py3-none-any.whl`)
3. Open the .whl file with your Python installation (Not IDLE)
4. Wait for the window to close
5. Input API has been globally installed on your computer

If you are using a virtual environment you just run.

For Windows:

`pip install Path/To/File.whl`

For Linux:

`python3 -m pip install Path/To/File.whl`

## 1.2. Basic Usage

Now for all of the examples of use we will be importing like so:

```python
import inputapi as inp
```

Note: This way of importing is easier for IDE's that don't have an "Auto-Complete" or "AI-assisted dev." feature

When importing Input API we have what is called 'The Basic Library'.
The Basic Library while making usage easier it is also backwards compatible with 1.X versions of Input API without having to rewrite the code.

### 1.2.1. Numerical input

With numerical input you can access both floating point and integer numbers!
An integer input is used as shown:

```python
import inputapi as inp

inp.newLineInt({params})
```

Note: We will cover parameters in [Advanced Usage](#13-advanced-usage)

Floating point numbers can be used as shown:

```python
import inputapi as inp

inp.newLineInt({params})
```

### 1.2.2. Clearing the terminal

If you wish to clear the terminal by using the clearScreen function[^1]:

```python
import inputapi as inp

inp.clearScreen()
```

### 1.2.3. Boolean input

If you need a boolean input we have out yesNo function for that exact reason!

```python
import inputapi as inp

inp.yesNo({params})
```

Fun Fact[^3]: yesNo is the only input to be in the boolean category making it the loneliest function in the package!

## 1.3. Advanced Usage

This style of usage is good for if you need specific input. We will also include the parameters for the inputs with examples.

### 1.3.1. Numbers

#### 1.3.1.1. Integers

Integers serve the purpose of returning integers, integers have two ways to input:

| Type of input |              Best case for use              |
| :------------ | :-----------------------------------------: |
| New Line      |    When there are small amounts of input    |
| Same Line     | When there is a lot of inputs in succession |

##### 1.3.1.1.1. The newLineInt input

There are two ways to use this input:

```python
import inputapi as inp

#This is the basic way of using newLineInt
inp.newLineInt({params})
```

```python
import inputapi as inp

#This is the advanced way of using newLineInt
inp.numerical.integer.newLineInt({params})
```

newLineInt will output the request like this:

```python
#For this example the request string is "Number:"

Number:
>
#The ">" is where the user will input the number
```

The parameters for the input are as follows:

| Parameter     | data type | default               | Purpose it serves                                           |
| :------------ | :-------- | :-------------------- | :---------------------------------------------------------- |
| request       | string    | `"Input an integer:"` | What the user will see when the input is requested          |
| allowNeg      | boolean   | `True`                | Determines if the user can give a negative number           |
| min           | integer   | No limit              | What is the lowest number allowed                           |
| max           | integer   | No limit              | What is the highest number allowed                          |
| clearOnLoad   | boolean   | `False`               | When the function is run, should the terminal be cleared    |
| clearWhenDone | boolean   | `False`               | When the input is retrieved, should the terminal be cleared |

##### 1.3.1.1.2. The sameLineInt input

The sameLineInt has only one way to access the function:

```python
import inputapi as inp

inp.numerical.integer.sameLineInt({params})
```

This is what sameLineInt will output:

```python
#For this example we will have two requests, one will be "X=" and the other will be "Y="

#This is the first request
X=
#And when "X" has been given the next request is shown
Y=

#The user will enter the number at the end of the string
```

You can find the parameters [here](#13111-the-newlineint-input)

##### 1.3.1.1.3. Error treatment and handling

When the inputs face invalid characters, we have error messages to show the user what is allowed and what isn't:

```python
#This error message will appear when the user inputs an invalid character, in this case we will put a decimal in

Number:
>21.6
WARNING: Invalid character ['.'], to ensure the program runs correctly please enter only these characters ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-']
```

```python
#This one will be displayed when inputing a negative number when negative numbers are disabled


X=-16
WARNING: Invalid character ['-'], to ensure the program runs correctly please enter only these characters ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
```

```python
#For this example we will put in a number under the minimum

Y=4
WARNING: Number [4] below minimum [5]
```

For going over the max there are two messages.  
What is picked is depending on the amount of digits for both max and what is entered:

```python
#A number that is greater than max (Same amount of digits as max)

Enter 433724:
>433725
WARNING: Number [433725] above maximum [433724]
```

```python
#We will go above the maximum for this example (More digits than max has)

Enter a 6 digit number:
>581919921
WARNING: Too many characters, maximum amount is [6] characters, you entered [9]
```

#### 1.3.1.2. Floating point

Floating point inputs are great for decimal numbers (e.g. The radius of a circle, width of a box).  
We have two ways for requesting an float:

| Type of input |                            Best use case                             |
| :------------ | :------------------------------------------------------------------: |
| newLineFloat  |                 Small amount of inputs in succession                 |
| sameLineFloat | Multiple inputs with each one after another, or retrieving variables |

##### 1.3.1.2.1. newLineFloat input

Calling the function can be done in two ways:

```python
import inputapi as inp

#Basic usage
inp.newLineFloat({params})
```

```python
import inputapi as inp

#Advanced usage
inp.numerical.float.newLineFloat({params})
```

When using newLineFloat you get an output similar to [newLineInt](#13111-the-newlineint-input)

```python
#This time the request is "Number including decimal:"

Number including decimal:
>
```

The parameters for newLineFloat are very similar to integer inputs but are as follows:

| Parameter     | data type | default               | Purpose it serves                                           |
| :------------ | :-------- | :-------------------- | :---------------------------------------------------------- |
| request       | string    | `"Input an integer:"` | What the user will see when the input is requested          |
| allowNeg      | boolean   | `True`                | Determines if the user can give a negative number           |
| min           | integer   | No limit              | What is the lowest number allowed                           |
| max           | integer   | No limit              | What is the highest number allowed                          |
| clearOnLoad   | boolean   | `False`               | When the function is run, should the terminal be cleared    |
| clearWhenDone | boolean   | `False`               | When the input is retrieved, should the terminal be cleared |

##### 1.3.1.2.2. sameLineFloat

sameLineFloat has only one way to be used:

```python
import inputapi as inp

inp.numerical.float.sameLineFloat({params})
```

The input function outputs like so:

```python
#Request string is "Float="

Float=
```

Parameters are found [here](#1312-floating-point).

##### 1.3.1.2.3. Error treatment and handling

For most of these can be found in [the integer's error handling](#13113-error-treatment-and-handling) except for one error.  
When dealing with decimal points ("."), it can't just be blocked, so we have a solution from the 1.X versions of the Input API:

```python
#The conversion from straight string to float only works if all charecters are numbers and there are no more that one decimal point
#So this is what will happen if we try to break it

Only one decimal point:
>2.2.2
#The result is 2.22
```

How this works is when there is more than one point (e.g. `1.2.3`), it will only acknowledge the first decimal place and remove the others (`1.2.3` -> `1.23`).

### 1.3.2. Strings

Strings works like `input()` but allows for more options and helps with error handling so you don't need something like this copy and pasted 20 times:

```python
while True:
  user = input(request)
  try:
    convert(user)
  except:
    continue
  else:
    break
#convert() is the stand in for what you wan't the string converted to
```

Strings were first introduced in Input API version 1.2.0 as newLineStr, got a bug fix in 1.2.1 (Like an hour after 1.2.0 got built).  
Everything[^4] in the Input API is dependant on the string input since it gives more viability and ease of use. There are two types of string input and they are:

| Type of input |                                                                         Best use case                                                                         |
| :------------ | :-----------------------------------------------------------------------------------------------------------------------------------------------------------: |
| newLineStr    |                                                             Small amount of inputs in succession                                                              |
| sameLineStr   | Multiple inputs with each one after another, getting multiple strings, and replacing the character that sits left of the user input (`>`) with something else |

#### 1.3.2.1. newLineStr

newLineStr has (for the thousandth time) two ways to be used:

```python
import inputapi as inp

#First way
inp.newLineStr({params})
```

```python
import inputapi as inp

#Second way
inp.strings.newLineStr({params})
```

When using the newLineStr the user using the program will have this as the output:

```python
#The request, "String:"

String:
>
```

We have the parameters for newLineStr as:

| Parameter     | data type | default             | Purpose                                                                                 |
| :------------ | :-------- | :------------------ | :-------------------------------------------------------------------------------------- |
| request       | string    | `'Input a string:'` | Is displayed when requesting input                                                      |
| minLength     | integer   | `0`                 | Amount of characters needed for input                                                   |
| maxLength     | integer   | None                | Max amount of characters allowed in input                                               |
| allowOnly     | string    | None                | Only allows an input if all characters are within the string, (Does nothing if default) |
| clearOnLoad   | boolean   | `False`             | Clears terminal before loading input                                                    |
| clearWhenDone | boolean   | `False`             | Clears terminal after getting input                                                     |

#### 1.3.2.2. sameLineStr

sameLineStr has only one way to be used:

```python
import inputapi as inp

#Only way
inp.strings.sameLineStr({params})
```

The output for sameLineStr is:

```python
#The request, "String="
String=
```

The parameters for sameLineStr are:
| Parameter | data type | default | Purpose |
| :------------ | :-------- | :---------- | :-------------------------------------------------------------------------------------- |
| request | string | `'String='` | Is displayed when requesting input |
| minLength | integer | `0` | Amount of characters needed for input |
| maxLength | integer | None | Max amount of characters allowed in input |
| allowOnly | string | None | Only allows an input if all characters are within the string, (Does nothing if default) |
| clearOnLoad | boolean | `False` | Clears terminal before loading input |
| clearWhenDone | boolean | `False` | Clears terminal after getting input |

#### 1.3.2.3. Error treatment and handling

When it comes to error handling on strings, we have three potential errors that can happen:

```python
#This happens when the user inputs less than the minimum amount of characters

Just enter three characters:
>No
WARNING: Input requires [3] characters or more, you entered [2]
```

```python
#This happens when the user inputs more than the maximum amount of characters

Three characters or less:
>Four
WARNING: Input requires [3] characters or less, you entered [4]
```

There are three separate messages related to `allowOnly` depending on length of the amount allowed:

```python
#When there is less than 20 characters allowed
#In this case there is only numbers allowed

Number=Boo!
WARNING: Input has invalid character [B], allowed characters are [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
```

```python
#When there is more than 30 characters allowed
#In this case there is only letters and numbers allowed

Enter only what a normal person would:
>!@\#$%^&*()_+-=
WARNING: Input has invalid character [!], allowed characters are [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t ... 5, 6, 7, 8, 9]
```

```python
#This is what happens when there is more than 20 but less than 30 characters allowed
#In this case there is only lowercase letters and isn't 'a' allowed

Please don't yell:
>AAAAA
WARNING: Input has invalid character [A], allowed characters are [b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u ... z]
```

### 1.3.3. Booleans

The only boolean input there is is `yesNo` which is a boolean input that only allows for `y` or `n` as input. When input is given it will turn it into a boolean value (`True` or `False`).

The Booleans best case use is for when you want to get a yes or no answer from the user. It is also used in the `confirm` input. (Refer to menus for more info about confirming input [Placeholder Link For Menus])

#### 1.3.3.1. yesNo

yesNo has two ways to be used:

```python
import inputapi as inp

#The simple way
inp.yesNo({params})
```

```python
import inputapi as inp

#The hard way
inp.boolean.yesNo({params})
```

yesNo has two different outputs:

```python
#When numeric input is allowed (default)
#This is was added in 2.0.0

#Request is 'Do you breathe air?'
Do you breathe air?
Numeric response allowed (Y=1, n=2)
[Y/n]:
```

```python
#When numeric isn't allowed
#Request is 'Is your fride running?'

Is your fridge running?
[Y/n]:
```

The parameters for yesNo are:
| Parameter | data type | default | Purpose |
| :------------ | :-------- | :------------- | :----------------------------------- |
| request | string | `'Yes or no?'` | Is displayed when requesting input |
| allowNumeric | boolean | `True` | Allows for numeric input (Y=1, n=2) |
| clearOnLoad | boolean | `False` | Clears terminal before loading input |
| clearWhenDone | boolean | `False` | Clears terminal after getting input |

#### 1.3.3.2. Error treatment and handling

The errors in yesNo mainly happen through the sameLineStr but they are:

```python
#When something not allowed is entered (More than 1 character)

Did you catch the fridge?
Numeric response allowed (Y=1, n=2)
[Y/n]:Still trying to
WARNING: Input requires [1] characters or less, you entered [15] characters
```

```python
#Something not allowed is entered (Numeric not allowed)

Can you see me?
[Y/n]:1
WARNING: Input has invalid character [1], allowed characters are ['Y', 'N', 'y', 'n']
```

### 1.3.4. Menus

Menus allow the user to select a set of given options, there could be only one to select or multiple.

#### 1.3.4.1. singleSelect menus

These menus present multiple options but only allow the user to pick one. These can be used for the 'main hub' of a program to use other functions and return after. The returned value is the value assigned to the option.

##### 1.3.4.1.1. numericSerial

The numericSerial is the menu used in 1.X versions of Input API. All options are given a number from 1 to length of options given.

###### 1.3.4.1.1.1. Usage

Two ways to call and use this function.

```python
#The 1.X version of using the function
import inputapi as inp

inp.menu({params})
```

```python
#The new way of using numericSerial
import inputapi as inp

inp.menus.singleSelect.numericSerial({params})
```

###### 1.3.4.1.1.2. Parameters

The parameters of numericSerial are as follows:

| Parameter     | data type | default    | purpose                                                                  |
| :------------ | :-------- | :--------- | :----------------------------------------------------------------------- |
| \*args        | Any       | No default | Options that are displayed to the user                                   |
| clearOnLoad   | boolean   | `False`    | Clears terminal before displaying output                                 |
| clearWhenDone | boolean   | `False`    | Clears terminal after user gives input                                   |
| title         | string    | `'Menu'`   | What will be displayed as the name/purpose of the menu (`---{title}---`) |

###### 1.3.4.1.1.3. Output

The output of the numericSerial is:

```python
#An example of game option selection is

#Note: Titles have a white background and black text
#but cannot be rendered properly in markdown
---Where do you go?---
1: To the blazing inferno
2: To the tree that reads books

To select an option input the number assigned to it:
>
```

###### 1.3.4.1.1.4. Error treatment and handling

The errors of numericSerial is the [newLineInt error treatment hand handling](#13113-error-treatment-and-handling) with the following exception:

```python
#When giving a response not within the given options it will just ignore it

---What animal do you prefer---
1: Cat
2: Dog

To select an option input the number assigned to it:
>3
To select an option input the number assigned to it:
>
```

##### 1.3.4.1.2. numericIndex

The numericIndex menu is almost the same as [numericSerial](#13411-numericserial) with the exception that instead of starting at 1 instead it starts at 0.

###### 1.3.4.1.2.1. Usage

There is only one way to use numericIndex:

```python
import inputapi as inp

inp.menus.singleSelect.numericIndex({params})
```

###### 1.3.4.1.2.2. Parameters

The parameters of numericIndex are the same as [numericSerial](#134112-parameters):

| Parameter     | data type | default    | purpose                                                                  |
| :------------ | :-------- | :--------- | :----------------------------------------------------------------------- |
| \*args        | Any       | No default | Options that are displayed to the user                                   |
| clearOnLoad   | boolean   | `False`    | Clears terminal before displaying output                                 |
| clearWhenDone | boolean   | `False`    | Clears terminal after user gives input                                   |
| title         | string    | `'Menu'`   | What will be displayed as the name/purpose of the menu (`---{title}---`) |

###### 1.3.4.1.2.3. Output

This is what the menu would output when called:

```python
#Now lets show what a 'main hub' of a script could look like

---Cool Math Program---
0: Algebra
1: Geometry
2: Calculus
3: Quit

To select an option input the number assigned to it:
>
```

###### 1.3.4.1.2.4. Error treatment and handling

It's just the same as [numericSerial](#134114-error-treatment-and-handling).

##### 1.3.4.1.3. alphabetical

The alphabetical menu is the most unique of all singleSelect menus being that instead of using numbers as the selectable options it uses the Modern Latin Alphabet (aka The English Alphabet).

###### 1.3.4.1.3.1. Usage

Only one way to use the function:

```python
import inputapi as inp

inp.menus.singleSelect.alphabetical({params})
```

###### 1.3.4.1.3.2. Parameters

The parameters are the same as [numericSerial and numericIndex](#134112-parameters):

| Parameter     | data type | default    | purpose                                                                  |
| :------------ | :-------- | :--------- | :----------------------------------------------------------------------- |
| \*args        | Any       | No default | Options that are displayed to the user                                   |
| clearOnLoad   | boolean   | `False`    | Clears terminal before displaying output                                 |
| clearWhenDone | boolean   | `False`    | Clears terminal after user gives input                                   |
| title         | string    | `'Menu'`   | What will be displayed as the name/purpose of the menu (`---{title}---`) |

###### 1.3.4.1.3.3. Output

The output of alphabetical is as follows:

```python
#This could be used for trivia questions
#Also the correct statement is 'C'

---Guess The Correct Statement---
A: The plural word for octopus is octopi
B: Luigi`s last name is Luigi since Mario`s is Mario
C: In a State of the US it is illegal to wear a fake mustache to church if it makes someone laugh

To select an option input the letters next to it:
>
```

When given more options than character an additional character will be given:

```python
#I can't bother making something creative for this

---Select One---
A: Option 1
B: Option 2
C: Option 3
...
X: Option 24
Y: Option 25
Z: Option 26
AA: Option 27
```

###### 1.3.4.1.3.4. Error treatment and handling

It is actually the same as [numericSerial](#134114-error-treatment-and-handling) with the following exception.

```python
#Since it uses different characters for input this is the message for invalid characters

---What is the better number?---
A: 1
B: 2

To select an option input the letters next to it:
>1
WARNING: Input has invalid character [1], allowed characters are ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O' ... 'v', 'w', 'x', 'y', 'z']
>
```

#### 1.3.4.2. multiSelect menus

With multiSelect menus instead of only allowing one option to be selected you can select more than one, hence the name 'multiSelect' and 'singleSelect'.

##### 1.3.4.2.1. returnSelected menus

returnSelected menus return what was selected by the user.
(Since the header limit is reached the one menu will have it's documentation outside of it's normal bounds)

###### 1.3.4.2.1.1. numericSerial

numericSerial has near same functionality as [singleSelect numericSerial](#13411-numericserial) except for a few changes to allow it to be multiSelect.

###### 1.3.4.2.1.2. Usage

The only menu there is has only one way to be used.

```python
import inputapi as inp

inp.menus.multiSelect.returnSelected.numericSerial({params})
```

###### 1.3.4.2.1.3. Parameters

The parameters for the multiSelect menu are:

| Parameter             | data type | default    | purpose                                                                  |
| :-------------------- | :-------- | :--------- | :----------------------------------------------------------------------- |
| \*args                | Any       | No default | Options that are displayed to the user                                   |
| confirmChoice         | boolean   | `True`     | Ensures that what the user selected was what they intended to select     |
| showSelectedOnRefresh | boolean   | `True`     | Allows users to see what they selected (See Output for further detail)   |
| allowNoSelection      | boolean   | `False`    | Allows the user to simply select nothing                                 |
| clearOnLoad           | boolean   | `False`    | Clears terminal before displaying output                                 |
| cleanOnRefresh        | boolean   | `False`    | Clears terminal when an option is selected                               |
| clearWhenDone         | boolean   | `False`    | Clears terminal after user selects options                               |
| title                 | string    | `'Menu'`   | What will be displayed as the name/purpose of the menu (`---{title}---`) |

###### 1.3.4.2.1.4. Output

The output in a single state is almost identical to [numericSerial](#13411-numericserial) but the difference between selections is what will be documented.

```python
#For our first output we will have all values default
#You can replecate this with
#inp.menus.multiSelect.returnSelected.numericSerial('Option 1', 'Option 2', 'Option 3')

---Menu---
1: Option 1
2: Option 2
3: Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>1

---Menu---
1: *Option 1
2: Option 2
3: Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>2

---Menu---
1: *Option 1
2: *Option 2
3: Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>3

---Menu---
1: *Option 1
2: *Option 2
3: *Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>2

---Menu---
1: *Option 1
2: Option 2
3: *Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>0

Option 1, Option 3
Confirm choice?
Numeric response allowed (Y=1, n=2)
[Y/n]:1

# This returned ['Option 1', 'Option 3']
```

But when showSelectedOnRefresh is `False` you get a different output.

```python
#This one will be recreated with
#inp.menus.multiSelect.returnSelected.numericSerial('Option 1', 'Option 2', 'Option 3', showSelectedOnRefresh=False)

---Menu---
1: Option 1
2: Option 2
3: Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>1

---Menu---
1: *Option 1
2: Option 2
3: Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>2

---Menu---
1: *Option 1
2: *Option 2
3: Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>3

---Menu---
1: *Option 1
2: *Option 2
3: *Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>2

---Menu---
1: *Option 1
2: Option 2
3: *Option 3
0: Done


---Menu---
1: Option 1
2: Option 2
3: Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>1

---Menu---
1: Option 2
2: Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>2

---Menu---
1: Option 2
0: Done

Multiple selection menu
To select an option input the number next to it:

---Menu---
1: Option 1
2: Option 2
3: Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>1

---Menu---
1: Option 2
2: Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>2

---Menu---
1: Option 2
0: Done

Multiple selection menu
To select an option input the number next to it:
>1

Option 1, Option 2, Option 3
Confirm choice?
Numeric response allowed (Y=1, n=2)
[Y/n]:y

#This returned ['Option 1', 'Option 2', 'Option 3']
```

With showSelectedOnRefresh disabled it makes correcting errors more difficult and harder to select options but can remove the possibilities of selecting one option twice by accident. Also if all options are selected it will ask if you selected all options without you needing to select `Done`.

###### 1.3.4.2.1.5. Error treatment and handling

The only possible errors are the ones from both [newLineInt](#13113-error-treatment-and-handling) and [yesNo](#1332-error-treatment-and-handling) since they are what the user inputs through.

##### 1.3.4.2.2. returnDeselected

returnDeselected is almost the same as [returnSelected](#134211-numericserial) with the only difference being that instead of returning what the user selected it returns what the user **didn't** select.

###### 1.3.4.2.2.1. numericSerial

numericSerial assigns numbers to the options from 1 to the length of \*args.

###### 1.3.4.2.2.2. Usage

There is only one way to use this menu:

```python
import inputapi as inp

inp.menus.multiSelect.returnDeselected.numericSerial({params})
```

###### 1.3.4.2.2.3. Parameters

The parameters are identical to [returnSelected's parameters](#134213-parameters).

| Parameter             | data type | default    | purpose                                                                  |
| :-------------------- | :-------- | :--------- | :----------------------------------------------------------------------- |
| \*args                | Any       | No default | Options that are displayed to the user                                   |
| confirmChoice         | boolean   | `True`     | Ensures that what the user selected was what they intended to select     |
| showSelectedOnRefresh | boolean   | `True`     | Allows users to see what they selected (See Output for further detail)   |
| allowNoSelection      | boolean   | `False`    | Allows the user to simply select nothing                                 |
| clearOnLoad           | boolean   | `False`    | Clears terminal before displaying output                                 |
| cleanOnRefresh        | boolean   | `False`    | Clears terminal when an option is selected                               |
| clearWhenDone         | boolean   | `False`    | Clears terminal after user selects options                               |
| title                 | string    | `'Menu'`   | What will be displayed as the name/purpose of the menu (`---{title}---`) |

###### 1.3.4.2.2.4. Output

The output is identical to [returnSelected](#134214-output) where the output is the inverse.

```python
---Menu---
1: Option 1
2: Option 2
3: Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>2

---Menu---
1: Option 1
2: *Option 2
3: Option 3
0: Done

Multiple selection menu
To select an option input the number next to it:
>0

Option 2
Confirm choice?
Numeric response allowed (Y=1, n=2)
[Y/n]:1

#This returned ['Option 1', 'Option 3']
```

###### 1.3.4.2.2.5. Error treatment and handling

Refer to [returnSelected](#134215-error-treatment-and-handling) for error treatment and handling.

### 1.3.5. RDCs

RDC (aka Radius Diameter Circumference) leans more on the mathematical part. RDC takes a Radius, Diameter, or Circumference of a circle and returns the radius.

#### 1.3.5.1. RDC

RDC was implemented in the 1.X versions of Input API, this is the most basic RDC in that you need another input for it to work.

##### 1.3.5.1.1. Usage

There are two ways to use RDC:

```python
#The 1.X way to use RDC
import inputapi as inp

inp.RDC({params})
```

```python
#The new way to use RDC
import inputapi as inp

inp.RDCs.RDC({params})
```

##### 1.3.5.1.2. Parameters

| Parameter     | data type | default    | purpose                             |
| :------------ | :-------- | :--------- | :---------------------------------- |
| length        | float     | No default | The value to be converted to radius |
| clearOnLoad   | boolean   | `False`    | Clears terminal before display      |
| clearWhenDone | boolean   | `False`    | Clears terminal when converted      |

##### 1.3.5.1.3. Output

The only output RDC has is:

```python
---RDC---
1: Radius
2: Diameter
3: Circumference

To select an option input the number assigned to it:
>
```

##### 1.3.5.1.4. Error treatment and handling

All error treatment and handling is dealt by the [menu](#134114-error-treatment-and-handling) RDC uses. The only error that can happen is if length is not a number.

#### 1.3.5.2. newLineRDC

newLineRDC doesn't require you to input length, it will simply just request the length with [newLineFloat](#13121-newlinefloat-input) then returns radius.

##### 1.3.5.2.1. Usage

Only one way to use newLineRDC:

```python
import inputapi as inp

inp.RDCs.newLineRDC({params})
```

##### 1.3.5.2.2. Parameters

The parameters are:

| Parameter      | data type | default | purpose                        |
| :------------- | :-------- | :------ | :----------------------------- |
| clearOnLoad    | boolean   | `False` | Clears terminal before display |
| clearOnRefresh | boolean   | `False` | Clears terminal between inputs |
| clearWhenDone  | boolean   | `False` | Clears terminal when converted |

##### 1.3.5.2.3. Output

The output for newLineRDC isn't much:

```python
#Let's do a radius of 5
RDC:
>5

---RDC---
1: Radius
2: Diameter
3: Circumference

To select an option input the number assigned to it:
>1

# This returned 5.0
```

##### 1.3.5.2.4. Error treatment and handling

The errors for newLineRDC are handled by [newLineFloat](#13123-error-treatment-and-handling) and [singleSelect's numericSerial](#134114-error-treatment-and-handling).

#### 1.3.5.3. sameLineRDC

sameLineRDC uses [sameLineFloat](#13122-samelinefloat) as the input instead of [newLineFloat](#13121-newlinefloat-input), this makes the input more compact and takes up less space for input.

##### 1.3.5.3.1. Usage

There is only one way to use sameLineRDC:

```python
import inputapi as inp

inp.RDCs.sameLineRDC({params})
```

##### 1.3.5.3.2. Parameters

These are the parameters for sameLineRDC:

| Parameter      | data type | default | purpose                        |
| :------------- | :-------- | :------ | :----------------------------- |
| clearOnLoad    | boolean   | `False` | Clears terminal before display |
| clearOnRefresh | boolean   | `False` | Clears terminal between inputs |
| clearWhenDone  | boolean   | `False` | Clears terminal when converted |

##### 1.3.5.3.3. Output

The output for sameLineRDC is as follows:

```python
#Lets do a diameter of 26
RDC=26

---RDC---
1: Radius
2: Diameter
3: Circumference

To select an option input the number assigned to it:
>2

#This returned 13.0
```

##### 1.3.5.3.4. Error treatment and handling

All possible errors happen through [sameLineFloat](#13123-error-treatment-and-handling) and [singleSelect's numericSerial](#134114-error-treatment-and-handling).

### 1.3.6. otherFunc

otherFunc is what features the Input API has but isn't actually input. Just about all inputs require otherFunc to work just enough to keep afloat. You don't need to master this to actually be good at using Input API.

#### 1.3.6.1. pause

With pause it will stop the program until a user presses ENTER, this is really simple and is never used by any input.

##### 1.3.6.1.1. standard

standard is the first pause function and just pauses with no other noteworthy functionality.

###### 1.3.6.1.1.1. Usage

There are two ways to use standard:

```python
#This one actually makes sense
import inputapi as inp

inp.pause({params})
```

```python
#The reimagined way
import inputapi as inp

inp.otherFunc.pause.standard({params})
```

###### 1.3.6.1.1.2. Parameters

The parameters for standard is:

| Parameter     | data type | default | purpose                        |
| :------------ | :-------- | :------ | :----------------------------- |
| clearOnLoad   | boolean   | `False` | Clears terminal before pausing |
| clearWhenDone | boolean   | `False` | Clears terminal when resuming  |

###### 1.3.6.1.1.3. Output

The output is really lackluster:

```python
#Anything can be printed before pausing
#If clearOnLoad is False
Press ENTER to continue:
```

###### 1.3.6.1.1.4. Error treatment and handling

If you can find an error that can only happen with standard... congrats at breaking the most simple function the Input API has.

##### 1.3.6.1.2. showValue

This works almost identical to [standard](#13611-standard) but allows you to print values while having clearOnLoad `True`.

###### 1.3.6.1.2.1. Usage

Only one way to use showValue:

```python
import inputapi as inp

inp.otherFunc.pause.showValue({params})
```

###### 1.3.6.1.2.2. Parameters

The parameters for showValue are:

| Parameter     | data type | default    | purpose                             |
| :------------ | :-------- | :--------- | :---------------------------------- |
| \*values      | Any       | No default | The values to be displayed on pause |
| clearOnLoad   | boolean   | `False`    | Clears terminal before pausing      |
| clearWhenDone | boolean   | `False`    | Clears terminal when resuming       |

###### 1.3.6.1.2.3. Error treatment and handling

The errors that can happen are un-treatable and will break the script.

#### 1.3.6.2. clearScreen

clearScreen is the only part of Input API that is depended to the point of breaking. If clearScreen breaks then everything that wants to clear the terminal will break. clearScreen will only work with Windows, MacOS, and Linux based systems. Anything else is either lucky enough to be under the umbrella or incompatible entirely.

##### 1.3.6.2.1. auto

auto will clear the terminal while not needing info on the OS. It instead will ask Python through `os` to get info on the OS to use the right command to clear the terminal. This function has no parameters or errors, so you can just call it and nothing bad will happen.

###### 1.3.6.2.1.1. Usage

Two ways to use auto:

```python
#The original way
import inputapi as inp

inp.clearScreen()
```

```python
#The way Input API uses auto

inp.otherFunc.clearScreen.auto()
```

##### 1.3.6.2.2. manual

manual clearScreen gives you the ability to clear the terminal for one OS and not all. Though MacOS and Linux based systems use the same command for their clearing, it's more allow Windows to clear or allow the other two to clear.

###### 1.3.6.2.2.1. Usage

Only one way to use manual:

```python
import inputapi as inp

inp.otherFunc.clearScreen.manual({params})
```

###### 1.3.6.2.2.2. Parameters

The parameter for manual is:

| Parameter | data type | default    | purpose                             |
| :-------- | :-------- | :--------- | :---------------------------------- |
| OS        | string    | No default | What OS you want to be cleared |

###### 1.3.6.2.2.3. How to properly use manual

When calling the function you have to tell manual the name of the OS. While it requires the spelling to be correct, manual isn't case sensitive.

```python
#Lets go through every OS supported
import inputapi as inp

#This will make using manual easier to call
manual = inp.otherFunc.clearScreen.manual

#Windows
manual(OS='Windows')

#MacOS
manual(OS='MACOS')

#Linux based systems
manual(OS='linux')

#This will raise an error
manual(OS='WindowsOS')

#This too will raise an error
manual()
```

## 1.4. TODO

This will be some things to expect to happen as Input API gets more updates. With some coming in the next major update, others in the minor updates.

### 1.4.1. In Major Updates

These will be added in the next major updates, some may appear in the same, others might be the only change.

NOTE: These ideas are in no order whatsoever, any combination of when these will be added is possible

#### 1.4.1.1. Pre-set Inputs

Pre-set Inputs will be a way to have a series of inputs with the parameters set. A file with inputs could be read by the Input API and saved as a readable file or a compressed format to save on space. There will also be some built-in formats to make easier inputs too. This will be compatible with both older and more recent updates.

```python
import inputapi as inp

#So instead of having something like this
inp.numeric.newLineFloat('Gimmie a number:')
inp.boolean.yesNo('Are you sure?')

#You could
fileInput = inp.presets.readFrom('/File.ext') #File extension will be given (.ext isn't it)
fileInput.getNumber()

#Or maybe
inp.presets.number.intWithConfirm('Gimmie a number', 'Are you sure?') #This is not a guarantee to be added to presets (At least not in this exact way)
```

#### 1.4.1.2. Iterable Inputs

This update will allow input for multiple elements of a list or array. This will allow multiple types of inputs in one.

```python
import inputapi as inp

#This could be how the input could be used
inp.iterables.list.newLineList()
inp.iterables.tuple.sameLineTuple()
inp.iterables.set.newLineSet()
```

#### 1.4.1.3. A Config Function

This function will allow you to determine multiple factors throughout Input API, maybe relax some restrictions or make some more strict. More power will be given to you when receiving input when this comes to existence.

```python
import inputapi as inp

#Could be this
inp.config({params})

#Maybe this
inp.strings.config({params})

#Or this
inp.config.var = {Var}

#There is some other things tht could be how config works but this is still possible
```

#### 1.4.1.4. Call later/repeat input

This update will allow you to have a set of inputs within the script to be called over time and not when the line is read.

```python
import inputapi as inp

#So instead of input being here
inp.strings.newLineStr() #This is the input *function*

#You could save it
input = inp.strings.NewLineStr({params}) #This could be a class (Name is a placeholder)

#Then call it later
if __name__ == '__main__':
  input()

  #Or repeat the input
  while True:
    user = input()
    print(user)
    if user == 'Quit':
      break
```

### 1.4.2. In Minor Updates

These updates will be added between major updates or with them.

#### 1.4.2.1. New multiSelect Menu Types

There will be new multiSelect menu types for both returnSelected and returnDeselected. These types will be from the singleSelect menus.

#### 1.4.2.2. New singleSelect Menu Type

There will be a new singleSelect menu type that will be exclusive to singleSelect. This will have the same output as a multiSelect menu but won't let you select multiple.

#### 1.4.2.3. Adding A Changelog

There will be a changelog that will list every change from 1.0.0 to the latest update. This will be publicly available to all distributions and to the GitHub repository.

[^1]:
    clearScreen is does not need any information about the OS to work[^2]
    It will automatically tell what OS is running the code and use the command used by the OS to clear the terminal

[^2]: Feature is only supported on Windows, MacOS, and Linux based systems
[^3]: Fun Fact's although being labeled as "Fun" is more fact than fun and could be a "Sad Fact" depending on the fact!
[^4]: Not everything, just what takes input, clearScreen and pause don't rely on it working to function
