semvec/pypi-packages huggingface dataset:
wumpy-bot 0.1.0
Highly abstracted and easy to use wrapper over the Wumpy project
Requires Python: >=3.7
Keywords: wumpy,wumpus,wrapper,discord,discord-api,discord-bot,discord-api-wrapper,python-3

# Wumpy-bot

Easy to use high abstraction over other Wumpy subpackages.

This is the most beginner-friendly way to use Wumpy, and provides all features
of the Discord API. This is the primary package installed from PyPI when you
only specify [`wumpy`](https://pypi.org/project/wumpy/).

## Getting started

All official Wumpy projects prioritise both asyncio and Trio support so you can
run the bot under either:

```python
import anyio
from wumpy.bot import Bot


bot = Bot('ABC123.XYZ789')  # Replace with your token and keep it safe!

# This runs the bot with Trio as the event loop (recommended),
# use backend='asyncio' to run it under asyncio.
anyio.run(bot.run, backend='trio')
```

### Registering listeners

Continuing from the previous code, you can register listeners for Discord
events using Wumpy's rich event listeners:

```python
import anyio
from wumpy.bot import Bot
from wumpy.bot.events import MessageDeleteEvent


bot = Bot('ABC123.XYZ789')


@bot.listener()
async def log_deleted_messages(event: MessageDeleteEvent):
    print(f'Message {event.message_id} in {event.channel_id} was deleted')


anyio.run(bot.run, backend='trio')
```

The listener is registered with the `@bot.listener()` decorator, which tells
Wumpy to read the annotation of the first parameter (name does not matter, but
here it is called `event`) and register that function for the type of event
that it is typehinted as.
wumpy-cache 0.1.0
Simple and plain caching for Discord API libraries.
Requires Python: >=3.7
Keywords: wumpy,wumpus,wrapper,discord,discord-api,discord-bot,discord-api-wrapper,python-3

# Wumpy-cache

Simple memory cache for the gateway.

The default implementation in `wumpy-cache` is rather simple dictionaries, but
it can be overriden by other implementations as long as they follow the typing
`Cache` Protocol.

This means that you can use alternate implementations of data structures for
more efficient retrieval for your use-case or offload caching to something like
Redis or even store it in Postgres.
wumpy-interactions 0.1.0
Support for HTTP interactions with the Discord API
Requires Python: >=3.7
Keywords: wumpy,wumpus,wrapper,discord,discord-api,discord-bot,discord-api-wrapper,discord-interaction,python-3

# Wumpy-interactions

Support for HTTP interactions with the Discord API

Refer to the [documentation](https://wumpy.rtfd.io) for more.
wumpy-models 0.1.0
Fully typed, memory efficient Discord object representations
Requires Python: >=3.7
Keywords: wumpy,wumpus,wrapper,discord,discord-api,discord-bot,discord-api-wrapper,python-3

# Wumpy-models

Fully typed, memory efficient Discord object representations.

```python
from wumpy.models import User


user = User.from_data({ ... })

print(f'{user.name}#{user.discriminator}')
```
wumpy-rest 0.3.0
Reusable and richly typed wrapper over the Discord REST API
Requires Python: >=3.7
Keywords: wumpy,wumpus,wrapper,discord,discord-api,discord-bot,discord-api-wrapper,python-3

# Wumpy-rest

Richly and accurately typed wrapper around the Discord REST API.

## Usage

The best way to use `wumpy-rest` is to import `APIClient`:

```python
import anyio
from wumpy.rest import APIClient


TOKEN = 'ABC123.XYZ789'


async def main():
    async with APIClient(TOKEN) as api:
        print(await api.fetch_my_user())


anyio.run(main)
```

`APIClient` is a class that implements all routes of the Discord API. This is
made up of multiple route classes. You can create your own class with the
routes you use:

```python
from wumpy.rest import (
    ApplicationCommandRequester, InteractionRequester,
    HTTPXRequester
)


class MyAPIClient(ApplicationCommandRequester, InteractionRequester, HTTPXRequester):

    __slots__ = ()  # Save some memory for this class
```

### Files

Some endpoints support uploading files, for these a file-like object is
expected that's been opened in binary-mode (for example `'rb'`).

For the message/interaction endpoints, remember to include a matching
`attachment` object with `'id'` set to the index of the file.

## Ratelimiter

You can pass a custom ratelimiter to the requester if you want to customize
that behaviour. For more, [read the documentation](https://wumpy.rtfd.io).
Here's an example of a ratelimiter that does no ratelimiting and does not
handle any kind of `429`-responses.

```python
from contextlib import asynccontextmanager
from typing import (
    Any, AsyncContextManager, AsyncGenerator, Awaitable, Callable, Coroutine,
    Mapping
)

import anyio
from wumpy.rest import APIClient


class NoOpRatelimiter:
    """Ratelimiter implementation that does nothing; a no-op implementation."""

    async def __aenter__(self):
        return self

    async def __aexit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType]
    ) -> object:
        pass

    @asynccontextmanager
    async def __call__(self, route: Route) -> AsyncGenerator[
        Callable[[Mapping[str, str]], Coroutine[Any, Any, object]],
        None
    ]:
        # The return type may look a little weird, but this is how
        # @asynccontextmanager works. You pass it a function that returns an
        # async generator (which yields what the asynchronous context manager
        # then returns).
        yield self.update

    async def update(self, headers: Mapping[str, str]) -> object:
        pass


async def main():
    async with APIClient(TOKEN, ratelimiter=NoOpRatelimiter()) as api:
        print(await api.fetch_my_user())


anyio.run(main)
```
unpixelate 1.0.0
Unpixelate images
Requires Python: >=3.6

# Unpixelate
Resize and depixel low resolution images.

<img src="assets/main-preview.jpg" width="100%">

## Usage

```python
import cv2
import unpixelate

original_image = cv2.imread('image.jpg')

result = unpixelate.apply(original_image, 7, 600)
```

### Params
The **apply** method accepts 3 parameters:

- **Image (Required)**: Original image to be changed.
- **Weight (Optional)**: Indicates the power of the gaussian-blur algorithm. The higher the value, the more shape distortion. It must be between 1 and 10. Default value is 6.
- **Width Scale (Optional)**: Indicates the width of the output image. Default value is 800.

## Limitations
Unpixelate library helps with logos and some graphics, but it doesn't help when maximum sharpness and detail is needed.<br />
In the majority of cases, you'll want to improve the quality of low resolution images (about 300 pixels wide or less). Otherwise you might be a little disappointed.

## Plans

- [ ] Anti-aliasing
unpixalate 1.0.0
Unpixelate images
Requires Python: >=3.6

# Unpixelate
Resize and depixel low resolution images.

<img src="assets/main-preview.jpg" width="100%">

## Usage

```python
import cv2
import unpixelate

original_image = cv2.imread('image.jpg')

result = unpixelate.apply(original_image, 7, 600)
```

### Params
The **apply** method accepts 3 parameters:

- **Image (Required)**: Original image to be changed.
- **Weight (Optional)**: Indicates the power of the gaussian-blur algorithm. The higher the value, the more shape distortion. It must be between 1 and 10. Default value is 6.
- **Width Scale (Optional)**: Indicates the width of the output image. Default value is 800.

## Limitations
Unpixelate library helps with logos and some graphics, but it doesn't help when maximum sharpness and detail is needed.<br />
In the majority of cases, you'll want to improve the quality of low resolution images (about 300 pixels wide or less). Otherwise you might be a little disappointed.

## Plans

- [ ] Anti-aliasing
wumpy-gateway 0.3.0
Lowlevel but easy-to-use wrapper over the Discord gateway
Requires Python: >=3.7
Keywords: wumpy,wumpus,wrapper,discord,discord-api,discord-bot,discord-api-wrapper,python-3

# Wumpy-gateway

Gateway implementation for the Wumpy project.

## Installation

Wumpy-gateway is available as a package on PyPI. Just use your favourite
package manager such as pip or Poetry:

```bash
# Installing from PyPI using pip:
pip install wumpy-gateway
```

```bash
# Alternatively, using Poetry:
poetry add wumpy-gateway
```

## Quickstart

The API of wumpy-gateway is very simple:

```python
from wumpy.gateway import Shard


INTENTS = 65535
TOKEN = 'ABC123.XYZ789'


async def main():
    # Connect to the URI wss://gateway.discord.gg/ with the token
    # ABC123.XYZ8789 and all intents.
    async with Shard('wss://gateway.discord.gg/', TOKEN, INTENTS) as ws:
        async for event in ws:
            print(event)  # The deserialized JSON event payload
```