linkedinputs


Namelinkedinputs JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/naderidev/linkedinputs
Summarylinked inputs for flet framework
upload_time2023-03-18 16:49:20
maintainer
docs_urlNone
authornaderidev
requires_python>=3.9
licenseLICENSE
keywords flet pin input pininput textfield python field naderidev text field
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Linked Inputs

This module Interconnects a couple of flet inputs, actually, it combines the value of the inputs and manages them.
This module can be used to make "pin inputs" and so on.

# Instalation
first of all get the project from pypi or github:

## cloning form github
```shell 
clone https://github.com/naderidev/linkedinputs
 ````

 ## installing using pip
```shell 
$ pip install linkedinputs
 ````

 # Usage
 

## LinkedInputs

The ``` LinkedInputs ``` class is the mother class and the basic form of the module.
> this class just have the input type rule.

### Properties
- ```page```
- ```inputs``` : the list of Inputs to be connected
- ```accept_type``` : an instance of ```AcceptTypes``` which specifies the content type of inputs
- ```on_change```: on inputs value changed. actually, it returns the value of each input in a list
- ```on_error```: on user entered the wrong value type
- ```on_complete```: on all inputs filled
- ```place```: a ```Row``` or ```Column``` control without any child controls

### Methods
- ```errors```: only returns the error of each input in a list
- ```flash_errors()```: returns the errors then clears the errors
- ```value```: returns the value of each input and also it has a setter which you can set a specific value for each input. for example:
    ````python
    ...
    linkedinputs.value = ['124' , '457' , '478']
    ...
    ````
    this is an example is when you have 3 inputs which they require ONLY_NUMBER

- ```string_value```: combines the value of inputs and returns it as a string

## RegularLinkedInputs
the ``` RegularLinkedInputs ``` class  has defined new rules (like accept_length) for the ```LinkedInputs``` class and ordered it.

### Properties
- all ``` LinkedInputs ``` properties
- ```accept_length```: the value lenght of each input
- ```one_by_one```: o to the next input on current, filled

