Lighthearted conversation helpers (fun facts, etc.)
Project description
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
PyPi
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:
- Clone the repository:
git clone https://github.com/swe-students-fall2025/3-python-package-team_mistral.git
cd 3-python-package-team_mistral
- Install pipenv (if you don't have it):
pip install pipenv
- Install dependencies:
pipenv install --dev
- Activate the virtual environment:
pipenv shell
- 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:
- Install
pytestinto the virtual environment by runningpipenv install pytest - Run the tests from the main project directory:
pipenv run python -m pytest. So it works on any shell or if you are already inpipenv shellyou can runpytest -q - 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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chatterpy_mistral-0.0.3.tar.gz.
File metadata
- Download URL: chatterpy_mistral-0.0.3.tar.gz
- Upload date:
- Size: 50.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6dbcd940b4e39dc9c22329f95df5a1d86dc6b0f5b6a70d15189964df977a8f6
|
|
| MD5 |
bb6c314775290e660bda264c41169b00
|
|
| BLAKE2b-256 |
8012e8848af13a5c6e5dc78267324772956494134dcfd2d57398f123c4007279
|
File details
Details for the file chatterpy_mistral-0.0.3-py3-none-any.whl.
File metadata
- Download URL: chatterpy_mistral-0.0.3-py3-none-any.whl
- Upload date:
- Size: 35.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31363c38470af9061c70de0058a266982830b4c0e0a6d2aec134002ccca127d3
|
|
| MD5 |
1d2c7c3677254b89d9118a785eeb72db
|
|
| BLAKE2b-256 |
f748a10f633045a510cd98af147edfb6d7d6e43a798a751e1c2cbf39acf3e1f3
|