semvec/pypi-packages huggingface dataset:
bespoken 0.2.2
A toolbox to build your own assistant for in the terminal.
License: MIT
Requires Python: >=3.8
Keywords: ai, assistant, llm, code-editor, marimo

# bespoken

```

██████╗ ███████╗███████╗██████╗  ██████╗ ██╗  ██╗███████╗███╗   ██╗
██╔══██╗██╔════╝██╔════╝██╔══██╗██╔═══██╗██║ ██╔╝██╔════╝████╗  ██║
██████╔╝█████╗  ███████╗██████╔╝██║   ██║█████╔╝ █████╗  ██╔██╗ ██║
██╔══██╗██╔══╝  ╚════██║██╔═══╝ ██║   ██║██╔═██╗ ██╔══╝  ██║╚██╗██║
██████╔╝███████╗███████║██║     ╚██████╔╝██║  ██╗███████╗██║ ╚████║
╚═════╝ ╚══════╝╚══════╝╚═╝      ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝


A terminal chat experience that you can configure yourself.
```

## Installation

Basic installation:

```bash
uv pip install bespoken
```

## Usage

This library uses [llm](https://llm.datasette.io/en/stable/) under the hood to provide you with building blocks to make LLM chat interfaces from the commandline. Here's an example:

![demo](https://github.com/user-attachments/assets/fd358f95-26dc-4f2d-adbd-2eb4ab1804af)

This interface was defined via below:

```python
from bespoken import chat
from bespoken.tools import FileTool, TodoTools, PlaywrightTool

chat(
    model_name="anthropic/claude-3-5-sonnet-20240620",
    tools=[FileTool("edit.py")],
    system_prompt="You are a coding assistant that can make edits to a single file.",
    debug=True,
)
```

## Features 

### Autocomplete 

Tab completion for commands and file paths. Use `@file.py` to get file path suggestions, "/" + <kbd>TAB></kbd> to autocomplete commands or use arrow keys for command history.

![parrot](https://github.com/user-attachments/assets/284ce287-ecc6-4beb-8fb5-6df77d3704f7)

### Custom slash commands

Define your own `/commands` that either send text to the LLM or trigger interactive functions:

```python
def save_conversation():
    """Save conversation to file"""
    filename = ui.input("Filename: ")
    return f"Saved to {filename}"

chat(
    ...,
    slash_commands={
        "/save": save_conversation,
        "/formal": "Please respond in a formal manner.",
    }
)
```

## Why? 

The goal is to host a bunch of tools that you can pass to the LLM, but the main idea here is that you can also make it easy to constrain the chat. The `FileTool`, for example, only allows the LLM to make edits to a single file declared upfront. This significantly reduces any injection risks and still covers a lot of use-cases. It is also a nice exercise to make tools like claude code feel less magical, and you can also swap out the LLM with any other one as you see fit. 

This project is in early days at the moment, but it feels exciting to work on!
amazon-scrape 1.0.9
Scrape Amazon product data such as Product Name, Product Images, Number of Reviews, Price, Product URL, and ASIN.
License: MIT
Requires Python: !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7
Keywords: amazon, products, ecommerce, price, reviews, ratings

Amazon Products Scraper
=======================

.. image:: https://badge.fury.io/py/amazon-scrape.svg
    :target: https://badge.fury.io/py/amazon-scrape
    :alt: amazon-scrape Python Package Version

Scrape Amazon product data such as Product Name, Product Images, Number of Reviews, Price, Product URL, and ASIN.

Requirements
------------

Python 2.7 and later.


Setup
-----

You can install this package by using the pip tool and installing:

.. code-block:: bash

	$ pip install amazon-scrape

Or:

.. code-block:: bash

	$ easy_install amazon-scrape


Scraper Help
------------

Execute this command `amazon_scraper --help` in the terminal.

.. code-block:: text

    usage: amazon_scraper [-h] [--locale LOCALE] [--keywords KEYWORDS] [--url URL] [--api-key PROXY_API_KEY] [--pages PAGES] [-r]

    optional arguments:
    -h, --help            show this help message and exit
    --locale LOCALE       Amazon locale (e.g., "com", "co.uk", "de", etc.)
    --keywords KEYWORDS   Search keywords
    --url URL             Amazon URL
    --api-key       Scraper API Key
    --pages PAGES         Number of pages to scrape
    -r, --review          Scrape reviews


Usage Example
-------------

.. code-block:: python

    # Specify locale, keywords, API key, and number of pages to scrape:
    amazon_scraper --locale com --keywords "laptop" --api-key "your_api_key" --pages 10

    ## Specify only keywords and API key (will default to "co.uk" locale and 20 pages):
    amazon_scraper --keywords "iphone" --api-key "your_api_key"

    ## Specify a direct Amazon URL and API key (will default to "co.uk" locale and 20 pages):
    amazon_scraper --url "https://www.amazon.de/s?k=iphone&crid=1OHYY6U6OGCK5&sprefix=ipho%2Caps%2C335&ref=nb_sb_noss_2" --api-key "your_api_key"

    ## Specify locale and Amazon URL (will default to 20 pages):
    amazon_scraper --locale de --url "https://www.amazon.de/s?k=iphone&crid=1OHYY6U6OGCK5&sprefix=ipho%2Caps%2C335&ref=nb_sb_noss_2" --api-key "your_api_key"

    ## Specify review to scrape product(s) reviews:
    amazon_scraper --keywords "watches" --api-key "your_api_key" --review


Create Scraper API Account
--------------------------

Sign up for a Scraper API `user account`_.

.. _user account: https://www.scraperapi.com/?fp_ref=finbarrs11


License
-------

This project is licensed under the `MIT License`_.  

.. _MIT License: https://github.com/0xnu/amazonproducts/blob/main/LICENSE


Copyright
---------

Copyright |copy| 2023 - 2025 `Finbarrs Oketunji`_. All Rights Reserved.

.. |copy| unicode:: 0xA9 .. copyright sign
.. _Finbarrs Oketunji: https://finbarrs.eu
python-pact 0.1.1
A lightweight Python metaclass for enforcing required attributes and types in class hierarchies
License: MIT
Requires Python: >=3.7
Keywords: python-pact, pact

## <ins> Pact: Attribute Enforcement Metaclass for Python </ins>

Pact is a lightweight Python metaclass designed to enforce the presence and types of class attributes in subclasses <br>
It helps you ensure that all subclasses implement the required attributes declared in the base class, <br>
catching missing or mistyped attributes early with warnings and exceptions <br>

### <ins> Features </ins>

- Enforce presence of specific class or instance attributes in subclasses
- Type validation of annotated attributes
- Raises PactException exception and emits warnings for missing or mismatched attributes

### <ins> Installation </ins>

You can install this package via PIP: pip install python-pact

### <ins> Usage </ins>

```python
from pact import Pact


class Person(Pact):
    name: str
    age: int


class JohnDoe(Person):
    name = 'John Doe'
    age = 25


# This will raise PactException due to missing 'age':
class JaneDoe(Person):
    name = 'Jane Doe'
```