### an example of RegularLinkedInputs:
source avliable in ```examples/bankcard_example.py```
![BankCard exmaple](https://raw.githubusercontent.com/naderidev/pininput/master/bankcard_example.gif "BankCard")
In this example when you enter 6 numbers, the associated bank name is displayed (the banks are Iranian)

## PinInputT1
the ```PinInputT1``` is using ```RegularLinkedInputs``` and it is used to making password inputs

### Properties
- ```page```
- ```accept_type``` : an instance of ```AcceptTypes``` which specifies the content type of inputs
- ```correct_answer```: the correct password for validating
- ```on_complete```: on all inputs filled
- ```accept_length```: the value lenght of each input

### Methods
- all ```RegularLinkedInputs``` methods
- ```is_correct```: is password correct
> Note: if you want to customize the piniput inputs just ceate a class and extend PinInputT1 then override pin_inputs() method with your own inputs. for example:
````python
class MyPinInput(PinInputT1):
    def pin_inputs(self):
        return [
            TextField(
                ...
            ) for _ in range(...)
        ]
````
### an example of PinInputT1:
source avliable in ```examples/pininput_t1_example.py```
![PinInput exmaple](https://raw.githubusercontent.com/naderidev/pininput/master/pininputt1_example.gif "PinInput")

Hope this package be useful for you :)
# Donating
- [buy me a coffee](https://www.buymeacoffee.com/mohammadrezaN)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/naderidev/linkedinputs",
    "name": "linkedinputs",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "flet,pin input,pininput,TextField,python,field,naderidev,text field",
    "author": "naderidev",
    "author_email": "mohammadrezanaderi84@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b4/b9/50ed079c753b451a49496fea70d8862e909235d42df5e1c1e52870ea52df/linkedinputs-0.0.2.tar.gz",
    "platform": null,
    "description": "# Linked Inputs\r\n\r\nThis module Interconnects a couple of flet inputs, actually, it combines the value of the inputs and manages them.\r\nThis module can be used to make \"pin inputs\" and so on.\r\n\r\n# Instalation\r\nfirst of all get the project from pypi or github:\r\n\r\n## cloning form github\r\n```shell \r\nclone https://github.com/naderidev/linkedinputs\r\n ````\r\n\r\n ## installing using pip\r\n```shell \r\n$ pip install linkedinputs\r\n ````\r\n\r\n # Usage\r\n \r\n\r\n## LinkedInputs\r\n\r\nThe ``` LinkedInputs ``` class is the mother class and the basic form of the module.\r\n> this class just have the input type rule.\r\n\r\n### Properties\r\n- ```page```\r\n- ```inputs``` : the list of Inputs to be connected\r\n- ```accept_type``` : an instance of ```AcceptTypes``` which specifies the content type of inputs\r\n- ```on_change```: on inputs value changed. actually, it returns the value of each input in a list\r\n- ```on_error```: on user entered the wrong value type\r\n- ```on_complete```: on all inputs filled\r\n- ```place```: a ```Row``` or ```Column``` control without any child controls\r\n\r\n### Methods\r\n- ```errors```: only returns the error of each input in a list\r\n- ```flash_errors()```: returns the errors then clears the errors\r\n- ```value```: returns the value of each input and also it has a setter which you can set a specific value for each input. for example:\r\n    ````python\r\n    ...\r\n    linkedinputs.value = ['124' , '457' , '478']\r\n    ...\r\n    ````\r\n    this is an example is when you have 3 inputs which they require ONLY_NUMBER\r\n\r\n- ```string_value```: combines the value of inputs and returns it as a string\r\n\r\n## RegularLinkedInputs\r\nthe ``` RegularLinkedInputs ``` class  has defined new rules (like accept_length) for the ```LinkedInputs``` class and ordered it.\r\n\r\n### Properties\r\n- all ``` LinkedInputs ``` properties\r\n- ```accept_length```: the value lenght of each input\r\n- ```one_by_one```: o to the next input on current, filled\r\n\r\n### an example of RegularLinkedInputs:\r\nsource avliable in ```examples/bankcard_example.py```\r\n![BankCard exmaple](https://raw.githubusercontent.com/naderidev/pininput/master/bankcard_example.gif \"BankCard\")\r\nIn this example when you enter 6 numbers, the associated bank name is displayed (the banks are Iranian)\r\n\r\n## PinInputT1\r\nthe ```PinInputT1``` is using ```RegularLinkedInputs``` and it is used to making password inputs\r\n\r\n### Properties\r\n- ```page```\r\n- ```accept_type``` : an instance of ```AcceptTypes``` which specifies the content type of inputs\r\n- ```correct_answer```: the correct password for validating\r\n- ```on_complete```: on all inputs filled\r\n- ```accept_length```: the value lenght of each input\r\n\r\n### Methods\r\n- all ```RegularLinkedInputs``` methods\r\n- ```is_correct```: is password correct\r\n> Note: if you want to customize the piniput inputs just ceate a class and extend PinInputT1 then override pin_inputs() method with your own inputs. for example:\r\n````python\r\nclass MyPinInput(PinInputT1):\r\n    def pin_inputs(self):\r\n        return [\r\n            TextField(\r\n                ...\r\n            ) for _ in range(...)\r\n        ]\r\n````\r\n### an example of PinInputT1:\r\nsource avliable in ```examples/pininput_t1_example.py```\r\n![PinInput exmaple](https://raw.githubusercontent.com/naderidev/pininput/master/pininputt1_example.gif \"PinInput\")\r\n\r\nHope this package be useful for you :)\r\n# Donating\r\n- [buy me a coffee](https://www.buymeacoffee.com/mohammadrezaN)\r\n\r\n",
    "bugtrack_url": null,
    "license": "LICENSE",
    "summary": "linked inputs for flet framework",
    "version": "0.0.2",
    "split_keywords": [
        "flet",
        "pin input",
        "pininput",
        "textfield",
        "python",
        "field",
        "naderidev",
        "text field"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "42c8d0eeef080688a86ace275c89bfa7b170ef0158e60da499cdcec1c9dd2ca1",
                "md5": "400a19eb662a189883b098fc25a60225",
                "sha256": "9dad01b34fa1a2047e82d94cf39a9ec3c3bca02162f37f358e51efbd5c300e65"
            },
            "downloads": -1,
            "filename": "linkedinputs-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "400a19eb662a189883b098fc25a60225",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6286,
            "upload_time": "2023-03-18T16:49:18",
            "upload_time_iso_8601": "2023-03-18T16:49:18.820648Z",
            "url": "https://files.pythonhosted.org/packages/42/c8/d0eeef080688a86ace275c89bfa7b170ef0158e60da499cdcec1c9dd2ca1/linkedinputs-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b4b950ed079c753b451a49496fea70d8862e909235d42df5e1c1e52870ea52df",
                "md5": "d182a56efe4fcd80750587c38510c69d",
                "sha256": "8964d5aa295d3456bdda3b48b66445bcfb72189da8d159a3eada3eca426a3c21"
            },
            "downloads": -1,
            "filename": "linkedinputs-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d182a56efe4fcd80750587c38510c69d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 5850,
            "upload_time": "2023-03-18T16:49:20",
            "upload_time_iso_8601": "2023-03-18T16:49:20.448577Z",
            "url": "https://files.pythonhosted.org/packages/b4/b9/50ed079c753b451a49496fea70d8862e909235d42df5e1c1e52870ea52df/linkedinputs-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-18 16:49:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "naderidev",
    "github_project": "linkedinputs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "linkedinputs"
}
        
Elapsed time: 0.09092s