Name | minifzf JSON |
Version |
0.1.4
JSON |
| download |
home_page | |
Summary | Python Library and Command Line Tool for Fuzzy Selection. |
upload_time | 2024-02-05 18:22:05 |
maintainer | |
docs_url | None |
author | Harsh Verma |
requires_python | >=3.8,<4.0 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<div align="center">
<img src="https://github.com/synacktraa/minifzf/assets/91981716/8d4132dd-b873-4921-a2a2-2b2ede989a74" alt="MiniFzf GIF">
</div>
Lightweight and efficient Python library inspired by the powerful features of `fzf`, the popular command-line fuzzy finder. `minifzf` is designed to bring the essential functionalities of `fzf` into your Python CLI projects with ease and simplicity.
---
### Key Features:
- **Basic FZF Functionalities**: Incorporates the fundamental features of `fzf`, offering efficient and fast fuzzy finding and selection capabilities right in your command line.
- **Library Use**: Can be easily imported and used as a module in other Python projects, enhancing the interactive command-line interface experience.
- **Simplicity and Efficiency**: Stripped down to core features, ensuring a lightweight and straightforward user experience without the overhead of complex functionalities.
### Ideal Use Cases:
- Interactive data selection and navigation in Python CLI applications.
- Quick searching and filtering in command-line based tools or scripts.
- Enhancing existing Python projects with simple, efficient selection capabilities.
- Developers seeking a minimalistic yet powerful alternative to `fzf` for Python.
### Installation:
```bash
pip install minifzf
```
### CLI Usage:
```
$ mfzf --help
Usage: minifzf COMMAND [OPTIONS]
╭─ Commands ────────────────────────────────────────────╮
│ --help,-h Display this message and exit. │
│ --version,-v Display application version. │
╰───────────────────────────────────────────────────────╯
╭─ Parameters ──────────────────────────────────────────╮
│ --query -q Start the selector with the given query. │
│ --first -1 Automatically select the only match. │
╰───────────────────────────────────────────────────────╯
```
Start `minifzf` selection for current directory.
```bash
mfzf
```
With initial query.
```bash
minifzf -q "<Your Query>"
```
Returned most relevant item.
```bash
mfzf -q "<Your Query>" -1
```
Select from Standard Input.
> No UNIX support for now (Throws `[Errno 25] Inappropriate ioctl for device` because minifzf uses sshkeyboard which utilizes termios library.)
```bash
cat filename | minifzf
```
### Library Usage:
Initiating selector with headers and rows.
```python
from minifzf import Selector
from pathlib import Path
selector = Selector(
headers=['files'],
rows=[[str(p)] for p in Path.cwd().glob('*')])
selected = selector.select()
```
Initating selector with mappings.
```python
from minifzf import Selector
mappings = [
{"id": "51009", "name": "Jujutsu Kaisen 2nd Season"},
{"id": "40748", "name": "Jujutsu Kaisen"},
{"id": "48561", "name": "Jujutsu Kaisen 0 Movie"}
]
selector = Selector.from_mappings(mappings=mappings)
selected = selector.select()
```
Initiating a path selector.
```python
from minifzf import Selector
from pathlib import Path
path_selector = Selector.as_path_selector(
directory=Path('path/to/directory'), recursive=False)
selected = path_selector.select()
```
### Contribution and Feedback:
We welcome contributions and feedback to improve `minifzf`. If you have ideas, issues, or want to contribute, please feel free to open an issue or a pull request.
Raw data
{
"_id": null,
"home_page": "",
"name": "minifzf",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Harsh Verma",
"author_email": "synacktra.work@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/5b/74/23f86a6b502f40b99b3c21884e0ed5ba26ffe03acfd83247703cc940b379/minifzf-0.1.4.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n <img src=\"https://github.com/synacktraa/minifzf/assets/91981716/8d4132dd-b873-4921-a2a2-2b2ede989a74\" alt=\"MiniFzf GIF\">\n</div>\n\nLightweight and efficient Python library inspired by the powerful features of `fzf`, the popular command-line fuzzy finder. `minifzf` is designed to bring the essential functionalities of `fzf` into your Python CLI projects with ease and simplicity.\n\n---\n\n### Key Features:\n- **Basic FZF Functionalities**: Incorporates the fundamental features of `fzf`, offering efficient and fast fuzzy finding and selection capabilities right in your command line.\n- **Library Use**: Can be easily imported and used as a module in other Python projects, enhancing the interactive command-line interface experience.\n- **Simplicity and Efficiency**: Stripped down to core features, ensuring a lightweight and straightforward user experience without the overhead of complex functionalities.\n\n### Ideal Use Cases:\n- Interactive data selection and navigation in Python CLI applications.\n- Quick searching and filtering in command-line based tools or scripts.\n- Enhancing existing Python projects with simple, efficient selection capabilities.\n- Developers seeking a minimalistic yet powerful alternative to `fzf` for Python.\n\n### Installation:\n\n```bash\npip install minifzf\n```\n\n### CLI Usage:\n\n```\n$ mfzf --help\n\nUsage: minifzf COMMAND [OPTIONS]\n\n\u256d\u2500 Commands \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --help,-h Display this message and exit. \u2502\n\u2502 --version,-v Display application version. \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Parameters \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --query -q Start the selector with the given query. \u2502\n\u2502 --first -1 Automatically select the only match. \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n```\n\nStart `minifzf` selection for current directory.\n\n```bash\nmfzf\n```\n\nWith initial query.\n\n```bash\nminifzf -q \"<Your Query>\"\n```\n\nReturned most relevant item.\n\n```bash\nmfzf -q \"<Your Query>\" -1\n```\n\nSelect from Standard Input.\n\n> No UNIX support for now (Throws `[Errno 25] Inappropriate ioctl for device` because minifzf uses sshkeyboard which utilizes termios library.)\n```bash\ncat filename | minifzf\n```\n\n### Library Usage:\n\nInitiating selector with headers and rows.\n\n```python\nfrom minifzf import Selector\nfrom pathlib import Path\n\nselector = Selector(\n headers=['files'],\n rows=[[str(p)] for p in Path.cwd().glob('*')])\nselected = selector.select()\n```\n\nInitating selector with mappings.\n\n```python\nfrom minifzf import Selector\n\nmappings = [\n {\"id\": \"51009\", \"name\": \"Jujutsu Kaisen 2nd Season\"},\n {\"id\": \"40748\", \"name\": \"Jujutsu Kaisen\"},\n {\"id\": \"48561\", \"name\": \"Jujutsu Kaisen 0 Movie\"}\n]\nselector = Selector.from_mappings(mappings=mappings)\nselected = selector.select()\n```\n\nInitiating a path selector.\n\n```python\nfrom minifzf import Selector\nfrom pathlib import Path\n\npath_selector = Selector.as_path_selector(\n directory=Path('path/to/directory'), recursive=False)\nselected = path_selector.select()\n```\n\n### Contribution and Feedback:\nWe welcome contributions and feedback to improve `minifzf`. If you have ideas, issues, or want to contribute, please feel free to open an issue or a pull request.\n",
"bugtrack_url": null,
"license": "",
"summary": "Python Library and Command Line Tool for Fuzzy Selection.",
"version": "0.1.4",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f761e03f784cfd684e2569595085bcdc79101a0bac0a92aabefbe03c019903e3",
"md5": "a56321a06a40365748cf1d91e3ddd1df",
"sha256": "cd2288d5e5d6892ea941e24ef40b2100a7230d9dea7091f1170ed1d2e13340ae"
},
"downloads": -1,
"filename": "minifzf-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a56321a06a40365748cf1d91e3ddd1df",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 8350,
"upload_time": "2024-02-05T18:22:03",
"upload_time_iso_8601": "2024-02-05T18:22:03.784096Z",
"url": "https://files.pythonhosted.org/packages/f7/61/e03f784cfd684e2569595085bcdc79101a0bac0a92aabefbe03c019903e3/minifzf-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5b7423f86a6b502f40b99b3c21884e0ed5ba26ffe03acfd83247703cc940b379",
"md5": "4046a9510bed0284ff73a67c924ec853",
"sha256": "0c3dbe11677773c324c4ad15427bafec951bafbbc2e52072d1903a0a98640f7a"
},
"downloads": -1,
"filename": "minifzf-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "4046a9510bed0284ff73a67c924ec853",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 6938,
"upload_time": "2024-02-05T18:22:05",
"upload_time_iso_8601": "2024-02-05T18:22:05.642802Z",
"url": "https://files.pythonhosted.org/packages/5b/74/23f86a6b502f40b99b3c21884e0ed5ba26ffe03acfd83247703cc940b379/minifzf-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-05 18:22:05",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "minifzf"
}