Skip to main content

Lighthearted conversation helpers (fun facts, etc.)

Project description

CI / CD

ChatterPy

ChatterPy is a lighthearted Python package that helps spark fun conversations by giving you a random fun fact, small talk question, compliment, or even a pickup line for when things get quiet.

Group Members

Mahabub Alif

Sydney Nadeau

Susan Wang

Aden Juda

Serena Wang

PyPi

View our package's page here.

Installation

For Users: Install via pip

pip install chatterpy_mistral

For Contributors: Set Up Development Environment

If you want to contribute to ChatterPy, follow these steps:

  1. Clone the repository:
   git clone https://github.com/swe-students-fall2025/3-python-package-team_mistral.git
   cd 3-python-package-team_mistral
  1. Install pipenv (if you don't have it):
   pip install pipenv
  1. Install dependencies:
   pipenv install --dev
  1. Activate the virtual environment:
   pipenv shell
  1. Build the package:
   pipenv run python -m build

How to run tests

Unit tests are included within the tests directory. Inorder to run these tests:

  1. Install pytest into the virtual environment by running pipenv install pytest
  2. Run the tests from the main project directory: pipenv run python -m pytest. So it works on any shell or if you are already in pipenv shell you can run pytest -q
  3. If no changes were made and the system works as intended 34 tests should pass.

Usage

Importing ChatterPy in Your Code

After installing with pip install chatterpy_mistral, you can import and use any function:

from chatterpy_mistral import fun_fact, smallTalk, pickUpLine, compliment, banter

# Get a random fun fact
print(fun_fact())

# Get a fun fact from a specific category
print(fun_fact(category="science", rarity="rare"))

# Get small talk - question
print(smallTalk(question=True))

# Get small talk - comment
print(smallTalk(question=False))

# Get a pickup line
print(pickUpLine(kind="poetic", name="Alex"))

# Get a compliment
print(compliment(name="Jordan", intensity=2, style="classic", category="personality"))

# Get playful banter
print(banter(intensity="mild", name="Sam"))

See example.py for a complete interactive demonstration.

To run the example program:

python src/example.py

Command-Line Interface

Using the CLI After Installation

Once installed via pip, you can use ChatterPy from the command line, for example:

chatterpy_mistral --smalltalk --comment

Example Output

When you run these commands, you'll get different outputs:

Small Talk (Comment)

python -m chatterpy_mistral --smalltalk --comment

You might see something like this:


Avocado toast is overrated, but I’d still eat it.

Small Talk (Question)

python -m chatterpy_mistral --smalltalk --question

You might get:


I’ve been meaning to start reading/watching something new — any recommendations?

Pickup Line (No Name)

python -m chatterpy_mistral --pickup --kind poetic

You could see:


your presence feels like morning sunshine.

Pickup Line (With Name)

python -m chatterpy_mistral --pickup --kind nerdy --name Susan

The output might be:


Susan, you’re a clean solution in a messy codebase.

Compliment (With Name)

python -m chatterpy_mistral --compliment --name Sydney --intensity medium

This might return:


Sydney, You always add something unique to your look.

Fun Facts (No parameters)

python -m chatterpy_mistral --fact

Could get you:


Bananas are berries, but strawberries aren’t.

Fun Facts (With parameters)

python -m chatterpy_mistral --fact --category history --rarity rare

Might spit out:


Ancient Roman concrete can 'self-heal'.


Banter (No name)

python -m chatterpy_mistral --banter --intensity medium

Will say:


you look like something I drew with my left hand.

Banter (With name)

python -m chatterpy_mistral --banter --intensity mild --name Aden

Will return:

Aden, you're like a software update: nobody asked for you.



Features

Function Description
fun_fact(category: str = "general", rarity: str = "common") Returns a random fun fact from one of four categories: general, science, history, or animals, with varying rarity
smallTalk(question: bool) Returns either a fun question (True) or a random comment (False).
pickUpLine(kind: str, name: str = "") Returns a pickup line of a certain type (classic, poetic, funny, nerdy). Optionally includes a name at the start.
compliment(name: str, intensity: str) Returns a compliment of a specific intesity(mild, medium, intense). Includes a name at the start.
banter(intensity: str, name: str = "") Returns a playful roast or joke depending on the chosen intensity (mild, medium, intense). Optionally includes a name to personalize it.

Project Structure

3-python-package-team_mistral/
├──src/
│   ├───chatterpy_mistral/
│       ├── __init__.py
│       ├── __main__.py
│       ├── funfacts.py
│       ├── smalltalk.py
│       ├── pickuplines.py
│       └── banter.py
│       └── compliments.py
│   ├─── example.py
├──tests/
│   ├── test_funfacts.py
│   ├── test_smalltalk.py
│   ├── test_pickuplines.py
│   └── test_compliments.py
│   └── test_banter.py
├── Pipfile
├── pyproject.toml
└── README.md

example.py

Link to example.py

example.py is a standalone Python script that demonstrates the functionality of the chatterpy_mistral package. It calls each of the package’s functions: fun facts, small talk, banter, pickup lines, and compliments.

This script is separate from the CLI interface in that it can be run directly with Python, and is intended for demonstration or testing purposes, rather than as a command-line tool for user input.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chatterpy_mistral-0.0.8.tar.gz (50.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chatterpy_mistral-0.0.8-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

File details

Details for the file chatterpy_mistral-0.0.8.tar.gz.

File metadata

  • Download URL: chatterpy_mistral-0.0.8.tar.gz
  • Upload date:
  • Size: 50.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for chatterpy_mistral-0.0.8.tar.gz
Algorithm Hash digest
SHA256 90cd801ba7eb35a520a9a9353f724d679b4358d549ad72b05a5a39e9efaaaf1e
MD5 709059978d16a6cca598899e3c0e1022
BLAKE2b-256 0c7c705199b7136d32601b9c826a8cae6b89b8c73d4f021c25bc7eea03bf0820

See more details on using hashes here.

File details

Details for the file chatterpy_mistral-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for chatterpy_mistral-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4e397888ba12c9b8a6f10bc2ae523897950271654de9110397e4404e595a09eb
MD5 09baf860f61238ade8c621cb23a728b3
BLAKE2b-256 50d02945490a37e34bd68b0382ac88b026b3bf3419100b99ac9aff80b7f3845b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page