semvec/pypi-packages huggingface dataset:
dwrandomizer-wrapper 0.3.0
A Cython wrapper for the C based Dragon Warrior Randomizer, for use with Archipelago
Requires Python: >=3.9

# DWRandomizer-Wrapper

This package is for use with [Archipelago](https://github.com/Serpikmin/Archipelago-DragonWarrior), for Dragon Warrior (NES) development. It wraps a modified fork of [juef's unofficial Dragon Warrior randomizer](https://github.com/Serpikmin/dwrandomizer) (written in C) with Cython in order to run the randomizer natively for AP.

To use, install the package and then write:
```
import dwr

dwr.py_dwr_randomize(filepath, seed, flags, outpath)
```

where:
filepath = bytes(str)
seed = long
flags = bytes(str)
outpath = bytes(str)
pyntrest 1.0.0
A Pinterest image search and download client
Requires Python: >=3.7

# Pyntrest

A powerful Pinterest image search and download client with CLI and API support.

## Features

- Search and download Pinterest images
- Command-line interface
- FastAPI server with web interface
- Multiple search modes:
  - Regular search
  - Random images
  - Inspiration images
  - Single image quick search
- Download functionality
- Session management with cookie refresh
- User agent rotation to prevent rate limiting
- Easy to use as a Python library

## Installation

```bash
# From PyPI (coming soon)
pip install pyntrest

# From GitHub
git clone https://github.com/redmoon0x/pynterest.git
cd pynterest
pip install -e .
```

## Command Line Usage

Search and download images:
```bash
# Basic search
pyntrest-search "cats" -n 5

# Download to specific directory
pyntrest-search "dogs" -n 3 -o dog_pics

# Get random images
pyntrest-search random "nature" -n 2

# Get random inspiration images
pyntrest-search inspire -n 3
```

## Web Interface

Start the web server:
```bash
pyntrest-server
```

Then open http://localhost:8000 in your browser to use the web interface.

## API Usage

### As a Python Library

```python
from pyntrest import PinterestClient

# Initialize the client
client = PinterestClient()

# Search for images
images = client.get_image_links("cats", num_images=3)
for img in images:
    print(f"URL: {img['url']}")
    print(f"Size: {img['width']}x{img['height']}")
    print(f"Title: {img['title']}")
    print(f"Description: {img['description']}")

# Get a single image quickly
image = client.get_one_image("dogs")
print(image['url'])

# Get a random inspiration image
image = client.get_random_inspiration()
print(image['url'])
```

### REST API Endpoints

The web server provides these endpoints:

- `GET /api/search/?query=<term>&num=<count>` - Search for images
- `GET /api/random/?query=<term>` - Get a random image for query
- `GET /api/one/?query=<term>` - Get a single image quickly
- `GET /api/inspire/` - Get a random inspiration image
- `GET /api/download/?url=<image_url>` - Download an image

Example using curl:
```bash
# Search for images
curl "http://localhost:8000/api/search/?query=cats&num=3"

# Get a random image
curl "http://localhost:8000/api/random/?query=dogs"

# Get an inspiration
curl "http://localhost:8000/api/inspire/"
```

## Project Structure

```
pyntrest/
├── client/           # Core Pinterest client
│   ├── __init__.py
│   └── pinterest.py
├── api/             # FastAPI server
│   ├── __init__.py
│   └── server.py
├── web/            # Web interface
│   └── static/     # Frontend files
├── __init__.py     # Package initialization
└── cli.py         # Command line interface
```

## Development

1. Clone the repository
2. Install development dependencies:
```bash
pip install -r requirements.txt
```

3. Run tests:
```bash
pytest
```

## License

MIT License - see LICENSE file for details.
dagster-datacontract 0.5.0
Load metadata and asset check spesifications from data contracts.
Requires Python: >=3.10

# dagster-datacontract

[Dagster](https://github.com/dagster-io/dagster) [Datacontract](https://github.com/datacontract/datacontract-cli) implementation for loading asset metadata and context information from data contracts to Dagster assets.

## Installation

Install `dagster-datacontract` using [`uv`](https://github.com/astral-sh/uv):

```shell
uv add dagster-datacontract
```

## Example

The following example can be found inside the [examples](https://github.com/dataheim-io/dagster-datacontract/tree/main/examples)-directory:

```python
from datetime import timedelta
from pathlib import Path

import dagster as dg
import polars as pl
import requests
from datacontract.data_contract import DataContract

from dagster_datacontract import DataContractLoader

asset_name = "yellow_taxi_trip_records"
examples_path = Path(__file__).resolve().parent.parent
data_contract = DataContractLoader(
    asset_name=asset_name,
    data_contract=DataContract(
        data_contract_file=str(examples_path / "datacontracts" / "datacontract.yml"),
        server="production",
    ),
)


@dg.asset(
    name=asset_name,
    metadata=data_contract.metadata,
    tags=data_contract.tags,
    description=data_contract.description,
    owners=data_contract.owner,
    code_version=data_contract.version,
)
def yellow_taxi_trip_records(
    context: dg.AssetExecutionContext,
) -> None:
    download_path = examples_path.parent.parent / "data"
    Path(download_path).mkdir(parents=True, exist_ok=True)

    url = "https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2025-01.parquet"
    response = requests.get(url=url)

    file_path = f"{download_path}/yellow_tripdata_2025-01.parquet"
    context.log.info(f"Reading data from '{url}' and writing to '{file_path}'.")
    with open(file_path, "wb") as f:
        f.write(response.content)

    df = pl.read_parquet(file_path)
    context.log.info(f"File contents downloaded:\n{df}")


asset_check_yellow_taxi_trip_records = data_contract.load_data_quality_checks()

freshness_checks = data_contract.load_freshness_checks(
    lower_bound_delta=timedelta(minutes=5)
)
freshness_checks_sensor = dg.build_sensor_for_freshness_checks(
    freshness_checks=freshness_checks,
    default_status=dg.DefaultSensorStatus.RUNNING,
)

job = dg.define_asset_job(
    name="monthly_taxi_trips",
    selection=[asset_name],
)
schedule = dg.ScheduleDefinition(
    job=job,
    cron_schedule=data_contract.cron_schedule,
    default_status=dg.DefaultScheduleStatus.RUNNING,
)


defs = dg.Definitions(
    assets=[yellow_taxi_trip_records],
    asset_checks=[asset_check_yellow_taxi_trip_records, *freshness_checks],
    schedules=[schedule],
    sensors=[freshness_checks_sensor],
)
```
lite-sort 0.1.3
Sort/group files by their file-type
Requires Python: >=3.10
Keywords: file, directory, file_manipulation, filesort, mime

# lite-sort
`lite-sort` is a simple program to collect and sort files in a given directory into directories
matching (or relevant to) their filetype. Filetype is typically determined by the file's extension,
but falls back to using file header to resolve files without extensions. Written with Python3+

## Install (may require a venv)
$ pip install lite-sort

## Examples
```console
$ lite-sort file1.txt file2.pdf file3.zip
~/Documents
 \_ txt/
 \_ pdf/
 \_ zip/
```

```
Usage: lite-sort [options] [files]

With no files provided, sorts files starting from the current directory and its subdirectories.

OPTIONS:
-s, --search-dir START_DIR  search directory, where files to be sorted are searched
-d, --dest-dir DEST_DIR     destination directory, where files to be sorted are moved to
-D, --max-depth DEPTH       maximum filesystem directory depth to search for files
-f, --file-list FILE        file containing list of files to be sorted, files in this
                            list will be merged with the [files] passed as arguments
-h, --help                  display this help and exit
-m, --move                  move the files instead of copying them
-v, --version               output version information and exit
-V, --verbose               verbose output
```