semvec/pypi-packages huggingface dataset:
elpie 0.1.1
Emacs-like Python-infused editor
License: MIT
Requires Python: >=3.8
Keywords: cli, editor, emacs, curses, python

# elpie

elpie is a minimalist Emacs-style command-line text editor written in
Python, developed by AI (Microsoft Copilot) and product architect
Francis Peck. It leverages only the standard library (curses,
dataclasses) to deliver a familiar editing experience without external
dependencies.

## Features

- Emacs-style keybindings for navigation and editing  
- Kill-ring support with `Ctrl-k` (kill-line) and `Ctrl-y` (yank)  
- Auto-save via `Ctrl-s` and graceful exit with `Ctrl-x` `Ctrl-c`  
- Zero external dependencies; runs on Python 3.8+  
- Easy pip installation and console-script usage  

## Installation


    # From your project directory (with pyproject.toml present)
    pip install .

or ...

    pip install elpie

## Usage

    elpie [path/to/file.txt]

Providing a filename opens (or creates) that file. Omitting the argument opens an empty buffer.

| Key Combination    | Action                                      |  
| ------------------ | ------------------------------------------- |  
| Ctrl-f / →         | Move cursor forward one character           |  
| Ctrl-b / ←         | Move cursor backward one character          |  
| Ctrl-n / ↓         | Move cursor to next line                    |  
| Ctrl-p / ↑         | Move cursor to previous line                |  
| Enter              | Insert newline                              |  
| Backspace          | Delete character or join current with previous line |  
| Ctrl-k             | Kill from cursor to end of line             |  
| Ctrl-y             | Yank (paste) last killed text               |  
| Ctrl-s             | Save current buffer                         |  
| Ctrl-x, Ctrl-f     | Open file                                   |  
| Ctrl-x, b          | Switch buffer                               |  
| Ctrl-x, Ctrl-c     | Exit editor                                 |  

## Configuration

At present, elpie does not support a user configuration file or custom keybindings. Future releases may introduce:

- Custom keybinding profiles
- Plugin hooks for additional functionality
- Syntax highlighting via curses color pairs

## Development

To work on elpie locally:

    git clone https://github.com/frncspeck/elpie.git
    cd elpie
    pip install -e .

When tests are available, run them with:

    pytest

## Contributing

Contributions are welcome! Please open issues for bug reports or feature requests, and submit pull requests for enhancements.

## License

This project is licensed under the MIT License. See the LICENSE file for details.
datapatch 1.2.4
A library for defining rule-based overrides on messy data.
License: MIT
Requires Python: >=3.9

# datapatch

A Python library for defining rule-based overrides on messy data. Imagine, for example,
trying to import a dataset in each row is associated with a country - which have been 
entered by humans. You might find country names like `Northkorea`, or `Greet Britain`
that you want to normalise. `datapatch` creates a mechanism to build a flexible lookup
table (usually stored as a YAML file) to catch and repair these data issues.

## Installation

You can install `datapatch` from the Python package index:

```bash
pip install datapatch
```

## Example

Given a YAML file like this:

```yaml
countries:
  normalize: true
  lowercase: true
  asciify: true
  options:
    - match: Frankreich
      value: France
    - match:
        - Northkorea
        - Nordkorea
        - Northern Korea
        - NKorea
        - DPRK
      value: North Korea
    - contains: Britain
      value: Great Britain
```

The file can be used to apply the data patches against raw input:

```python
from datapatch import read_lookups, LookupException

lookups = read_lookups("countries.yml")
countries = lookups.get("countries")

# This will apply the patch or default to the original string if none exists:
for row in iter_data():
    raw = row.get("Country")
    row["Country"] = countries.get_value(raw, default=raw)
```

### Extended options

There's a host of options available to configure the application of the data
patches:

```yaml
countries:
  # If you mark a lookup as required, a value that matches no options will
  # throw a `datapatch.exc:LookupException`.
  required: true
  # Normalisation will remove many special characters, remove multiple spaces
  normalize: false
  # By default normalize perform transliteration across alphabets (Путин -> Putin)
  # set asciify to false if you want to keep non-ascii alphabets as is
  asciify: false
  options:
    - match: Francois
      value: France
  # This is a shorthand for defining options that have just one `match` and
  # one `value` defined:
  map:
    Luxemborg: Luxembourg
    Lux: Luxembourg
```

### Result objects

You can also have more details associated with a result and access them:

```yaml
countries:
  options:
    - match: Frankreich
      # These can be arbitrary attributes:
      label: France
      code: FR
```

This can be accessed as a result object with attributes:

```python
from datapatch import read_lookups, LookupException

lookups = read_lookups("countries.yml")
countries = lookups.get("countries")

result = countries.match("Frankreich")
print(result.label, result.code)
assert result.capital is None, result.capital
```

## License

`datapatch` is licensed under the terms of the MIT license, which is included as
`LICENSE`.