semvec/pypi-packages huggingface dataset:
textual-cogs 0.0.3
Dialogs for use with the Textual package.

# textual-cogs

A collection of Textual dialogs.

Dialogs included so far:

- Generic `MessageDialog` - shows messages to the user
- `SaveFileDialog` - gives the user a way to select a location to save a file
- `TextEntryDialog` - Ask the user a question and get their answer using an `Input` widget

## Installation

You can install `textual-cog` using pip:

```
python -m pip install textual-cog
```

You also need [Textual](https://github.com/Textualize/textual) to run these dialogs.

## Example Usage

Here is an example of creating a small application that opens the `MessageDialog` immediately. You would normally open the dialog in response to a message or event that has occurred, such as when the application has an error or you need to tell the user something.

```python
from textual.app import App
from textual.app import App, ComposeResult

from textual_cogs.dialogs import MessageDialog
from textual_cogs import icons


class DialogApp(App):
    def on_mount(self) -> ComposeResult:
        def my_callback(value: None | bool) -> None:
            self.exit()

        self.push_screen(
            MessageDialog(
                "What is your favorite language?",
                icon=icons.ICON_QUESTION,
                title="Warning",
            ),
            my_callback,
        )


if __name__ == "__main__":
    app = DialogApp()
    app.run()
```

When you run this code, you will get something like the following:

![screenshot](https://github.com/driscollis/textual-cogs/blob/main/images/message_dialog.jpg)

### Creating a TextEntryDialog

Here 

```python
from textual.app import App
from textual.app import App, ComposeResult

from textual_cogs.dialogs import TextEntryDialog


class DialogApp(App):
    def on_mount(self) -> ComposeResult:
        def my_callback(value: str | bool) -> None:
            self.exit()

        self.push_screen(
            TextEntryDialog("What is your name?", "Information"), my_callback
        )


if __name__ == "__main__":
    app = DialogApp()
    app.run()
```

When you run this code, you will see the following:

![screenshot](https://github.com/driscollis/textual-cogs/blob/main/images/text_entry_dialog.jpg)

### Creating a SaveFileDialog

The following code demonstrates how to create a `SaveFileDialog`:

```python
from textual.app import App
from textual.app import App, ComposeResult

from textual_cogs.dialogs import SaveFileDialog


class DialogApp(App):
    def on_mount(self) -> ComposeResult:        
        self.push_screen(SaveFileDialog())

if __name__ == "__main__":
    app = DialogApp()
    app.run()
```

When you run this code, you will see the following:

![screenshot](https://github.com/driscollis/textual-cogs/blob/main/images/save_file_dialog.jpg)
NLPurify 2.0.0a0
Text cleaning and feature extractions using NLP, Traditional approach.
Requires Python: >=3.8
Keywords: nlp, text-cleaning, nlp-cleaning, llm, utility, utilities, util, utils, functions, wrappers, data science, data analysis, data scientist, data analyst

<h1 align = "center">
  <img alt = "favicon" src = "https://cdn-icons-png.flaticon.com/512/10306/10306116.png" height = 125px><br>
  NLPurify
</h1>

<div align = "center">

[![Documentation Status](https://readthedocs.org/projects/nlpurify/badge/?version=latest&style=plastic)](https://nlpurify.readthedocs.io/en/latest/?badge=latest)
[![GitHub Issues](https://img.shields.io/github/issues/sharkutilities/NLPurify?style=plastic)](https://github.com/sharkutilities/NLPurify/issues)
[![GitHub Forks](https://img.shields.io/github/forks/sharkutilities/NLPurify?style=plastic)](https://github.com/sharkutilities/NLPurify/network)
[![GitHub Stars](https://img.shields.io/github/stars/sharkutilities/NLPurify?style=plastic)](https://github.com/sharkutilities/NLPurify/stargazers)
[![LICENSE File](https://img.shields.io/github/license/sharkutilities/NLPurify?style=plastic)](https://github.com/sharkutilities/NLPurify/blob/master/LICENSE)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/NLPurify?style=plastic)](https://pypistats.org/packages/pandas-wizard)
[![PyPI Latest Release](https://img.shields.io/pypi/v/NLPurify.svg?style=plastic)](https://pypi.org/project/NLPurify/)

[![GuardRails badge](https://api.guardrails.io/v2/badges/252951?token=2e1d82f6a737cdd3151ea0c869ee61c86196c3a05d17b0d91bf5a032e7766dc0)](https://dashboard.guardrails.io/gh/sharkutilities/repos/252951)

</div>

<div align = "justify">

A text cleaning and extraction engine was developed using a combination of traditional techniques like Unicode translations,
cleaning using regular expressions, and modern tools like "natural language processing" and "large language models" to
detect and clean long texts and create word vectors.

## Getting Started

The source code is hosted at GitHub: [**sharkutilities/NLPurify**](https://github.com/sharkutilities/NLPurify).
The binary installers for the latest release are available at the [Python Package Index (PyPI)](https://pypi.org/project/NLPurify/).

```bash
pip install -U NLPurify
```

The module is currently under development, and new ideas are welcomed. Raise a new PR/issue for the same.
The changes between each release are available [here](./CHANGELOG.md).

</div>

---

> [!CAUTION]
> **This code depreciates the existing GitHub Gist which was previously designed.**
> Check [`#1`](https://github.com/sharkutilities/NLPurify/issues/1) for more details.

> [!NOTE]
> **_Legacy_ codes are available as a submodule.**
> Check [`#5`](https://github.com/sharkutilities/NLPurify/issues/5) for more details.
nicegui-react 0.1.7
Integrate React components into NiceGUI applications
Requires Python: >=3.6

# NiceGUI React Integration

Integrate React components into your NiceGUI applications.

## Introduction

I created this package to seamlessly embed React components within NiceGUI projects. It handles bundling your React code using Vite, serves the compiled assets, and provides a way to pass props from Python to React and handle events from React in Python.

## Features

- **Easy Integration**: Embed React components directly into NiceGUI applications.
- **Props and Events**: Pass props and handle events between Python and React.
- **Automatic Bundling**: Automatically bundles your React code using Vite.
- **Caching**: Efficiently caches builds to improve performance during development.

## Installation

Install the package via pip:

```bash
pip install nicegui-react
```


## Requirements
- Python 3.6 or higher
- NiceGUI installed
- Node.js and npm installed (for building the React project)

## Usage
Here's how to use the React class in your NiceGUI application:

```python
from nicegui import ui
from nicegui_react import React

@ui.page("/")
async def index():
    with ui.card():
        ui.label('Here is the React component:')
        ui.button('Click me', on_click=lambda: react.props(title="Updated Title"))

        with ui.card_section():
            react = React(
                react_project_path="./path_to_your_react_project",
                main_component="App"  # Replace with your main component's name
            ).style('width: 100%; height: 100%;').props(
                title="Hello from Python!"
            ).on('onClick', lambda event: ui.notify(f'Clicked on React component: {event}'))
```



## Parameters
- *react_project_path* (str): Path to your React project directory.
- *main_component* (str): Name of the main React component to render.
- *component_id* (str, optional): Unique identifier for the component instance.
- *env* (dict, optional): Environment variables to pass to the React app.
- *use_legacy_peer_deps* (bool, optional): Whether to use legacy peer dependencies during npm install.
- *dev* (bool, optional): If set to True, enables development mode.

## Methods
- props(**kwargs): Update the props passed to the React component.
- on(event_name, handler): Register an event handler for events emitted from React.

## Setting Up Your React Project
- Place your React project in a directory relative to your Python script.
- Ensure your package.json includes the necessary dependencies and scripts. The React class will help set this up if it's missing.
- Your main component should be properly exported.

## License
This project is licensed under the MIT License. See the LICENSE file for details.

## Contributing
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are welcome.

## Contact
Feel free to reach out if you have any questions or suggestions.