semvec/pypi-packages huggingface dataset:
deductable 2025.10.1
A Python library for defining and applying column functions to DuckDB tables
License: MIT
Requires Python: >=3.13

# Deductable

de-duck-table
A way to deduce new columns in your duckdb table 

## Description

For a client I was doing research on a collection of websites.  I wanted an easy way to add a column with findings based
on the previous information.  For instance, I started with a list of names, for which i didn't have the URL. 
An agent took in the name, and found the website url. 

## Installation

```bash
uv pip install deductable
```

## Requirements

- Python 3.13+
- DuckDB 1.4.1+
- Loguru 0.7.3+
- Pandas 2.3.3+

## Quick Start

```python
from typing import Optional
import duckdb
from deductable import Deductable
from my_agents import find_url

# Connect to a DuckDB database
with duckdb.connect('companies.duckdb') as con:
    # Create a Deductable instance for the table
    # Deductable expects at least an id column
    dt = Deductable(con, table_name="companies")

    @dt.column
    def company_url(company_name: str) -> Optional[float]:
        # company_name should be a column in the duckdb
        return find_url(company_name)

    # Apply the column function to populate the weight column
    dt.materialize()

    # View the result
    print(dt.df())
```

## Features

- **Type-safe column functions**: Define column functions with proper type annotations
- **Automatic column creation**: Columns are automatically created based on function names
- **Dependency handling**: Functions can depend on other columns
- **Optional values**: Support for nullable columns with Optional type annotations
- **Pandas integration**: Easy conversion to pandas DataFrames


## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the LICENSE file for details.
wordwrap 0.2.4
A simple library for wrapping text to a fixed column width.
License: MIT
Requires Python: >=3.8
Keywords: wordwrap, text, wrap, column, formatting, nlp, text-processing



# wordwrap

Wordwrap is a Python library for wrapping text to a fixed column width, designed for easy import and use in your own projects.

## Installation

Install from source (local):

```bash
pip install .
```

## Usage as a library

Import and use the main API:

```python
from wordwrap import WordWrap

result = WordWrap.wrap_text("This is a long line of text.", 10)
if result.is_success():
   print(result.value)  # Wrapped text with lines <= 10 chars
else:
   print(f"Error: {result.error}")
```

## API


# wordwrap

Wordwrap is a Python library for wrapping text to a fixed column width, designed for easy import and robust error handling.

## Installation

Install from PyPI:

```bash
pip install wordwrap
```

Or from source (local):

```bash
pip install .
```

## Usage

Import and use the main API:

```python
from wordwrap import WordWrap

result = WordWrap.wrap_text("This is a long line of text.", 10)
if result.is_success():
    print(result.value)  # Wrapped text with lines <= 10 chars
else:
    print(f"Error: {result.error}")
```

## API Reference

### WordWrap.wrap_text(text: str, column_width: int) -> Result

- Returns a `Result` object:
  - `.value`: Wrapped text (string)
  - `.error`: Error message (string)
- Input validation:
  - `text` must be a string
  - `column_width` must be a positive integer

## Features
- Wraps text to a specified column width, preserving words
- Handles long words and whitespace correctly
- Returns a Result object for error handling
- Python 3.8+

## Examples

```python
from wordwrap import WordWrap

# Example 1: Short text
result = WordWrap.wrap_text("word", 10)
print(result.value)  # "word"

# Example 2: Text exactly the column width
result = WordWrap.wrap_text("word123456", 10)
print(result.value)  # "word123456"

# Example 3: Text that requires splitting
result = WordWrap.wrap_text("a long line of text", 10)
print(result.value)  # "a long \nline of \ntext"

# Example 4: Long words
result = WordWrap.wrap_text("word superlongword text", 9)
print(result.value)  # "word \nsuperlong\nword text"

# Example 5: Multiple spaces
result = WordWrap.wrap_text("word    with   spaces", 10)
print(result.value)  # "word    \nwith   \nspaces"
```

## License
MIT

---

### Background

This library is inspired by the Word Wrap kata by Robert C. Martin (Uncle Bob).