semvec/pypi-packages huggingface dataset:
shinynx 0.1.1
Backend an nginx server with multiple copies of a shiny app for load balancing
Requires Python: >=3.10

# sticky nginx sessions and shiny

If you want to self-host your py-shiny app and your frontend is nginx this repo
shows how to configure multiple shiny instances for the backend (to handle e.g. load).

This package hooks the import of the shiny app to augment it with a cookie that nginx can use
to target a unique backend.

Shiny uses websockets so of course if you are behind - say - a CloudFlare firewall then this might not work
at *all* unless websocket traffic has been enabled.


## An example

The shiny `testapp` is based on the [load balancer example](https://github.com/posit-dev/py-shiny/blob/7ba8f90a44ee25f41aa8c258eceeba6807e0017a/examples/load_balance/app.py) from the py-shiny github and can
test the correctness of the setup.

Run a foreground nginx process on port 8080 with

```bash
nginx -c $(realpath .)/templates/sticky.conf
```
It assumes there are 4 unix domain socket endpoints `app{n}.sock` in this directory.

Now run multiple background shiny instances:

```bash
# start 4 uvicorn processes holding one testapp shiny instance each
python -m shinynx.run --workers=4 testapp.core
# OR try the express version
python -m shinynx.run --workers=4 --express testapp.express
```

This serves as a substitute for `shiny run testapp.core`

You will now see `app{n}.sock` files appear in this directory. These are the endpoints for each
of 4 shiny instances. (See the `--uds` option for `uvicorn`)


You can fire up multiple browser tabs to hit this website concurrently with:

```bash
# fire up 10 browser tabs looking at http://127.0.0.1:8080
python -m testapp.browser -n10
```

Note, we use unix domain sockets because they are safer (no direct internet access) and it is also
easier to isolate the endpoints to the directory where the code resides.

## Rationale

Shiny requires a "stickyness" i.e. it must always communicate with the *same* background
shiny instance. So the cookie setup in `shinynx/sticky.py` is the crucial enhancment required along with
the `hash $cookie_sticky consistent;` nginx configuration option.

The nginx load balancer should ensure that the processes are "sticky" using a
random "sticky" cookie. There are possibly better solutions if you have the "plus" version of nginx. But
this works with the open source version.

See [the shiny docs](https://shiny.posit.co/py/docs/deploy-on-prem.html#other-hosting-options).


Currently we set our cookie *value* to the uvicorn endpoint value (e.g. `app1.sock` or `app2.sock` etc.).
**But** there is no guarantee that nginx will initially map a cookie value of `app1.sock` to the
`app1.sock` process (it's a hash after all!).
hand-gesture-volume-control 0.1.0
التحكم في حجم الصوت من خلال حركة اليد باستخدام MediaPipe و pycaw
Requires Python: >=3.7

# Hand Gesture Volume Control

مكتبة Python للتحكم في مستوى صوت النظام باستخدام إيماءات اليد عبر MediaPipe و pycaw.

## المتطلبات
- opencv-python
- mediapipe
- pycaw
- comtypes

## الاستخدام
```python
import hand_gesture_volume_control
```

يشغّل الكود كاميرا ويب ويتعرف على الإيماءات للتحكم في الصوت وكتمه.
nextperm 0.1.1
A Python library for next permutation and combinatorial utilities inspired by C++ STL and Java Collections.
Requires Python: >=3.6

# nextperm

A Python library inspired by C++ STL and Java Collections that provides utilities for next permutation, combinations, sorting helpers, and more.

## ðŸš€ Features

- `next_permutation`, `prev_permutation`
- `rotate_left`, `rotate_right`
- `is_sorted`, `is_sorted_until`
- `lower_bound`, `upper_bound`
- `nth_permutation`, `count_permutations`
- `nCr`, `nPr`, `factorial`
- `shuffle`, `swap`, `reverse`

## ðŸ§ª Example Usage

```python
from nextperm import next_permutation, nth_permutation

print(next_permutation([1, 2, 3]))  # [1, 3, 2]
print(nth_permutation([1, 2, 3], 4))  # [2, 3, 1]
macrokeyd 0.1.11
Macro daemon for dedicated keyboards
Requires Python: >=3.7

<file name=0 path=/home/nhomar/Source/macrokeyd/README.md># macrokeyd

`macrokeyd` is a Python daemon that allows assigning custom actions to a specific keyboard, such as commands, text, system shortcuts, or chained sequences. It is designed to run as a `systemd` service and configured through modular JSON files.

---

## 🚀 Quick Installation from PyPI

```bash
pip install macrokeyd
```

> Requires Python >= 3.7 and Linux with `evdev` support.

---

## 🧪 Testing Installation

```bash
macrokeyd --help
macrokeyd --version
```

You can start the daemon with:

```bash
macrokeyd --run
```

> By default, it searches for `~/.local/share/macrokeyd/default.json` and creates it if it doesn't exist.

---

## ⚙️ Installing as a systemd service

```bash
macrokeyd-install-service
```

Check the status:

```bash
systemctl status macrokeyd
```

Uninstall:

```bash
macrokeyd-uninstall-service
```

### 📌 Installation with System Python (Recommended for Gtk Integration)

If you're using Gtk integration (such as PyGObject), it's recommended to use the system Python to avoid compatibility issues:

```bash
sudo apt install python3 python3-pip python3-venv python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-appindicator3-0.1
```

> Also, install Tkinter for MouseInfo support, which requires system-level libraries:

```bash
sudo apt install python3-tk python3-dev
```

```bash
pyenv virtualenv --system-site-packages system macrokeyd-env
pyenv local macrokeyd-env
pip install macrokeyd
```

Verify the installation:

```bash
python -c "import gi; print(gi.__file__)"
```

The output should resemble:

```
/usr/lib/python3/dist-packages/gi/__init__.py
```

---

## 🎛️ Macro Configuration

The configuration file is located at (or created at):

```
~/.local/share/macrokeyd/default.json
```

Example content:

```json
{
  "meta": {
    "target_device_name": "TEC-FX556K"
  },
  "macros": {
    "KEY_Q": {"action": "command", "value": "gnome-terminal"},
    "KEY_W": {"action": "text", "value": "Hello world"}
  }
}
```

---

## 🧱 Local Development

```bash
git clone https://gitlab.com/your_user/macrokeyd.git
cd macrokeyd
make install
```

---

## 🛠 Useful Commands (`make`)

- `make build` → generates `.whl` and `.tar.gz` packages
- `make install` → installs locally with `--force-reinstall`
- `make clean` → cleans up artifacts
- `make release LEVEL=patch` → bumps version and pushes
- `make release-changelog` → same as `release` and updates `CHANGELOG.md`
- `make release-pypi` → publishes to PyPI
- `make release-test` → publishes to TestPyPI

---

## 📦 Publishing to PyPI

Check [RELEASE.md](./RELEASE.md) for the full versioning and release cycle details.</file>
mcp-server-gad 0.0.4
A secure MCP server that provides a read-only PostgreSQL query tool for gad.
Requires Python: >=3.10

# mcp-server-gad MCP server

A secure MCP server that provides a read-only PostgreSQL query tool for gad.

## Components

### Resources

The server implements a simple note storage system with:
- Custom note:// URI scheme for accessing individual notes
- Each note resource has a name, description and text/plain mimetype

### Prompts

The server provides a single prompt:
- summarize-notes: Creates summaries of all stored notes
  - Optional "style" argument to control detail level (brief/detailed)
  - Generates prompt combining all current notes with style preference

### Tools

The server implements one tool:
- add-note: Adds a new note to the server
  - Takes "name" and "content" as required string arguments
  - Updates server state and notifies clients of resource changes

## Configuration

[TODO: Add configuration details specific to your implementation]

## Quickstart

### Install

#### Claude Desktop

On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
On Windows: `%APPDATA%/Claude/claude_desktop_config.json`

<details>
  <summary>Development/Unpublished Servers Configuration</summary>
  ```
  "mcpServers": {
    "mcp-server-gad": {
      "command": "uv",
      "args": [
        "--directory",
        "/app/mcp-server-gad",
        "run",
        "mcp-server-gad"
      ]
    }
  }
  ```
</details>

<details>
  <summary>Published Servers Configuration</summary>
  ```
  "mcpServers": {
    "mcp-server-gad": {
      "command": "uvx",
      "args": [
        "mcp-server-gad"
      ]
    }
  }
  ```
</details>

## Development

### Building and Publishing

To prepare the package for distribution:

1. Sync dependencies and update lockfile:
```bash
uv sync
```

2. Build package distributions:
```bash
uv build
```

This will create source and wheel distributions in the `dist/` directory.

3. Publish to PyPI:
```bash
uv publish
```

Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token: `--token` or `UV_PUBLISH_TOKEN`
- Or username/password: `--username`/`UV_PUBLISH_USERNAME` and `--password`/`UV_PUBLISH_PASSWORD`

### Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging
experience, we strongly recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector).


You can launch the MCP Inspector via [`npm`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) with this command:

```bash
npx @modelcontextprotocol/inspector uv --directory /app/mcp-server-gad run mcp-server-gad
```


Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
mcp-chess 0.1.9
MCP server for playing chess against AI
Requires Python: >=3.11

# MCP Chess Server

This MCP let's you play chess against any LLM.

## Installation

To use this chess server, add the following configuration to your MCP config:

```json
{
  "mcpServers": {
    "chess": {
      "command": "uvx",
      "args": [
        "mcp-chess"
      ]
    }
  }
}
```

## Usage

Play a game:
![Chess starting position with black pieces](screenshots/start_black.png)

![A few moves later](screenshots/acc_dragon.png)

Find a position in a PGN for game analysis:

![Find a position in a PGN](screenshots/find_position.png)

## Available Tools

The server provides the following tools:

*   `get_board_visualization()`: Provides the current state of the chessboard as an image. The board orientation automatically flips based on the user's assigned color.
*   `get_turn()`: Indicates whose turn it is ('white' or 'black').
*   `get_valid_moves()`: Lists all legal moves for the current player in UCI notation (e.g., 'e2e4', 'g1f3'). Returns an empty list if the game is over.
*   `make_move(move_san: str)`: Makes a move on the board using Standard Algebraic Notation (SAN) (e.g., 'e4', 'Nf3', 'Bxe5'). Returns the move in SAN and UCI, the new board FEN, and game status.
*   `new_game(user_plays_white: bool = True)`: Starts a new game, resetting the board. By default, the user plays white. Sets the user's color for board orientation. Returns a confirmation message.
*   `find_position_in_pgn(pgn_string: str, condition: str)`: Finds the first board position in a PGN string matching a condition (e.g., "bishop on a3") and returns an image of that board state. The condition format is "piece_type on square_name". Valid piece types are "pawn", "knight", "bishop", "rook", "queen", "king".
contentspark 0.1.2
Fetch responses from GCP Discovery Engine (Agent Builder Chat App)
Requires Python: >=3.6

# chat-content

Fetch full search responses from GCP Discovery Engine (Agent Builder Chat App).

## Features

- Queries Discovery Engine using GCP's `google-cloud-discoveryengine` API
- Supports snippet and summary fetching
- Clean function-based interface

## Installation

```bash
pip install chat-content
kajiki 1.0.2
Fast XML-based template engine with Genshi syntax and Jinja blocks
Requires Python: >=3.8
Keywords: chameleon, engine, genshi, html, jinja, jinja2, mako, template, templating, xhtml, xml

Kajiki provides fast well-formed XML templates
==============================================

Because Kajiki's input is XML, it can ensure that your HTML/XML output is
well-formed. The Genshi-like syntax, based on XML attributes or tags, is simply
beautiful and easily understood (or ignored) by web designers.
But instead of the slow performance of Genshi_, Kajiki compiles
templates to Python code that renders with blazing-fast speed, so Kajiki can
compete with the speed of Jinja_, Mako_, Chameleon_ and others.
Also, one of Genshi's misfeatures -- py:match -- is replaced with blocks which
work like Jinja's blocks.

By combining the best ideas out there -- XML input,
Genshi's syntax and features, Jinja's template inheritance and final
compilation to Python --, Kajiki is ready to become
the most widely used templating engine for web development in Python.
And more features are coming soon; stay tuned!

Example
=======

.. code:: python

    >>> import kajiki
    >>> Template = kajiki.XMLTemplate('''<html>
    ...     <head><title>$title</title></head>
    ...     <body>
    ...         <h1>$title</h1>
    ...         <ul>
    ...             <li py:for="x in range(repetitions)">$title</li>
    ...         </ul>
    ...     </body>
    ... </html>''')
    >>> print(Template(dict(title='Kajiki is teh awesome!', repetitions=3)).render())
    <html>
        <head><title>Kajiki is teh awesome!</title></head>
        <body>
            <h1>Kajiki is teh awesome!</h1>
            <ul>
                <li>Kajiki is teh awesome!</li><li>Kajiki is teh awesome!</li><li>Kajiki is teh awesome!</li>
            </ul>
        </body>
    </html>


Links
=====

Documentation_

Kajiki is licensed under an MIT-style license_.

The git repository and `issue tracker`_ are at GitHub_. Previously the project
used SourceForge_ for the hg repository, issue tracker and forums.


.. _Documentation: https://docs.kajiki.io/
.. _license: https://github.com/jackrosenthal/kajiki/blob/master/LICENSE.rst
.. _`issue tracker`: https://github.com/jackrosenthal/kajiki/issues
.. _GitHub: https://github.com/jackrosenthal/kajiki
.. _SourceForge: http://sourceforge.net/p/kajiki/
.. _Genshi: https://pypi.python.org/pypi/Genshi
.. _Jinja: https://pypi.python.org/pypi/Jinja2
.. _Mako: https://pypi.python.org/pypi/Mako
.. _Chameleon: https://pypi.python.org/pypi/Chameleon
makehlp 0.1.2
makehlp
Requires Python: >=3.11

# makehlp (make help)

Always-available script to analyze any unknown makefile and print out an inferred usage/help message explaining the available targets. Compatible with many various inconsistent types of makefile comment patterns found in the wild.

Many versions of this concept exist.. but this one is mine.

## Example output

```
$ makehlp
Usage: make [TARGET]
Targets:
  clean
  _lint_autofixing           run the linters that support autofixing, with autofixing enabled
  _lint_autofixing_disabled  run the linters that support autofixing, but with autofixing disabled
  _lint_nonautofixing        run the linters that don't support autofixing
  lint
  auto
  test_py
  test_that_build_is_clean
  test_ci                    Smaller testsuite for CI until I bother to fix the CI environment to run postgres etc.
  test_packaging             test installing the package fresh on a new computer, using docker
  coverage
  docs                       Generate Sphinx HTML documentation, including API docs
  servedocs                  Autoreload docs
  release                    Build and release to PyPI
```