semvec/pypi-packages huggingface dataset:
pygame-tools-tafh 0.1.3
Advanced game engine built upon pygame. Includes such things like tweens, game objects, scenes, etc.
Requires Python: >=3.10

# Pygame Tools

Pygame Tools Tafh is an advanced game engine built upon pygame. Includes such things like tweens, game objects, scenes, etc.

---

## Example

```py
# main.py
import asyncio
from pygame_tools_tafh import *

class Scene:

    def load(self):
        label = GameObject("label")
        label.add_component(LabelComponent("Hello, World!", (255, 0, 0)))
        label.transform.position = Vector2d(400, 300)

engine = Engine("Glorytopia", 60, (800, 600))

def main():
    asyncio.run(engine.run(Scene()))
    

if __name__ == "__main__":
    main()
```

## Run it

```bash
python3 main.py
```

![alt text](img/image.png)
django-natural-sort 0.1.1
Natural sorting for Django and Django REST Framework
Requires Python: >=3.6
Keywords: django, drf, natural sort, sorting, ordering

# Django Natural Sort

![PyPI](https://img.shields.io/pypi/v/django-natural-sort)
![PyPI - License](https://img.shields.io/pypi/l/django-natural-sort)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-natural-sort)
![PyPI - Django Version](https://img.shields.io/pypi/djversions/django-natural-sort)

A  lightweight, efficient package for natural sorting in Django and Django REST Framework.

## The Problem

By default, when you order strings containing numbers in Django or DRF, they're sorted lexicographically:

```
['1', '10', '11', '12', '2', '3', '4', '5', '6', '7', '8', '9']
```

This is not the expected order for humans, who would expect:

```
['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']
```

This package solves this issue by implementing natural sorting, where numbers within strings are treated as actual numbers rather than individual characters.

## Installation

```bash
pip install django-natural-sort
```

## Usage

### In Django REST Framework Views

```python
from django_natural_sort.filters import NaturalOrderingFilter

class MyModelViewSet(viewsets.ModelViewSet):
    queryset = MyModel.objects.all()
    serializer_class = MyModelSerializer
    filter_backends = [NaturalOrderingFilter]
    ordering_fields = ['id', 'name', 'version']
```

This automatically applies natural sorting to any `CharField`, `EmailField`, or `TextField` in your model when used in ordering. Just use the standard ordering parameter:

```
GET /api/mymodel/?ordering=version
```

## Features

- **Efficient**: Uses database ordering for non-string fields, only falls back to Python sorting when necessary
- **Compatible**: Works with Django 3.2+ and Django REST Framework 3.11.1+
- **Lightweight**: No external dependencies
- **Flexible**: Works with various string field types (CharField, TextField, EmailField)
- **Robust**: Handles edge cases like mixed types, None values, and more

## How It Works

The package detects which fields in your model are string fields. When ordering by these fields, it uses a natural sorting algorithm that correctly handles numbers embedded in strings.

For non-string fields, it uses the database's built-in ordering mechanism for optimal performance.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the LICENSE file for details.
weeknotebot 1.0.0
A bot for generate WeekNote for Hugo
Requires Python: >=3.13

# WeekNote Bot

This is a little script for generate a WeekNote for your Hugo static site.

## Run it

You launch after installing with

``` bash
weeknote
```

if you have your config at **~/.config/weeknote_bot/config.json** or you can run the command with the path of the config

``` bash
weeknote -config <path-of-the-config>
```

If it is the first time you run it, it will generate a black config and end the execution of the program
konch 6.0.1
CLI and configuration utility for the Python shell, optimized for simplicity and productivity.
Requires Python: >=3.9

=====
konch
=====

.. image:: https://badgen.net/pypi/v/konch
  :alt: pypi badge
  :target: https://pypi.org/project/konch/

.. image:: https://github.com/sloria/konch/actions/workflows/build-release.yml/badge.svg
  :alt: ci status
  :target: https://github.com/sloria/konch/actions/workflows/build-release.yml

.. image:: https://readthedocs.org/projects/konch/badge/
   :target: https://konch.readthedocs.io/
   :alt: Documentation


Configures your Python shell
============================

**konch** is a CLI and configuration utility for the Python shell, optimized for simplicity and productivity.

- **Automatically import** any object upon startup
- **Simple**, per-project configuration in a single file (it's just Python code)
- Uses **IPython**, **BPython**, or **ptpython** if available, and falls back to built-in interpreter
- Automatically load **IPython extensions**

.. image:: https://user-images.githubusercontent.com/2379650/51432821-2ce68180-1c0c-11e9-9c8d-8053a1b99818.gif
    :alt: Demo
    :target: https://konch.readthedocs.io


`https://konch.readthedocs.io <https://konch.readthedocs.io>`_
==============================================================
cdt-path 2.3.0
Constrainted Delaunay Triangle for path-planning

# 使用约束Delaunay三角来寻路
# Using Constrained Delaunay Triangle for path-planning

## 快速使用 Quick start：
``` bash
pip install cdt_path
```
``` python
import cdt_path.demo # 尝试用鼠标左键点击，对功能的直观认识
```

``` python
#import cdt_path.demo # 等价于如下代码
import matplotlib.pyplot as plt
import cdt_path as cdt
import matplotlib.tri as tri

fig ,ax = plt.subplots(figsize=(14,8))

floor = {"vertices":[],
    "segments":[],
    "holes": []
    }

cc  = cdt.triangulate(floor)
# cc  = cdt.triangulate(floor, 'pD') # 使用CCDT
# cc  = cdt.triangulate(floor, 'pDc') # 使用CCDT，并且使用凸包

cdt.border.plot(ax, **cc) # 绘制红色约束边

triang = tri.Triangulation(cc['vertices'][:,0],cc['vertices'][:,1],cc['triangles']) # 转换成matplotlib的格式

cdt.Interact(ax, triang) # 开启交互界面
plt.show()
```

## 功能特点 Features
``` python
import cdt_path as cdt # 建议取别名导入
```
### 三角剖分支持 Triangulation Support：
库提供了对二维空间中的点集进行三角剖分的功能，这些三角形可以作为寻路的基础网格。
自主实现了Delaunay三角剖分的外增量算法，以及各种凸包算法。
支持调用triangle库以实现约束Delaunay三角剖分或者“约束一致的Delaunay三角剖分”以及其他剖分方式。


The library supports triangulating a set of points in 2D space, and the resulting triangular grid can serve as the basis for pathfinding.
The library independently implements the incremental algorithm for Delaunay triangulation and is compatible with various convex hull algorithms.
Additionally, the library provides the ability to call the triangle library to achieve constrained Delaunay triangulation or "constrained conforming Delaunay triangulation" and other triangulation methods.

### 高效寻路算法 Efficient Pathfinding Algorithm：
``` python
#came_from, cost_so_far = a_star_search_G(triang, start, goal) # 只使用起点终点所在三角形的重心作为代表
came_from, cost_so_far = cdt.pathplan.a_star_P(triang, start_point, goal_point, start=None, goal=None)

#L_apex = cdt.pathplan.funnel_slow(apex, Pl, Pr, Li)
L_apex = cdt.pathplan.funnel(apex, Pl, Pr, Li)
```
基于三角剖分的网格，库实现了A*算法，能够快速找到两点之间的三角形通路。
自研快速漏斗算法，以在三角形通路中找到具体直线段路径。
同时保留了简单漏斗算法，用以测试比较。

Based on the triangular grid, the library integrates the A* algorithm to quickly find a triangular path between two points.
The library also develops a fast funnel algorithm to determine the specific line segment path within the triangular path.

### 障碍物标记 Obstacle Marking：
``` python
border = cdt_path.load("XXXX.json")
```
以平面直线图刻画障碍物，库内部支持画图功能，支持将绘制的平面直线图保存为json格式。
同时支持用户自定义扩展格式。

The library supports using planar line graphs to depict obstacles and has built-in drawing functionality that allows saving the drawn planar line graphs in JSON format. It also supports user-defined extended formats

### 接口友好 User-friendly Interface：
提供了易于使用的API接口，方便开发者集成到项目中。

The library provides concise and easy-to-use API interfaces, making it convenient for developers to integrate into their projects.
powcaptcha 0.2.0
基于工作量证明的验证码系统 - Python客户端
Requires Python: >=3.10

## Python 客户端

### 安装

```bash
pip install powcaptcha
```

### 接入

```python
from powcaptcha import PowCaptcha
captcha = PowCaptcha("http://localhost:8000") # 填写服务端地址，实例化类
token = captcha.solve() # 自动完成验证码，成功返回token否则为None
```