semvec/pypi-packages huggingface dataset:
phonkersbase 0.2.0
A Python client for the PhonkersBase API
License: MIT
Requires Python: >=3.7

# PhonkersBase Python Client

A Python client library for interacting with the PhonkersBase API (phonkersbase.com).

## Features

- Search and retrieve artists from PhonkersBase
- Filter artists by label and country
- Built-in caching support
- Pagination helpers
- Type hints support
- Error handling

## Installation

```bash
pip install phonkersbase
```

## Quick Start

```python
from phonkersbase import phonkerbase, ArtistLabel

# Basic usage
artists = phonkerbase.search_artists("phonk")

# Filter by label
approved_artists = phonkerbase.get_artists_by_label(ArtistLabel.APPROVED)

# Filter by country
uk_artists = phonkerbase.get_artists_by_country("uk")

# Paginate through all results
all_artists = phonkerbase.paginate_all_artists(label=ArtistLabel.APPROVED)
```

## API Reference

### PhonkersBaseAPI

The main client class for interacting with the PhonkersBase API.

```python
client = PhonkersBaseAPI(
    timeout=10,  # Request timeout in seconds
    cache_ttl=3600,  # Cache TTL in seconds
    cache_size=2048  # Maximum number of cached items
)
```

### Methods

- `get_artists(search=None, label=None, country=None, limit=25, offset=0, locale='uk')`
- `get_countries()`
- `search_artists(query, **kwargs)`
- `get_artists_by_label(label, **kwargs)`
- `get_artists_by_country(country, **kwargs)`
- `paginate_all_artists(**kwargs)`
- `clear_cache()`
- `get_cache_info()`

### Artist Labels

Available artist labels (via `ArtistLabel` enum):
- BASE
- APPROVED
- UNKNOWN
- PRIDE
- BLOCKED
- WARNING

## Error Handling

The library uses the `PhonkersBaseException` class for error handling:

```python
try:
    artists = phonkerbase.search_artists("archez")
except PhonkersBaseException as e:
    print(f"API Error: {e}")
```

## License

MIT License
asyncgui-ext-clock 0.6.1
An event scheduler for asyncgui programs
License: MIT
Requires Python: <4.0,>=3.10
Keywords: async

# Clock

```python
import asyncgui
from asyncgui_ext.clock import Clock

clock = Clock()

async def async_fn():
    await clock.sleep(20)  # Waits for 20 time units
    print("Hello")

asyncgui.start(async_fn())
clock.advance(10)  # Advances the clock by 10 time units.
clock.advance(10)  # Total of 20 time units. The async_fn will wake up, and prints 'Hello'.
```

The example above effectively illustrate how this module works but it's not practical.
In a real-world program, you probably want to call ``clock.advance()`` in a main loop.
For example, if you are using `PyGame`, you may want to do:

```python
pygame_clock = pygame.time.Clock()
clock = asyncgui_ext.clock.Clock()

# main loop
while running:
    ...

    dt = pygame_clock.tick(fps)
    clock.advance(dt)
```

## Installation

Pin the minor version.

```
poetry add asyncgui-ext-clock@~0.6
pip install "asyncgui-ext-clock>=0.6,<0.7"
```

## Tested on

- CPython 3.10
- CPython 3.11
- CPython 3.12
- CPython 3.13
- PyPy 3.10