semvec/pypi-packages huggingface dataset:
pygris 0.2.1
Download and use US Census Bureau TIGER/Line Shapefiles and other data resources in Python
Requires Python: >=3.7

## pygris

__pygris__ is a Python package to help users access US Census Bureau TIGER/Line and cartographic boundary shapefiles and load them into Python as GeoDataFrames.  The goal of the package is to make it simple to access US Census geographic data; data can be acquired with a single function for a given geography (e.g. `tracts()` for Census tracts) along with a few options.  

The package is a general port of the [R __tigris__ package](https://github.com/walkerke/tigris) with a few modifications.  The framework of and philosophy behind the __tigris__ package is covered in [Chapter 5 of my book, _Analyzing US Census Data: Methods, Maps and Models in R_](https://walker-data.com/census-r/census-geographic-data-and-applications-in-r.html).  

Install __pygris__ from PyPI with the following command:

```bash
pip install pygris

# For optional dependencies to support interactive examples in the documentation:
# pip install pygris[explore]
```

Or via `conda-forge` with:

```bash
conda install pygris

# For optional dependencies to support interactive examples in the documentation:
# conda install "pygris[explore]"
```

Alternatively, install the development version from GitHub:

```bash
pip install git+https://github.com/walkerke/pygris.git
```

Support for installation with `conda` is forthcoming.

Read the following articles for more information on how to use the package:

* [Basic usage of pygris](https://walker-data.com/pygris/01-basic-usage)
* [Working with geometries in pygris](https://walker-data.com/pygris/02-geometries)
* [Data utilities in pygris](https://walker-data.com/pygris/03-data-utilities)
* [Geocoding and custom filters in pygris](https://walker-data.com/pygris/04-geocoding)
lcl-xhs-mcp 0.4.3
A Model Context Protocol (MCP) server for Xiaohongshu (Little Red Book) automation
Requires Python: >=3.8

# xhs-mcp

一个小红书的 MCP 服务器，支持通过对话的方式进行账号登陆、文案生成、以及自动发布。相比于已有的实现，优势在于登陆账号以及文案发布全部可以在对话过程中自动实现，并能支持多个账号批量发布文案。此外，在调用发表文章的接口时，该工具还支持自动根据文案内容生成小红书配图。

## 原理

使用浏览器模拟的方式，通过 Chrome 驱动启动浏览器，来自动进行账号登录（会发送验证码到手机上），以及发布文案。登录后，会将 Cookie 保存下来，之后发布文章就不再需要重新登录了。项目已集成 webdriver-manager，无需手动下载和配置 Chrome 驱动，只需下载并安装 Chrome 浏览器本体即可（下载地址：https://www.google.com/intl/zh-CN/chrome/）。

## 示例

<img src="https://github.com/user-attachments/assets/6df5e84e-449a-42a6-ad87-23ed2eb67124" alt="Snipaste_2025-06-04_17-40-50" width="50%">

## 环境配置

1. 确保系统已安装 Chrome 浏览器（项目会自动管理对应的驱动程序，不需要手动下载驱动程序，只要手动下载并安装浏览器本体即可），下载地址（https://www.google.com/intl/zh-CN/chrome/）
2. 安装 uv

```
pip install uv # 注意，如果使用anaconda进行环境管理，需要在base环境中pip
```

## 启动服务器

在发布图文时，必须有一张配图才可以发布。所以在调用发布文案工具时会自动根据文案生成一张小红书风格的配图。在生成小配图时，用到了 DeepSeek 的 chat 模型，所以需要配置 DEEPSEEK_API_KEY 这个环境变量。如果需要切换到其它模型，请配置 BASE_URL 环境变量，默认为 DEEPSEEK 的地址。

### 方式 1：直接运行命令

```
env DEEPSEEK_API_KEY=xxxx uvx --from lcl_xhs_mcp@latest xhs-server
```

若切换模型:

```
env DEEPSEEK_API_KEY=xxxx BASE_URL=xxxx uvx --from lcl_xhs_mcp@latest xhs-server
```

为避免冗长，下面的方式介绍中会省略掉 BASE_URL 环境变量的配置。

### 方式 2: 配置文件运行

在配置文件中添加

```
{
  "mcpServers": {
    "xhs": {
      "command": "env",
      "args": [
        "DEEPSEEK_API_KEY=xxxx",
        "uvx",
        "--from",
        "lcl_xhs_mcp@latest",
        "xhs-server"
      ]
    }
  }
}
```

### 方式 3: 源码安装并运行

这种方式能够获得最新的代码。

```
git clone https://github.com/SoftEgLi/xhs-mcp.git
cd xhs-mcp
pip install -e . # 注意，如果安装了anaconda，需要在base环境中进行pip
```

MCP 配置文件:

```
{
  "mcpServers": {
    "xhs-test": {
      "command": "xhs-server",
      "args": [],
      "env": {
        "DEEPSEEK_API_KEY": "xxxx"
      }
    }
  }
}
```

## 注意事项

Cookie 的有效期是一个月，如果你自己在网页上登录了小红书，那么之前的 Cookie 有可能会失效，失效后在发布文章时，会重新走一遍 MCP 的登录流程。

## 开源协议

使用 MIT 协议。
powerchord 0.4.14
Concurrent CLI task runner
Requires Python: >=3.14
Keywords: task runner, cli utility, concurrency

# Powerchord: Concurrent CLI task runner

[![Poetry](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/githuib/powerchord/master/assets/logo.json)](https://pypi.org/project/powerchord)
[![PyPI - Version](https://img.shields.io/pypi/v/powerchord)](https://pypi.org/project/powerchord/#history)
[![PyPI - Python Versions](https://img.shields.io/pypi/pyversions/powerchord)](https://pypi.org/project/powerchord)

## Installation

```commandline
pip install powerchord
```

## Usage

Run a number of tasks:

```commandline
$ powerchord -t "ruff check ." pytest mypy
✔ ruff check .  21.075 ms
✔ mypy          166.433 ms
✔ pytest        187.096 ms
```

Tasks can be labeled by passing them as NAME=COMMAND values:

```commandline
$ powerchord -t lint="ruff check ." test=pytest typing=mypy
To do:
• lint    ruff check .
• test    pytest
• typing  mypy

Results:
✔ lint    48.452 ms
✔ typing  202.403 ms
✔ test    286.231 ms
```

Verbosity can be specified for all output, for successful tasks and for failed tasks by setting log levels:

```commandline
$ powerchord -t "ruff chekc ." pytest mypy -l all=info success=info fail=error
✘ ruff chekc .  126.852 ms
chekc:1:1: E902 No such file or directory (os error 2)
Found 1 error.

✔ pytest        255.197 ms
..                                                                       [100%]
2 passed in 0.03s

✔ mypy          542.490 ms
Success: no issues found in 11 source files


✘ Failed tasks: ['ruff chekc .']
```

For all options see the help:

```commandline
powerchord -h
```

Config can also be specified in `pyproject.toml`:

Tasks:
```toml
[tool.powerchord]
tasks = ["command --arg", "...", "..."]
```

Labeled tasks:
```toml
[tool.powerchord.tasks]
task = "command --foo bar /path/to/happiness"
other-task = "..."
you-get-the-idea = "..."
```

Log levels:
```toml
[tool.powerchord.log_levels]
all = "info" # "debug" | "info" | "warning" | "error" | "critical" | ""
success = "" # log level of successful task output
fail = "error" # log level of failed task output 
```
invar-runtime 1.3.0
Lightweight runtime contracts for Invar projects
Requires Python: >=3.11
Keywords: contracts, design-by-contract, runtime, validation

# invar-runtime

Lightweight runtime contracts for Python projects using Invar.

## Installation

```bash
pip install invar-runtime
```

## Usage

```python
from invar_runtime import pre, post, Contract, NonEmpty, Positive

# Use built-in contracts
@pre(NonEmpty)
def first(xs: list) -> int:
    return xs[0]

# Create custom contracts
Even = Contract(lambda x: x % 2 == 0, "even")

@pre(Positive & Even)
def half(n: int) -> int:
    return n // 2

# Compose contracts
@post(NonEmpty)
def get_items() -> list:
    return [1, 2, 3]
```

## Available Contracts

### Collections
- `NonEmpty` - Collection has at least one element
- `Sorted` - Elements are in sorted order
- `Unique` - No duplicate elements
- `SortedNonEmpty` - Both sorted and non-empty

### Numbers
- `Positive` - Greater than zero
- `NonNegative` - Greater than or equal to zero
- `Negative` - Less than zero
- `InRange(lo, hi)` - Value in [lo, hi]
- `Percentage` - Value in [0, 100]

### Strings
- `NonBlank` - Non-empty and not just whitespace

### List Elements
- `AllPositive` - All elements > 0
- `AllNonNegative` - All elements >= 0
- `NoNone` - No None values

## Decorators

- `@must_use(reason)` - Mark return value as must-use
- `@must_close` - Mark class as requiring explicit cleanup
- `@strategy(**params)` - Specify Hypothesis strategies
- `@skip_property_test(reason)` - Skip property-based testing (**reason required**)

### Skip Property Test Usage

The `@skip_property_test` decorator requires a reason explaining why the function cannot be property-tested. Guard warns if used without justification.

```python
# ✅ Good - with reason
@skip_property_test("no_params: Zero-parameter function, no inputs to vary")
def get_version() -> str:
    return "1.0.0"

# ❌ Bad - Guard warns about missing reason
@skip_property_test
def my_func(): ...
```

**Valid reason categories:**
- `no_params:` - Function has no parameters to test
- `strategy_factory:` - Returns Hypothesis strategy, not testable data
- `external_io:` - Requires database/network/filesystem
- `non_deterministic:` - Output depends on time/random state

## Loop Invariants

```python
from invar_runtime import invariant

while lo < hi:
    invariant(0 <= lo <= hi <= len(arr), "bounds check")
    mid = (lo + hi) // 2
    ...
```

## Development Tools

For static analysis and verification tools, install `invar-tools`:

```bash
pip install invar-tools
# or use without installing:
uvx invar-tools guard
```

## License

Apache-2.0
havsalt-little-termite 0.1.3
Terminate command output, by controlling this little hungry and human-looking termite
Requires Python: >=3.13

# Little Termite

Terminate command output, by controlling this little hungry and human-looking termite.

![One of the commands to run the game](./images/command.png)
![Image of how the game looks](./images/in_game.png)

## Installation

Before installing `little-termite`, make sure to have a `Rust compiler` available.
You can use `rustc` through [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html). This is for compiling `charz-rust`, which results in faster rendering.

### Using [pipx](https://github.com/pypa/pipx)

The easist way to start terminating command output, is to install using `pipx`:

```console
pipx install havsalt-little-termite
```

Then, feed `little-termite` the output of your favorite command!

```console
ipconfig | little-termite
```

You can also try using other commands like `ls`, `grep` and `cat`.
It is *more fun* when the output contains **many lines**.

### Using [git clone](https://git-scm.com/downloads) and [rye](https://rye.astral.sh/guide/installation)

Make sure you have `git` and `rye` installed.

Then, run the following steps.

```console
git clone https://github.com/havsalt/little-termite.git
cd little-termite
rye sync
ipconfig | rye run little-termite
```

You can use a different command other than `ipconfig` if you wish. Again, it should output a decent amount of lines, so it's more lines to terminate.

## Controls

Keyboard controls for moving the little human-looking termite.

- Move sideways using `a` and `d`.
- Eat using `f`.
- Jump using `spacebar`.
  - Super jump by using `shift`+`spacebar`.

To exit the game, use `escape`.

## Rational

This small little command line game was made with my cousin, using `charz`. [charz](https://pypi.org/project/charz) is my Python library that I made for terminal games. It reached release `0.1.0` on **Jun 1, 2025**, and we made `little-termite` to stress test the library, check its capabilities, and uncover some bugs.

## License

MIT