Skip to main content

A lighthearted Python package for developer-themed pickup lines.

Project description

pyflirt

CI

A small Python package with developer‑themed pickup lines and compliments. Nothing serious—just something light to play with while practicing packaging, testing, and CI.

What is this?

This package has a collection of cheesy (but configurable) pickup lines and compliments for developers, designers, managers, and data scientists. You can get random lines, filter by category, adjust the cheesiness level, and customize compliments.

Installation

pip install pyflirt

Quick Start

from pyflirt import line, lines, compliment, categories

# Get one random pickup line
print(line())

# Get a line in a specific category
print(line(category="nerdy"))

# Get multiple lines
print(lines(n=5, category="cs"))

# Get a compliment
print(compliment(role="developer", mood="sweet"))

Demo program

Run the example that showcases all functions (categories, line, lines, compliment, search, stats, stylize, say, rate_line):

# from the repo root
PYTHONPATH=src python examples/demo.py

# or with pipenv
pipenv run python -c "import sys; sys.path.insert(0, 'src'); import examples.demo as d; d.main()"

Functions

line(category="nerdy", name=None, cheese=2, seed=None)

Returns one random pickup line.

  • category: Pick a category like "nerdy", "cs", "math", "poetic", or "classic". Default is "nerdy".
  • name: If the line supports it, this name will be inserted.
  • cheese: How cheesy should it be? 1 (least cheesy) to 5 (very cheesy). Default is 2.
  • seed: Optional number for reproducible results.

Example:

line(category="cs", name="Alex", cheese=2)

lines(n=5, category=None, name=None, cheese=2, seed=None)

Returns a list of pickup lines.

  • n: How many lines you want.
  • Other parameters work the same as line().

Example:

lines(n=3, category="math", cheese=3)

compliment(role="developer", mood="sweet", name=None, emojis=0, seed=None)

Returns a compliment for a specific role.

  • role: Choose from "developer", "designer", "manager", or "data".
  • mood: "sweet", "cheeky", or "nerdy".
  • name: Optional name to include in the compliment.
  • emojis: Number of heart emojis to add (0-5).
  • seed: Optional number for reproducible results.

Example:

compliment(role="designer", mood="cheeky", name="Sam", emojis=2)

categories()

Returns a list of all available pickup line categories.

Example:

print(categories())
# ['classic', 'cs', 'math', 'nerdy', 'poetic']

search(query, category=None, name=None, cheese=5, limit=10, seed=None)

Find up to limit lines containing query (case-insensitive), optionally filtered.

  • query: substring to match (required)
  • category: filter by category or search all
  • name: optional replacement for {name} placeholders
  • cheese: 1–5 max cheese allowed in results
  • limit: max results to return
  • seed: for deterministic ordering

Example:

search("code", category="cs", limit=3, seed=7)

stats()

Return counts for available lines.

Returns a dict with keys: total, by_category, and cheese_hist.

Example:

s = stats()
print(s["total"], s["by_category"], s["cheese_hist"])

stylize(text, width=None, uppercase=False, color="auto")

Format a string with optional wrapping, uppercasing, and ANSI color.

  • width: wrap to this many columns (None = no wrap)
  • uppercase: True to uppercase the text
  • color: one of "auto", "none", "magenta", "cyan", "green"

Example:

stylize("hello world", width=8, uppercase=True, color="none")

say(category="nerdy", name=None, cheese=2, seed=None, width=None, uppercase=False, color="auto", emojis=0)

Generate a line, decorate it (wrap/case/color/emojis), print it, and return it.

Example:

say(category="nerdy", seed=1, width=16, color="none", emojis=2)

rate_line(text, metric="length"|"cheese_level"|"random", seed=None)

Score a line by the chosen metric.

  • length: higher for shorter lines (simple heuristic)
  • cheese_level: counts cheesy keywords
  • random: seeded 0–10 score

Example:

rate_line("You are so sweet", metric="cheese_level")

Development Setup

If you want to work on this package:

  1. Clone the repo:
git clone https://github.com/swe-students-fall2025/3-python-package-team_quartz.git
cd 3-python-package-team_quartz
  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. Run tests:
pytest
  1. Build the package:
python -m build

Links

Contributors

Team

More links

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

pyflirt-0.1.0.tar.gz (48.2 kB view details)

Uploaded Source

Built Distribution

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

pyflirt-0.1.0-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file pyflirt-0.1.0.tar.gz.

File metadata

  • Download URL: pyflirt-0.1.0.tar.gz
  • Upload date:
  • Size: 48.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.18

File hashes

Hashes for pyflirt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d036ee78157b90188c35181cb2c3b727805c101ee69471a40e1ea868838c46d3
MD5 197207cff20adea903862451eb3f1c1f
BLAKE2b-256 1202a8124476c52c0fdebd468b8f4f835e109ceed490c1d0d6a805e5beb04e75

See more details on using hashes here.

File details

Details for the file pyflirt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyflirt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.18

File hashes

Hashes for pyflirt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b205da344f0af3171315c90b82ba945338a297e4b9fc07636813e2aa8c446e89
MD5 baeed8103f87b6370486513d04412a6c
BLAKE2b-256 5acc5fb79615d28107b5c4b04a1dbce36f22bf77b62d03538a2727d5fa4b18f6

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