pop-wrapper


Namepop-wrapper JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/LandWarderer2772/pop-wrapper
SummaryA comprehensive Python wrapper for the Popcat API
upload_time2025-11-01 14:13:47
maintainerNone
docs_urlNone
authorland_lmao
requires_python>=3.7
licenseMIT
keywords popcat api wrapper meme image manipulation discord bot random joke weather github text utilities entertainment social
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pop-wrapper

[![PyPI version](https://badge.fury.io/py/pop-wrapper.svg)](https://badge.fury.io/py/pop-wrapper)
[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A comprehensive Python wrapper for the [Popcat API](https://popcat.xyz/api) providing access to over 60 endpoints including image manipulation, meme generation, data retrieval, text utilities, and more.

## Quick Start

### Installation

```bash
pip install pop-wrapper
```

## Installation from Source

```bash
git clone https://github.com/LandWarderer2772/pop-wrapper.git
cd pop-wrapper

### Basic Usage

```python
import popcat

# Generate a meme
drake_meme = popcat.drake("Using other APIs", "Using Popcat API")

## Features

- **Image Manipulation**: Apply filters and effects (jail, blur, colorify, etc.)
- **Meme Generation**: Create popular meme formats (Drake, Pooh, Supreme, etc.)
- **Data APIs**: Access real-world data (weather, GitHub, Steam, etc.)
- **Text Utilities**: Transform text (translate, morse code, reverse, etc.)
- **Random Content**: Get jokes, facts, shower thoughts, and more
- **Utilities**: Screenshots, lyrics, chatbot, welcome cards
- **Specialized Classes**: Code paste creation and URL shortening

## Complete Endpoint Reference

### Image Manipulation (14 functions)

Transform and apply effects to images. All functions return image URLs.

```python
# Basic filters
jail_img = popcat.jail("https://example.com/image.png")
blurred = popcat.blur("https://example.com/photo.jpg")
inverted = popcat.invert("https://example.com/image.png")
grey = popcat.greyscale("https://example.com/colorful.jpg")

# Effects
drip_effect = popcat.drip("https://example.com/image.png")
clown_filter = popcat.clown("https://example.com/face.jpg")
communist = popcat.communism("https://example.com/image.png")

# Color manipulation
red_tinted = popcat.colorify("https://example.com/image.png", "#FF0000")
blue_tinted = popcat.colorify("https://example.com/image.png", "blue")

# Meme-style effects
wanted_poster = popcat.wanted("https://example.com/criminal.jpg")
gun_meme = popcat.gun("https://example.com/person.jpg", "Always has been")
ad_style = popcat.ad("https://example.com/product.jpg")
uncover_effect = popcat.uncover("https://example.com/hidden.jpg")
overhead_joke = popcat.jokeoverhead("https://example.com/confused.jpg")
mnm_style = popcat.mnm("https://example.com/face.jpg")
```

**Available Functions:**
- `jail(image_url)` - Apply jail overlay
- `blur(image)` - Blur effect
- `invert(image)` - Invert colors
- `greyscale(image)` - Convert to greyscale
- `drip(image)` - Drip effect
- `clown(image)` - Clown makeup filter
- `colorify(image, color)` - Apply color tint
- `wanted(image)` - Generate wanted poster
- `gun(image, text=None)` - Gun meme format
- `ad(image)` - Advertisement style
- `uncover(image)` - Uncover effect
- `communism(image_url)` - Communist filter
- `jokeoverhead(image)` - Joke over head meme
- `mnm(image)` - M&M style meme

### Meme Generation (18 functions)

Create popular meme formats with custom text and images.

```python
# Comparison memes
drake_meme = popcat.drake("Regular APIs", "Popcat API")
pooh_meme = popcat.pooh("Eating honey", "Consuming apiary nectar")
happy_sad = popcat.happysad("Friday", "Monday")

# Text-based memes
supreme_logo = popcat.supreme("POPCAT")
wisdom = popcat.oogway("There are no accidents")
biden_tweet = popcat.biden("Listen, Jack...")
pikachu_meme = popcat.pikachu("When you realize it's Monday")
sad_cat = popcat.sadcat("No more treats")

# Interactive memes
ship_meme = popcat.ship("https://example.com/person1.jpg", "https://example.com/person2.jpg")
opinion_meme = popcat.opinion("https://example.com/person.jpg", "Pineapple belongs on pizza")

# Quote and message formats
quote_img = popcat.quote("https://example.com/einstein.jpg", 
                        "Imagination is more important than knowledge", 
                        "Albert Einstein")

discord_msg = popcat.discord_message("CoolUser", "Hello everyone!",
                                    avatar="https://example.com/avatar.png",
                                    color="#FF5733")

# Reaction memes
unforgivable_meme = popcat.unforgivable("Using Internet Explorer")
read_meme = popcat.couldread("the documentation")
lulcat_data = popcat.lulcat("I can haz cheezburger?")
facts_meme = popcat.facts("Python is awesome")

# Warning signs
alert_sign = popcat.alert("DANGER: High Voltage")
caution_sign = popcat.caution("Wet Floor")
```

**Available Functions:**
- `drake(text1, text2)` - Drake pointing meme
- `pooh(text1, text2)` - Winnie the Pooh meme
- `ship(image1, image2)` - Ship compatibility
- `supreme(text)` - Supreme logo style
- `oogway(text)` - Master Oogway wisdom
- `biden(text)` - Biden tweet style
- `pikachu(text)` - Surprised Pikachu
- `sadcat(text)` - Sad cat meme
- `opinion(image, text)` - Opinion meme format
- `discord_message(username, content, ...)` - Discord message
- `quote(image, text, name)` - Inspirational quote
- `happysad(text1, text2)` - Happy vs sad
- `unforgivable(text)` - Unforgivable curse
- `couldread(text)` - Could you please read
- `lulcat(text)` - Lulcat/lolcat meme
- `facts(text)` - Facts meme
- `alert(text)` - Warning alert sign
- `caution(text)` - Caution sign

### Data & Information APIs (11 functions)

Access real-world data and information. All functions return dictionaries.

```python
# Weather and location
weather_data = popcat.weather("London")
country_info = popcat.country("Japan")

# Social platforms
github_user = popcat.github("octocat")
subreddit_info = popcat.subreddit("python")

# Development and packages
npm_package = popcat.npm("express")
steam_game = popcat.steam("Portal 2")

# Entertainment
movie_data = popcat.imdb("The Matrix")
song_info = popcat.itunes("Bohemian Rhapsody")

# Science and colors
element_data = popcat.periodic_table("Carbon")
color_info = popcat.colorinfo("#FF0000")
random_color = popcat.randomcolor()
```

**Available Functions:**
- `weather(place)` - Weather information
- `github(username)` - GitHub user data
- `npm(package)` - NPM package details
- `steam(name)` - Steam game search
- `imdb(name)` - Movie/TV show data
- `country(name)` - Country information
- `periodic_table(element)` - Element data
- `colorinfo(color)` - Color information
- `randomcolor()` - Random color generator
- `subreddit(subreddit_name)` - Reddit subreddit data
- `itunes(song)` - iTunes song search

### Text Utilities (7 functions)

Transform and manipulate text in various ways.

```python
# Language and encoding
translated = popcat.translate("Hello world", "es")  # "Hola mundo"
morse_code = popcat.texttomorse("SOS")  # "... --- ..."
binary = popcat.encode("Hi")  # "01001000 01101001"
decoded = popcat.decode("01001000 01101001")  # "Hi"

# Text formatting
reversed_text = popcat.reverse("Hello World")  # "dlroW olleH"
mocked = popcat.mock("This is a test")  # "tHiS iS a TeSt"
double_struck = popcat.doublestruck("Hello")  # "ℍ𝕖𝕝𝕝𝕠"
```

**Available Functions:**
- `translate(text, to)` - Translate to another language
- `reverse(text)` - Reverse character order
- `mock(text)` - Mocking SpongeBob format
- `doublestruck(text)` - Mathematical double-struck
- `texttomorse(text)` - Convert to Morse code
- `encode(text)` - Encode to binary
- `decode(binary)` - Decode from binary

### Random Content (7 functions)

Get random entertainment content for fun and engagement.

```python
# Simple random content
random_joke = popcat.joke()
interesting_fact = popcat.fact()
magic_answer = popcat.eightball()  # or popcat._8ball()

# Complex random data
meme_data = popcat.randommeme()
car_info = popcat.car()
shower_thought = popcat.showerthought()
wyr_question = popcat.wouldyourather()

print(f"Joke: {random_joke}")
print(f"Fact: {interesting_fact}")
print(f"8-Ball says: {magic_answer}")
print(f"Random meme: {meme_data['title']}")
```

**Available Functions:**
- `joke()` - Random joke
- `fact()` - Random fact
- `randommeme()` - Random meme data
- `car()` - Random car information
- `showerthought()` - Random shower thought
- `wouldyourather()` - Would you rather question
- `eightball()` / `_8ball()` - Magic 8-ball response

### Utilities (4 functions)

General-purpose utility functions for various needs.

```python
# Music and lyrics
song_lyrics = popcat.lyrics("Bohemian Rhapsody Queen")
song_lyrics2 = popcat.lyrics("Taylor Swift - Shake It Off")

# Web screenshots
screenshot_url = popcat.screenshot("https://github.com")

# AI chatbot
bot_response = popcat.chatbot("Hello there!", "John", "MyBot")

# Welcome cards for Discord/servers
welcome_img = popcat.welcomecard(
    background="https://example.com/bg.png",
    avatar="https://example.com/avatar.jpg",
    text_1="Welcome",
    text_2="John Doe", 
    text_3="to our awesome server!"
)
```

**Available Functions:**
- `lyrics(song)` - Get song lyrics
- `screenshot(url)` - Website screenshot
- `chatbot(message, ownername, botname)` - AI chatbot
- `welcomecard(background, avatar, text_1, text_2, text_3)` - Welcome card

### Specialized Classes (2 classes)

Advanced services with full-featured class interfaces.

#### CodeClient - Code Paste Creation

```python
# Initialize with API key
client = popcat.CodeClient("your-api-key")

# Create a code paste
paste = client.create_bin(
    title="Hello World",
    description="A simple Python example", 
    code="print('Hello, World!')",
    theme="Monokai",
    language="Python"
)

print(f"Paste URL: {paste['url']}")

# Get available themes and languages
themes = popcat.CodeClient.get_available_themes()
languages = popcat.CodeClient.get_available_languages()

print(f"Available themes: {len(themes)}")
print(f"Supported languages: {len(languages)}")
```

**Available Themes:** GitHub Dark, Monokai, Dracula, VS Code Dark, and 40+ more
**Supported Languages:** Python, JavaScript, Java, C++, TypeScript, and 50+ more

#### Shortener - URL Shortening

```python
# Create shortened URL
short_data = popcat.Shortener.shorten("https://github.com", "gh")
print(f"Short URL: {short_data['short_url']}")  # https://popcat.xyz/gh

# Get URL information
info = popcat.Shortener.get_info("gh")
print(f"Original: {info['original_url']}")
print(f"Clicks: {info['clicks']}")
```

## Installation & Requirements

### Requirements
- Python 3.7+
- requests library

### Installation

```bash
# Install from PyPI
pip install pop-wrapper

# Install from source
git clone https://github.com/LandWarderer2772/pop-wrapper.git
cd pop-wrapper
pip install -e .
```

### Optional Dependencies

```bash
# For development
pip install pop-wrapper[dev]

# For testing
pip install pop-wrapper[test]
```

## Usage Examples

### Discord Bot Integration

```python
import discord
import popcat

```python
import discord
import popcat

@client.command()
async def meme(ctx, *, text):
    """Generate a random meme with user text"""
    if ' | ' in text:
        text1, text2 = text.split(' | ', 1)
        meme_url = popcat.drake(text1, text2)
    else:
        meme_url = popcat.oogway(text)
    
    embed = discord.Embed()
    embed.set_image(url=meme_url)
    await ctx.send(embed=embed)

@client.command()
async def weather(ctx, *, location):
    """Get weather for a location"""
    weather_data = popcat.weather(location)
    embed = discord.Embed(title=f"Weather in {weather_data['location']}")
    embed.add_field(name="Temperature", value=weather_data['temperature'])
    embed.add_field(name="Condition", value=weather_data['condition'])
    await ctx.send(embed=embed)
```

### Web Application

```python
from flask import Flask, render_template, request
import popcat

app = Flask(__name__)

@app.route('/meme-generator', methods=['GET', 'POST'])
def meme_generator():
    if request.method == 'POST':
        meme_type = request.form['type']
        text1 = request.form['text1']
        text2 = request.form.get('text2', '')
        
        if meme_type == 'drake':
            meme_url = popcat.drake(text1, text2)
        elif meme_type == 'supreme':
            meme_url = popcat.supreme(text1)
        
        return render_template('meme_result.html', meme_url=meme_url)
    
    return render_template('meme_form.html')

@app.route('/random-content')
def random_content():
    content = {
        'joke': popcat.joke(),
        'fact': popcat.fact(),
        'color': popcat.randomcolor(),
        'meme': popcat.randommeme()
    }
    return render_template('random.html', content=content)
```

### Data Analysis

```python
import popcat
import pandas as pd

# Analyze GitHub users
users = ['octocat', 'torvalds', 'gaearon', 'sindresorhus']
github_data = []

for user in users:
    try:
        data = popcat.github(user)
        github_data.append({
            'username': data['username'],
            'followers': data['followers'],
            'repos': data['public_repos'],
            'language': data.get('most_used_language', 'Unknown')
        })
    except Exception as e:
        print(f"Error fetching {user}: {e}")

df = pd.DataFrame(github_data)
print(df)

# Get weather for multiple cities
cities = ['London', 'New York', 'Tokyo', 'Sydney']
weather_data = []

for city in cities:
    try:
        weather = popcat.weather(city)
        weather_data.append({
            'city': city,
            'temperature': weather['temperature'],
            'condition': weather['condition']
        })
    except Exception as e:
        print(f"Error fetching weather for {city}: {e}")

weather_df = pd.DataFrame(weather_data)
print(weather_df)
```

## Authentication & Rate Limits

### API Keys
- **CodeClient**: Requires an API key for code paste creation
- **Most endpoints**: No authentication required
- **Shortener**: May require authentication for some operations

### Rate Limiting
The Popcat API may have rate limits. For production applications:

```python
import time
import popcat

def rate_limited_request(func, *args, delay=1, **kwargs):
    """Make rate-limited API requests"""
    try:
        result = func(*args, **kwargs)
        time.sleep(delay)  # Add delay between requests
        return result
    except Exception as e:
        if "rate limit" in str(e).lower():
            time.sleep(5)  # Wait longer on rate limit
            return func(*args, **kwargs)
        raise e

# Example usage
meme = rate_limited_request(popcat.drake, "Fast requests", "Rate limited requests")
```

## Error Handling

The package includes comprehensive error handling:

```python
import popcat

try:
    # Invalid image URL
    result = popcat.jail("not-a-url")
except ValueError as e:
    print(f"Validation error: {e}")

try:
    # API request failure
    result = popcat.weather("NonexistentCity123")
except Exception as e:
    print(f"API error: {e}")

# Graceful error handling
def safe_meme_generation(text1, text2):
    try:
        return popcat.drake(text1, text2)
    except ValueError:
        return None  # Invalid input
    except Exception:
        return popcat.supreme(text1)  # Fallback to different meme
```

## Contributing

We welcome contributions. Please follow these guidelines:

### Development Setup

```bash
# Clone the repository
git clone https://github.com/LandWarderer2772/pop-wrapper.git
cd pop-wrapper

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e .[dev]

# Run tests
python -m pytest tests/
```

### Adding New Endpoints

1. **Identify the endpoint** on [Popcat API](https://popcat.xyz/api)
2. **Choose the appropriate module** (image, meme, data, text, random, utilities)
3. **Implement the function** with proper validation and documentation
4. **Add tests** for the new function
5. **Update the README** with examples

Example:

```python
def new_endpoint(parameter: str) -> str:
    """
    Description of what this endpoint does.
    
    Args:
        parameter (str): Description of parameter
        
    Returns:
        str: Description of return value
        
    Raises:
        ValueError: If parameter is invalid
        Exception: If API request fails
        
    Example:
        >>> result = new_endpoint("example")
        >>> print(result)
        Expected output
    """
    _validate_text(parameter)
    return _make_request("/new-endpoint", {"param": parameter})
```

### Testing

```bash
# Run all tests
python -m pytest

# Run specific test file
python -m pytest tests/test_image.py

# Run with coverage
python -m pytest --cov=popcat

# Run integration tests (requires internet)
python -m pytest tests/integration/
```

### Code Style

We use Black for code formatting and flake8 for linting:

```bash
# Format code
black popcat/

# Check linting
flake8 popcat/

# Type checking
mypy popcat/
```

## Changelog

### v1.0.0 (2023-01-15)
- Initial release
- All 63 Popcat API endpoints implemented
- Comprehensive documentation and examples
- Full test coverage
- CodeClient and Shortener classes

### v0.9.0 (2023-01-10)
- Beta release
- Core functionality implemented
- Basic documentation

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Links

- **PyPI**: https://pypi.org/project/pop-wrapper/
- **GitHub**: https://github.com/LandWarderer2772/pop-wrapper
- **Documentation**: https://pop-wrapper.readthedocs.io/
- **Popcat API**: https://popcat.xyz/api
- **Issues**: https://github.com/LandWarderer2772/pop-wrapper/issues

## Support

If you find this package helpful, consider:
- Starring the repository
- Reporting bugs
- Suggesting new features
- Contributing code
- Sharing with others

## Contact

- **Email**: mh3as81gb@mozmail.com
- **Discord**: land_lmao
- **GitHub**: @LandWarderer2772

---

Developed for the Python community. Professional API wrapper solution.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/LandWarderer2772/pop-wrapper",
    "name": "pop-wrapper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "land_lmao <mh3as81gb@mozmail.com>",
    "keywords": "popcat, api, wrapper, meme, image, manipulation, discord, bot, random, joke, weather, github, text, utilities, entertainment, social",
    "author": "land_lmao",
    "author_email": "land_lmao <mh3as81gb@mozmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/45/88/278c9c04fe1537017414bad8efdef9ba6d2d25dca7d4f9f4faaf52a1df89/pop_wrapper-1.0.0.tar.gz",
    "platform": null,
    "description": "# pop-wrapper\n\n[![PyPI version](https://badge.fury.io/py/pop-wrapper.svg)](https://badge.fury.io/py/pop-wrapper)\n[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA comprehensive Python wrapper for the [Popcat API](https://popcat.xyz/api) providing access to over 60 endpoints including image manipulation, meme generation, data retrieval, text utilities, and more.\n\n## Quick Start\n\n### Installation\n\n```bash\npip install pop-wrapper\n```\n\n## Installation from Source\n\n```bash\ngit clone https://github.com/LandWarderer2772/pop-wrapper.git\ncd pop-wrapper\n\n### Basic Usage\n\n```python\nimport popcat\n\n# Generate a meme\ndrake_meme = popcat.drake(\"Using other APIs\", \"Using Popcat API\")\n\n## Features\n\n- **Image Manipulation**: Apply filters and effects (jail, blur, colorify, etc.)\n- **Meme Generation**: Create popular meme formats (Drake, Pooh, Supreme, etc.)\n- **Data APIs**: Access real-world data (weather, GitHub, Steam, etc.)\n- **Text Utilities**: Transform text (translate, morse code, reverse, etc.)\n- **Random Content**: Get jokes, facts, shower thoughts, and more\n- **Utilities**: Screenshots, lyrics, chatbot, welcome cards\n- **Specialized Classes**: Code paste creation and URL shortening\n\n## Complete Endpoint Reference\n\n### Image Manipulation (14 functions)\n\nTransform and apply effects to images. All functions return image URLs.\n\n```python\n# Basic filters\njail_img = popcat.jail(\"https://example.com/image.png\")\nblurred = popcat.blur(\"https://example.com/photo.jpg\")\ninverted = popcat.invert(\"https://example.com/image.png\")\ngrey = popcat.greyscale(\"https://example.com/colorful.jpg\")\n\n# Effects\ndrip_effect = popcat.drip(\"https://example.com/image.png\")\nclown_filter = popcat.clown(\"https://example.com/face.jpg\")\ncommunist = popcat.communism(\"https://example.com/image.png\")\n\n# Color manipulation\nred_tinted = popcat.colorify(\"https://example.com/image.png\", \"#FF0000\")\nblue_tinted = popcat.colorify(\"https://example.com/image.png\", \"blue\")\n\n# Meme-style effects\nwanted_poster = popcat.wanted(\"https://example.com/criminal.jpg\")\ngun_meme = popcat.gun(\"https://example.com/person.jpg\", \"Always has been\")\nad_style = popcat.ad(\"https://example.com/product.jpg\")\nuncover_effect = popcat.uncover(\"https://example.com/hidden.jpg\")\noverhead_joke = popcat.jokeoverhead(\"https://example.com/confused.jpg\")\nmnm_style = popcat.mnm(\"https://example.com/face.jpg\")\n```\n\n**Available Functions:**\n- `jail(image_url)` - Apply jail overlay\n- `blur(image)` - Blur effect\n- `invert(image)` - Invert colors\n- `greyscale(image)` - Convert to greyscale\n- `drip(image)` - Drip effect\n- `clown(image)` - Clown makeup filter\n- `colorify(image, color)` - Apply color tint\n- `wanted(image)` - Generate wanted poster\n- `gun(image, text=None)` - Gun meme format\n- `ad(image)` - Advertisement style\n- `uncover(image)` - Uncover effect\n- `communism(image_url)` - Communist filter\n- `jokeoverhead(image)` - Joke over head meme\n- `mnm(image)` - M&M style meme\n\n### Meme Generation (18 functions)\n\nCreate popular meme formats with custom text and images.\n\n```python\n# Comparison memes\ndrake_meme = popcat.drake(\"Regular APIs\", \"Popcat API\")\npooh_meme = popcat.pooh(\"Eating honey\", \"Consuming apiary nectar\")\nhappy_sad = popcat.happysad(\"Friday\", \"Monday\")\n\n# Text-based memes\nsupreme_logo = popcat.supreme(\"POPCAT\")\nwisdom = popcat.oogway(\"There are no accidents\")\nbiden_tweet = popcat.biden(\"Listen, Jack...\")\npikachu_meme = popcat.pikachu(\"When you realize it's Monday\")\nsad_cat = popcat.sadcat(\"No more treats\")\n\n# Interactive memes\nship_meme = popcat.ship(\"https://example.com/person1.jpg\", \"https://example.com/person2.jpg\")\nopinion_meme = popcat.opinion(\"https://example.com/person.jpg\", \"Pineapple belongs on pizza\")\n\n# Quote and message formats\nquote_img = popcat.quote(\"https://example.com/einstein.jpg\", \n                        \"Imagination is more important than knowledge\", \n                        \"Albert Einstein\")\n\ndiscord_msg = popcat.discord_message(\"CoolUser\", \"Hello everyone!\",\n                                    avatar=\"https://example.com/avatar.png\",\n                                    color=\"#FF5733\")\n\n# Reaction memes\nunforgivable_meme = popcat.unforgivable(\"Using Internet Explorer\")\nread_meme = popcat.couldread(\"the documentation\")\nlulcat_data = popcat.lulcat(\"I can haz cheezburger?\")\nfacts_meme = popcat.facts(\"Python is awesome\")\n\n# Warning signs\nalert_sign = popcat.alert(\"DANGER: High Voltage\")\ncaution_sign = popcat.caution(\"Wet Floor\")\n```\n\n**Available Functions:**\n- `drake(text1, text2)` - Drake pointing meme\n- `pooh(text1, text2)` - Winnie the Pooh meme\n- `ship(image1, image2)` - Ship compatibility\n- `supreme(text)` - Supreme logo style\n- `oogway(text)` - Master Oogway wisdom\n- `biden(text)` - Biden tweet style\n- `pikachu(text)` - Surprised Pikachu\n- `sadcat(text)` - Sad cat meme\n- `opinion(image, text)` - Opinion meme format\n- `discord_message(username, content, ...)` - Discord message\n- `quote(image, text, name)` - Inspirational quote\n- `happysad(text1, text2)` - Happy vs sad\n- `unforgivable(text)` - Unforgivable curse\n- `couldread(text)` - Could you please read\n- `lulcat(text)` - Lulcat/lolcat meme\n- `facts(text)` - Facts meme\n- `alert(text)` - Warning alert sign\n- `caution(text)` - Caution sign\n\n### Data & Information APIs (11 functions)\n\nAccess real-world data and information. All functions return dictionaries.\n\n```python\n# Weather and location\nweather_data = popcat.weather(\"London\")\ncountry_info = popcat.country(\"Japan\")\n\n# Social platforms\ngithub_user = popcat.github(\"octocat\")\nsubreddit_info = popcat.subreddit(\"python\")\n\n# Development and packages\nnpm_package = popcat.npm(\"express\")\nsteam_game = popcat.steam(\"Portal 2\")\n\n# Entertainment\nmovie_data = popcat.imdb(\"The Matrix\")\nsong_info = popcat.itunes(\"Bohemian Rhapsody\")\n\n# Science and colors\nelement_data = popcat.periodic_table(\"Carbon\")\ncolor_info = popcat.colorinfo(\"#FF0000\")\nrandom_color = popcat.randomcolor()\n```\n\n**Available Functions:**\n- `weather(place)` - Weather information\n- `github(username)` - GitHub user data\n- `npm(package)` - NPM package details\n- `steam(name)` - Steam game search\n- `imdb(name)` - Movie/TV show data\n- `country(name)` - Country information\n- `periodic_table(element)` - Element data\n- `colorinfo(color)` - Color information\n- `randomcolor()` - Random color generator\n- `subreddit(subreddit_name)` - Reddit subreddit data\n- `itunes(song)` - iTunes song search\n\n### Text Utilities (7 functions)\n\nTransform and manipulate text in various ways.\n\n```python\n# Language and encoding\ntranslated = popcat.translate(\"Hello world\", \"es\")  # \"Hola mundo\"\nmorse_code = popcat.texttomorse(\"SOS\")  # \"... --- ...\"\nbinary = popcat.encode(\"Hi\")  # \"01001000 01101001\"\ndecoded = popcat.decode(\"01001000 01101001\")  # \"Hi\"\n\n# Text formatting\nreversed_text = popcat.reverse(\"Hello World\")  # \"dlroW olleH\"\nmocked = popcat.mock(\"This is a test\")  # \"tHiS iS a TeSt\"\ndouble_struck = popcat.doublestruck(\"Hello\")  # \"\u210d\ud835\udd56\ud835\udd5d\ud835\udd5d\ud835\udd60\"\n```\n\n**Available Functions:**\n- `translate(text, to)` - Translate to another language\n- `reverse(text)` - Reverse character order\n- `mock(text)` - Mocking SpongeBob format\n- `doublestruck(text)` - Mathematical double-struck\n- `texttomorse(text)` - Convert to Morse code\n- `encode(text)` - Encode to binary\n- `decode(binary)` - Decode from binary\n\n### Random Content (7 functions)\n\nGet random entertainment content for fun and engagement.\n\n```python\n# Simple random content\nrandom_joke = popcat.joke()\ninteresting_fact = popcat.fact()\nmagic_answer = popcat.eightball()  # or popcat._8ball()\n\n# Complex random data\nmeme_data = popcat.randommeme()\ncar_info = popcat.car()\nshower_thought = popcat.showerthought()\nwyr_question = popcat.wouldyourather()\n\nprint(f\"Joke: {random_joke}\")\nprint(f\"Fact: {interesting_fact}\")\nprint(f\"8-Ball says: {magic_answer}\")\nprint(f\"Random meme: {meme_data['title']}\")\n```\n\n**Available Functions:**\n- `joke()` - Random joke\n- `fact()` - Random fact\n- `randommeme()` - Random meme data\n- `car()` - Random car information\n- `showerthought()` - Random shower thought\n- `wouldyourather()` - Would you rather question\n- `eightball()` / `_8ball()` - Magic 8-ball response\n\n### Utilities (4 functions)\n\nGeneral-purpose utility functions for various needs.\n\n```python\n# Music and lyrics\nsong_lyrics = popcat.lyrics(\"Bohemian Rhapsody Queen\")\nsong_lyrics2 = popcat.lyrics(\"Taylor Swift - Shake It Off\")\n\n# Web screenshots\nscreenshot_url = popcat.screenshot(\"https://github.com\")\n\n# AI chatbot\nbot_response = popcat.chatbot(\"Hello there!\", \"John\", \"MyBot\")\n\n# Welcome cards for Discord/servers\nwelcome_img = popcat.welcomecard(\n    background=\"https://example.com/bg.png\",\n    avatar=\"https://example.com/avatar.jpg\",\n    text_1=\"Welcome\",\n    text_2=\"John Doe\", \n    text_3=\"to our awesome server!\"\n)\n```\n\n**Available Functions:**\n- `lyrics(song)` - Get song lyrics\n- `screenshot(url)` - Website screenshot\n- `chatbot(message, ownername, botname)` - AI chatbot\n- `welcomecard(background, avatar, text_1, text_2, text_3)` - Welcome card\n\n### Specialized Classes (2 classes)\n\nAdvanced services with full-featured class interfaces.\n\n#### CodeClient - Code Paste Creation\n\n```python\n# Initialize with API key\nclient = popcat.CodeClient(\"your-api-key\")\n\n# Create a code paste\npaste = client.create_bin(\n    title=\"Hello World\",\n    description=\"A simple Python example\", \n    code=\"print('Hello, World!')\",\n    theme=\"Monokai\",\n    language=\"Python\"\n)\n\nprint(f\"Paste URL: {paste['url']}\")\n\n# Get available themes and languages\nthemes = popcat.CodeClient.get_available_themes()\nlanguages = popcat.CodeClient.get_available_languages()\n\nprint(f\"Available themes: {len(themes)}\")\nprint(f\"Supported languages: {len(languages)}\")\n```\n\n**Available Themes:** GitHub Dark, Monokai, Dracula, VS Code Dark, and 40+ more\n**Supported Languages:** Python, JavaScript, Java, C++, TypeScript, and 50+ more\n\n#### Shortener - URL Shortening\n\n```python\n# Create shortened URL\nshort_data = popcat.Shortener.shorten(\"https://github.com\", \"gh\")\nprint(f\"Short URL: {short_data['short_url']}\")  # https://popcat.xyz/gh\n\n# Get URL information\ninfo = popcat.Shortener.get_info(\"gh\")\nprint(f\"Original: {info['original_url']}\")\nprint(f\"Clicks: {info['clicks']}\")\n```\n\n## Installation & Requirements\n\n### Requirements\n- Python 3.7+\n- requests library\n\n### Installation\n\n```bash\n# Install from PyPI\npip install pop-wrapper\n\n# Install from source\ngit clone https://github.com/LandWarderer2772/pop-wrapper.git\ncd pop-wrapper\npip install -e .\n```\n\n### Optional Dependencies\n\n```bash\n# For development\npip install pop-wrapper[dev]\n\n# For testing\npip install pop-wrapper[test]\n```\n\n## Usage Examples\n\n### Discord Bot Integration\n\n```python\nimport discord\nimport popcat\n\n```python\nimport discord\nimport popcat\n\n@client.command()\nasync def meme(ctx, *, text):\n    \"\"\"Generate a random meme with user text\"\"\"\n    if ' | ' in text:\n        text1, text2 = text.split(' | ', 1)\n        meme_url = popcat.drake(text1, text2)\n    else:\n        meme_url = popcat.oogway(text)\n    \n    embed = discord.Embed()\n    embed.set_image(url=meme_url)\n    await ctx.send(embed=embed)\n\n@client.command()\nasync def weather(ctx, *, location):\n    \"\"\"Get weather for a location\"\"\"\n    weather_data = popcat.weather(location)\n    embed = discord.Embed(title=f\"Weather in {weather_data['location']}\")\n    embed.add_field(name=\"Temperature\", value=weather_data['temperature'])\n    embed.add_field(name=\"Condition\", value=weather_data['condition'])\n    await ctx.send(embed=embed)\n```\n\n### Web Application\n\n```python\nfrom flask import Flask, render_template, request\nimport popcat\n\napp = Flask(__name__)\n\n@app.route('/meme-generator', methods=['GET', 'POST'])\ndef meme_generator():\n    if request.method == 'POST':\n        meme_type = request.form['type']\n        text1 = request.form['text1']\n        text2 = request.form.get('text2', '')\n        \n        if meme_type == 'drake':\n            meme_url = popcat.drake(text1, text2)\n        elif meme_type == 'supreme':\n            meme_url = popcat.supreme(text1)\n        \n        return render_template('meme_result.html', meme_url=meme_url)\n    \n    return render_template('meme_form.html')\n\n@app.route('/random-content')\ndef random_content():\n    content = {\n        'joke': popcat.joke(),\n        'fact': popcat.fact(),\n        'color': popcat.randomcolor(),\n        'meme': popcat.randommeme()\n    }\n    return render_template('random.html', content=content)\n```\n\n### Data Analysis\n\n```python\nimport popcat\nimport pandas as pd\n\n# Analyze GitHub users\nusers = ['octocat', 'torvalds', 'gaearon', 'sindresorhus']\ngithub_data = []\n\nfor user in users:\n    try:\n        data = popcat.github(user)\n        github_data.append({\n            'username': data['username'],\n            'followers': data['followers'],\n            'repos': data['public_repos'],\n            'language': data.get('most_used_language', 'Unknown')\n        })\n    except Exception as e:\n        print(f\"Error fetching {user}: {e}\")\n\ndf = pd.DataFrame(github_data)\nprint(df)\n\n# Get weather for multiple cities\ncities = ['London', 'New York', 'Tokyo', 'Sydney']\nweather_data = []\n\nfor city in cities:\n    try:\n        weather = popcat.weather(city)\n        weather_data.append({\n            'city': city,\n            'temperature': weather['temperature'],\n            'condition': weather['condition']\n        })\n    except Exception as e:\n        print(f\"Error fetching weather for {city}: {e}\")\n\nweather_df = pd.DataFrame(weather_data)\nprint(weather_df)\n```\n\n## Authentication & Rate Limits\n\n### API Keys\n- **CodeClient**: Requires an API key for code paste creation\n- **Most endpoints**: No authentication required\n- **Shortener**: May require authentication for some operations\n\n### Rate Limiting\nThe Popcat API may have rate limits. For production applications:\n\n```python\nimport time\nimport popcat\n\ndef rate_limited_request(func, *args, delay=1, **kwargs):\n    \"\"\"Make rate-limited API requests\"\"\"\n    try:\n        result = func(*args, **kwargs)\n        time.sleep(delay)  # Add delay between requests\n        return result\n    except Exception as e:\n        if \"rate limit\" in str(e).lower():\n            time.sleep(5)  # Wait longer on rate limit\n            return func(*args, **kwargs)\n        raise e\n\n# Example usage\nmeme = rate_limited_request(popcat.drake, \"Fast requests\", \"Rate limited requests\")\n```\n\n## Error Handling\n\nThe package includes comprehensive error handling:\n\n```python\nimport popcat\n\ntry:\n    # Invalid image URL\n    result = popcat.jail(\"not-a-url\")\nexcept ValueError as e:\n    print(f\"Validation error: {e}\")\n\ntry:\n    # API request failure\n    result = popcat.weather(\"NonexistentCity123\")\nexcept Exception as e:\n    print(f\"API error: {e}\")\n\n# Graceful error handling\ndef safe_meme_generation(text1, text2):\n    try:\n        return popcat.drake(text1, text2)\n    except ValueError:\n        return None  # Invalid input\n    except Exception:\n        return popcat.supreme(text1)  # Fallback to different meme\n```\n\n## Contributing\n\nWe welcome contributions. Please follow these guidelines:\n\n### Development Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/LandWarderer2772/pop-wrapper.git\ncd pop-wrapper\n\n# Create virtual environment\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n# Install in development mode\npip install -e .[dev]\n\n# Run tests\npython -m pytest tests/\n```\n\n### Adding New Endpoints\n\n1. **Identify the endpoint** on [Popcat API](https://popcat.xyz/api)\n2. **Choose the appropriate module** (image, meme, data, text, random, utilities)\n3. **Implement the function** with proper validation and documentation\n4. **Add tests** for the new function\n5. **Update the README** with examples\n\nExample:\n\n```python\ndef new_endpoint(parameter: str) -> str:\n    \"\"\"\n    Description of what this endpoint does.\n    \n    Args:\n        parameter (str): Description of parameter\n        \n    Returns:\n        str: Description of return value\n        \n    Raises:\n        ValueError: If parameter is invalid\n        Exception: If API request fails\n        \n    Example:\n        >>> result = new_endpoint(\"example\")\n        >>> print(result)\n        Expected output\n    \"\"\"\n    _validate_text(parameter)\n    return _make_request(\"/new-endpoint\", {\"param\": parameter})\n```\n\n### Testing\n\n```bash\n# Run all tests\npython -m pytest\n\n# Run specific test file\npython -m pytest tests/test_image.py\n\n# Run with coverage\npython -m pytest --cov=popcat\n\n# Run integration tests (requires internet)\npython -m pytest tests/integration/\n```\n\n### Code Style\n\nWe use Black for code formatting and flake8 for linting:\n\n```bash\n# Format code\nblack popcat/\n\n# Check linting\nflake8 popcat/\n\n# Type checking\nmypy popcat/\n```\n\n## Changelog\n\n### v1.0.0 (2023-01-15)\n- Initial release\n- All 63 Popcat API endpoints implemented\n- Comprehensive documentation and examples\n- Full test coverage\n- CodeClient and Shortener classes\n\n### v0.9.0 (2023-01-10)\n- Beta release\n- Core functionality implemented\n- Basic documentation\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Links\n\n- **PyPI**: https://pypi.org/project/pop-wrapper/\n- **GitHub**: https://github.com/LandWarderer2772/pop-wrapper\n- **Documentation**: https://pop-wrapper.readthedocs.io/\n- **Popcat API**: https://popcat.xyz/api\n- **Issues**: https://github.com/LandWarderer2772/pop-wrapper/issues\n\n## Support\n\nIf you find this package helpful, consider:\n- Starring the repository\n- Reporting bugs\n- Suggesting new features\n- Contributing code\n- Sharing with others\n\n## Contact\n\n- **Email**: mh3as81gb@mozmail.com\n- **Discord**: land_lmao\n- **GitHub**: @LandWarderer2772\n\n---\n\nDeveloped for the Python community. Professional API wrapper solution.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A comprehensive Python wrapper for the Popcat API",
    "version": "1.0.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/LandWarderer2772/pop-wrapper/issues",
        "Documentation": "https://popcat.readthedocs.io/",
        "Homepage": "https://github.com/LandWarderer2772/pop-wrapper",
        "Repository": "https://github.com/LandWarderer2772/pop-wrapper"
    },
    "split_keywords": [
        "popcat",
        " api",
        " wrapper",
        " meme",
        " image",
        " manipulation",
        " discord",
        " bot",
        " random",
        " joke",
        " weather",
        " github",
        " text",
        " utilities",
        " entertainment",
        " social"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "207750eb71b3470619c69864fdc5d96c3073478ec94f0030bdd8bb2ff0778eb8",
                "md5": "c65107a5b7f5b67a5206eab239b78f2e",
                "sha256": "52d1d5ecc5a85a5eeeee19abbcc3fbfaccc2251413650afbbbdfeb0dd197c79b"
            },
            "downloads": -1,
            "filename": "pop_wrapper-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c65107a5b7f5b67a5206eab239b78f2e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 27669,
            "upload_time": "2025-11-01T14:13:44",
            "upload_time_iso_8601": "2025-11-01T14:13:44.904231Z",
            "url": "https://files.pythonhosted.org/packages/20/77/50eb71b3470619c69864fdc5d96c3073478ec94f0030bdd8bb2ff0778eb8/pop_wrapper-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4588278c9c04fe1537017414bad8efdef9ba6d2d25dca7d4f9f4faaf52a1df89",
                "md5": "ae8256817fc426c987ebfd350e313684",
                "sha256": "590dd994f6251f502b631d32a6ec51d11c1cc9d214a2841fc53db4b5a19fe2e2"
            },
            "downloads": -1,
            "filename": "pop_wrapper-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ae8256817fc426c987ebfd350e313684",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 42749,
            "upload_time": "2025-11-01T14:13:47",
            "upload_time_iso_8601": "2025-11-01T14:13:47.051410Z",
            "url": "https://files.pythonhosted.org/packages/45/88/278c9c04fe1537017414bad8efdef9ba6d2d25dca7d4f9f4faaf52a1df89/pop_wrapper-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-01 14:13:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "LandWarderer2772",
    "github_project": "pop-wrapper",
    "github_not_found": true,
    "lcname": "pop-wrapper"
}
        
Elapsed time: 1.40863s