semvec/pypi-packages huggingface dataset:
genericache 0.5.2
A thread-safe, process-safe cache for slow data fetching operations
Requires Python: >=3.8

# Genericache

A thread-safe, process-safe cache for slow fetching operations, like web requests.

## Usage

```python
    from genericache import DiskCache
    from genericache.digest import UrlDigest
    from pathlib import Path
    from typing import Iterable
    from hashlib import sha256

    def my_fetch(url: str) -> Iterable[bytes]:
        import httpx
        return httpx.get(url).raise_for_status().iter_bytes(4096)

    def url_hasher(url: str) -> UrlDigest:
        return UrlDigest.from_str(url)

    cache = DiskCache[str].create(
        url_type=str,
        cache_dir=Path("/tmp/my_cache"),
        url_hasher=url_hasher,
    )

    reader, contents_digest = cache.fetch(
        "https://www.ilastik.org/documentation/pixelclassification/snapshots/training2.png",
        fetcher=my_fetch,
    )
    assert sha256(reader.read()).digest() == contents_digest.digest
    assert cache.hits() == 0
    assert cache.misses() == 1

    reader, contents_digest = cache.fetch(
        "https://www.ilastik.org/documentation/pixelclassification/snapshots/training2.png",
        fetcher=my_fetch,
    )
    assert cache.hits() == 1
    assert cache.misses() == 1
```

## Static type checking

Run pyright over the entire project:

```bash
    python3 -m scripts.check
```

## Testing

Run the modules inside `tests/`, e.g.:

`uv run --python 3.11 python -m tests.test_disk_cache`

You can also run all tests via the `run_tests` executable module:

```bash
    python3 -m scripts.run_tests
```
django-admin-models-search 1.0.1.post1
Add a search bar for registered models in Django admin
Requires Python: >=3.8

# Django Admin Models Search

A Django package that adds a global search bar to the Django admin interface, allowing you to quickly search and navigate between registered models.

## Features

- Adds a global search bar to the Django admin header.
- Provides suggestions for registered models as you type.
- Supports keyboard navigation for quick access.
- Fully customizable and easy to integrate.

## Installation

Install the package via `pip`:

```bash
pip install django-admin-models-search
```

## Configuration 
1. Add the app to your INSTALLED_APPS in settings.py

```python
INSTALLED_APPS = [
    # Other apps...
    'django_admin_models_search',
]
```

2. Include the package's URLs in your urls/admin.py

path should be `admin/model-suggestions/`

```python 
from django.urls import path, include

urlpatterns = [
    path('', include('django_admin_models_search.urls')),
]
```
dumb-file-drop 0.1.1
A simple webserver-based drop box which allows file uploads. Good for sending files to another device on your local network.
Requires Python: >=3.9
Keywords: dropbox

# dumb-file-drop
[![Python 3.9+](https://upload.wikimedia.org/wikipedia/commons/4/4f/Blue_Python_3.9%2B_Shield_Badge.svg)](https://www.python.org)
[![License: GPL v3](https://upload.wikimedia.org/wikipedia/commons/8/86/GPL_v3_Blue_Badge.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)

Simple webserver which allows files to be uploaded to it.  Good for quickly sharing files on your local network.

Files will be uploaded to `/tmp/uploads`

## Usage
```bash
# install dependencies
uv sync --no-install-project

# run in debug mode
uv run python -m dumb_file_drop

# prod
uv run gunicorn -w 4 -k uvicorn.workers.UvicornWorker -b "0.0.0.0" dumb_file_drop.__main__:app
```

Endpoint: [localhost:8000](http://localhost:8000)

⚠️ Do not use this on public/untrusted networks!  There's no built-in authentication, so anybody could upload files to your computer!