semvec/pypi-packages huggingface dataset:
circular-imports 0.2.0
Detect circular imports in codebase.
Requires Python: >=3.8

# Circular Imports

If you see an error like this:

```
ImportError: cannot import name 'some_module'
```

or 

```
ImportError: cannot import name 'some_module' from partially initialized module 'path.to.module' (most likely due to a circular import)
```

then you have a circular import in your code.

This library helps you to detect circular imports in Python code to fix them.

## Installation

```bash
pip install circular-imports
```

## Usage

### CLI

Example:

```bash
circular-imports path/to/python/project/dir --output output_file.dot --exclude .venv,build
```

Parameters:

- `path`: path to the Python project directory
- `--output`: output file, this can be a [`.dot`](https://graphviz.org/docs/layouts/dot/), [`.mermaid`](https://mermaid.js.org/). When empty, the output will be printed to the console.
- `--exclude`: comma-separated list of directories to exclude from the search

Exits with code 0 if no circular imports are found, 1 otherwise.

### Python

```python
from unittest import TestCase

from circular_imports import cycles_in_path


class TestCircularDeps(TestCase):
    def test_no_cycles(self):
        cycles = cycles_in_path(".", exclude=".venv,build")
        self.assertEqual(cycles, set())
```

## License

MIT
prereq 0.1.0b0
Prereq is a dependency injection library for Python that is uncomplicated, and async-first.
Requires Python: >=3.12

# Prereq

Prereq is a dependency injection library for Python that is uncomplicated, and async-first.

### [Full Documentation Here](https://prereq.readthedocs.io/en/latest/)

## Installation

Use your favorite package manager to install prereq.

```bash
pip install prereq
# Or
uv add prereq
```

## Usage

To get started with Prereq, you just need to create a Provider, and a Resolver. Behavior is inferred based on typing. 

```python
import asyncio
from prereq import provides, Resolver

class User: ...

@provides
def user_factory() -> User:
    return User()

def update_user(user: User) -> None:
    print(f"Updated {user}")

resolver = Resolver()
resolver.add_providers(user_factory)

async def main() -> None:
    async with resolver.resolve(update_user) as kwargs:
        update_user(**kwargs)

asyncio.run(main())

```

## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

Pull requests must pass ruff, and avoid ignoring pyright errors (but it may be needed, I understand.). You may need to add tests to maintain Prereq's 100% coverage.

## License

Prepreq is free and open source using the [MIT](LICENSE.md) license.
scmg 1.0.4
Single cell manifold generator
Requires Python: >=3.8

[![PyPI](https://img.shields.io/pypi/v/scmg.svg)](https://pypi.org/project/scmg)
[![Docs](https://readthedocs.org/projects/SCMG/badge/?version=latest)](https://scmg.readthedocs.io/en/latest/index.html)

# Single Cell Manifold Generator (SCMG)

**SCMG** is a suite of deep learning models designed to interpret, generate, and predict the molecular basis of cell states and their transitions.

## Key Features

- **Global Manifold Construction**  
  Build a well-integrated reference manifold of single-cell transcriptional states that captures cell-state relationships and gene expression patterns.

- **Zero-Shot Dataset Integration**  
  Integrate new scRNA-seq datasets without the need for model retraining.

- **Zero-Shot Cell Projection**  
  Project single-cells onto the global manifold for downstream analysis and comparison.

- **Cell State Trajectory Generation**  
  Generate continuous trajectories to model transitions between cell states.

- **Causal Gene Prediction**  
  Identify candidate causal genes driving transitions between specific cell states.
  
- **Universal Decomposition of Perturbation Effects**  
  Decompose perturbation effects into universal principal axes of cell state transition and perturbation classes. 

- **Few-shot Prediction of Perturbation Effects**  
  Predict perturbation-induced cell state transition by few-shot learning.

## Installation and Tutorials
Full documentation is available at: https://scmg.readthedocs.io/

The scripts to reproduce the results reported in the manuscript are available [here](https://github.com/xingjiepan/SCMG_scripts).
basejump-llama-index-llms-openai 0.3.39.post2
llama-index llms openai integration
Requires Python: <4.0,>=3.9

# LlamaIndex Llms Integration: Openai

## Installation

To install the required package, run:

```bash
%pip install llama-index-llms-openai
```

## Setup

1. Set your OpenAI API key as an environment variable. You can replace `"sk-..."` with your actual API key:

```python
import os

os.environ["OPENAI_API_KEY"] = "sk-..."
```

## Basic Usage

### Generate Completions

To generate a completion for a prompt, use the `complete` method:

```python
from llama_index.llms.openai import OpenAI

resp = OpenAI().complete("Paul Graham is ")
print(resp)
```

### Chat Responses

To send a chat message and receive a response, create a list of `ChatMessage` instances and use the `chat` method:

```python
from llama_index.core.llms import ChatMessage

messages = [
    ChatMessage(
        role="system", content="You are a pirate with a colorful personality."
    ),
    ChatMessage(role="user", content="What is your name?"),
]
resp = OpenAI().chat(messages)
print(resp)
```

## Streaming Responses

### Stream Complete

To stream responses for a prompt, use the `stream_complete` method:

```python
from llama_index.llms.openai import OpenAI

llm = OpenAI()
resp = llm.stream_complete("Paul Graham is ")
for r in resp:
    print(r.delta, end="")
```

### Stream Chat

To stream chat responses, use the `stream_chat` method:

```python
from llama_index.llms.openai import OpenAI
from llama_index.core.llms import ChatMessage

llm = OpenAI()
messages = [
    ChatMessage(
        role="system", content="You are a pirate with a colorful personality."
    ),
    ChatMessage(role="user", content="What is your name?"),
]
resp = llm.stream_chat(messages)
for r in resp:
    print(r.delta, end="")
```

## Configure Model

You can specify a particular model when creating the `OpenAI` instance:

```python
llm = OpenAI(model="gpt-3.5-turbo")
resp = llm.complete("Paul Graham is ")
print(resp)

messages = [
    ChatMessage(
        role="system", content="You are a pirate with a colorful personality."
    ),
    ChatMessage(role="user", content="What is your name?"),
]
resp = llm.chat(messages)
print(resp)
```

## Asynchronous Usage

You can also use asynchronous methods for completion:

```python
from llama_index.llms.openai import OpenAI

llm = OpenAI(model="gpt-3.5-turbo")
resp = await llm.acomplete("Paul Graham is ")
print(resp)
```

## Set API Key at a Per-Instance Level

If desired, you can have separate LLM instances use different API keys:

```python
from llama_index.llms.openai import OpenAI

llm = OpenAI(model="gpt-3.5-turbo", api_key="BAD_KEY")
resp = OpenAI().complete("Paul Graham is ")
print(resp)
```

### LLM Implementation example

https://docs.llamaindex.ai/en/stable/examples/llm/openai/
nut-server-bluetti 0.0.1
NUT Server Bluetti


# nut-server-bluetti
NUT compatible server for Bluetti Powerstations

```bash
usage: bluetti-nut [-h] [-m MAC] [-t TYPE] [-e ENCRYPTION] [-i INTERVAL]

NUT Server for bluetti powerstation

options:
  -h, --help            show this help message and exit
  -m MAC, --mac MAC     Mac-address of the powerstation
  -t TYPE, --type TYPE  Type of the powerstation (AC70 f.ex.)
  -e ENCRYPTION, --encryption ENCRYPTION
                        Add this if encryption is needed
  -i INTERVAL, --interval INTERVAL
                        Set the polling interval in seconds. Defaults to 20
```
daedaluslink 0.1.3
An application that connects to a robot for advanced controls and visualization of data.
Requires Python: >=3.7

# DaedalusLink

[![PyPI version](https://img.shields.io/pypi/v/daedaluslink.svg)](https://pypi.org/project/daedaluslink/)
[![License](https://img.shields.io/badge/license-GPLv3-blue.svg)](LICENSE)
[![Python Version](https://img.shields.io/badge/python-3.7%2B-blue.svg)](https://www.python.org/)

---

**DaedalusLink** is a lightweight Python library for building **robot control GUIs over WebSockets**.  
Robots can expose a JSON-based interface, and DaedalusLink automatically maps it into GUI elements (buttons, sliders, joysticks, etc.).  



## Features

- Simple WebSocket-based protocol (no heavy dependencies)  
- JSON → GUI auto-generation  
- Supports buttons, sliders and joysticks
- Heartbeat signal to detect connection issues


## Installation

```bash
pip install daedaluslink
```

## Quick example
```py
from daedaluslink import DaedalusLink

gui = DaedalusLink(name="R2D2", link_id=1)

gui.add_button("forward", command="MOVE_FORWARD", position=[0, 2], size=[4, 1])
gui.add_button("backward", command="MOVE_BACKWARD", position=[4, 2], size=[4, 1])
gui.add_joystick("move", axes=["X", "Y"], command="move", position=[2, 7], size=[6, 6])
gui.add_slider("Joint 1", command="j1", position=[0, 3], size=[1, 9])
gui.add_slider("Joint 2", command="j2", position=[1, 3], size=[1, 9])

gui.enable_discovery_broadcast(
    udp_port=7777,
    interval=1.0
)

@gui.on("MOVE_FORWARD")
def forward(pressed: bool):
    if pressed:
        print("forward pressed")
    else:
        print("forward released")

@gui.on("MOVE_BACKWARD")
def backward(pressed: bool):
    if pressed:
        print("backward pressed")
    else:
        print("backward released")

@gui.on("move")
def on_move(x: int, y: int):
    print(f"Joystick moved → x={x}, y={y}")

@gui.on("j1")
def sliderj1(x: int):
    print(f"slider j1 moved → {x}")

@gui.on("j2")
def sliderj2(x: int):
    print(f"slider j2 moved → {x}")

gui.run(port=8081)
```

# Message Protocol
- Button press → "MOVE_FORWARD" -> handler gets true
- Button release → "!MOVE_FORWARD" -> handler gets false
- Joystick → "move 120,-30" → handler gets (120, -30)
- Slider → "slider 42" → handler gets 42
- Heartbeat → Client sends {"type":"ack"}, server responds with ack
test_project_pythagoras 0.4
A double entry accounting system in python
Requires Python: >=3.8

<!--[![Pytest](https://img.shields.io/badge/Pytest-fff?logo=pytest&logoColor=000)](https://docs.pytest.org/en/stable/)
[![uv](https://img.shields.io/badge/Managed_by_uv-8333E9?logo=python&logoColor=fff&labelColor=8333E9)](#)-->
# ledge
[![Unit Tests](https://github.com/Chase-Horton/test_ledge/actions/workflows/main.yml/badge.svg)](https://github.com/Chase-Horton/test_ledge/actions/workflows/main.yml)
[![Python](https://img.shields.io/badge/Python-3.8+-gray?logo=python&logoColor=fff&labelColor=3776AB)](https://www.python.org/)

`ledge` is a Python-based accounting framework designed for developers, and businesses who want full ownership of their financial data without the performance bottlenecks of text files or the privacy nightmares of the cloud.
## Philosophy
### The Problem
Currently the accounting software landscape is split into two extremes.
1. *Plain Text Accounting*: tools like `beancount`, `ledger`, `hledger`
  - Pros: Great for version control, easy to understand format
  - Cons: Parsing large histories is slow, data integrity is questionable as it does not rely on any source of truth, stock pricing and stock splits are obtuse and complex, storing historical pricing data in text files is archaic
2. *SaaS/Cloud Accounting*: tools like Quicken, Xero, or Mint
  - Pros: Simple to use, automated transaction recording, accesible anywhere
  - Cons: You do not own your data, exporting can be difficult, and you are subject to changes in pricing or policy
### The Solution
Double Entry accounting is relational by nature, by utilizing a local SQL database we gain:
  - Speed: Standard SQL indexing prevents having to slowly parse large text files
  - Integrity: ACID compliance and foreign key constraints act ensure ledger is balanced at a database level
  - Standardization: No domain specific language needs to be known, its just SQL, and can be analyzed in any of the available SQL client
## Project Goals
1. *Strict Double-Entry Accounting*:Assets + Liabilites + Income + Expense + Equity = 0
2. *Local First*:No backend required, default is SQLite, with support for PostgreSQL or MySQL
3. *Import API*: Robust API for scripting imports from various financial institutions
4. *Command Line Tool*: Tool for quickly producing balance sheets, income statements, and custom reports
5. *Commodity Pricing*: Associate a commodity price with a ticker to have market value reflected on historical charts automatically.
extract-emails 6.1.0
Extract email addresses and linkedin profiles from given URL.
Requires Python: <3.15,>=3.10
Keywords: email, linkedin, parser

# Extract Emails

![Image](https://github.com/dmitriiweb/extract-emails/blob/docs_improvements/images/email.png?raw=true)

[![PyPI version](https://badge.fury.io/py/extract-emails.svg)](https://badge.fury.io/py/extract-emails)

Extract emails and linkedins profiles from a given website

[Documentation](https://dmitriiweb.github.io/extract-emails/)

## Requirements

- Python >= 3.10

## Installation

```bash
pip install extract_emails[all]
# or
pip install extract_emails[httpx]
# or
pip install extract_emails[playwright]
playwright install chromium --with-deps
```

## Quick Usage
### As library

```python
from pathlib import Path

from extract_emails import DefaultWorker
from extract_emails.browsers import ChromiumBrowser, HttpxBrowser
from extract_emails.models import PageData

def main():
    with ChromiumBrowser() as browser:
        worker = DefaultWorker("https://example.com, browser)
        data = worker.get_data()
        PageData.to_csv(data, Path("output.csv"))

    with HttpxBrowser() as browser:
        worker = DefaultWorker("https://example.com, browser)
        data = worker.get_data()
        PageData.to_csv(data, Path("output.csv"))

async def main():
    async with ChromiumBrowser() as browser:
        worker = DefaultWorker("https://example.com, browser)
        data = await worker.aget_data()
        await PageData.to_csv(data, Path("output.csv"))

    async with HttpxBrowser() as browser:
        worker = DefaultWorker("https://example.com, browser)
        data = await worker.aget_data()
        await PageData.to_csv(data, Path("output.csv"))

```
### As CLI tool
```bash
$ extract-emails --help

$ extract-emails --url https://en.wikipedia.org/wiki/Email -of output.csv
$ cat output.csv
email,page,website
bob@b.org,https://en.wikipedia.org/wiki/Email,https://en.wikipedia.org/wiki/Email
```
patatt 0.7.0
A simple library to add cryptographic attestation to patches sent via email
Requires Python: >=3.8
Keywords: git, patches, attestation, email, workflow

patatt: cryptographic patch attestation for the masses
======================================================

Patatt is a Python library and CLI for adding end-to-end cryptographic
attestation to patches sent via email. It adapts the DKIM email signature
standard to include cryptographic signatures via the ``X-Developer-Signature``
header.

If your project workflow doesn't use patches sent via email, then you
don't need this and should simply start signing your tags and commits.

Features
--------

- DKIM-like signature headers that don't corrupt patch content
- Multiple signing algorithms: ed25519, OpenPGP, OpenSSH
- In-repository keyring management via git refs
- Automatic signing via git sendemail-validate hook

Installation
------------

Install using pipx (recommended)::

    pipx install patatt

Or with pip::

    pip install --user patatt

Quick Start
-----------

Generate a new ed25519 signing key::

    patatt genkey

Sign a patch::

    git format-patch -1 --stdout | patatt sign > signed.patch

Validate a signed patch::

    patatt validate signed.patch

Documentation
-------------

Full documentation is available at https://patatt.docs.kernel.org

Contributing
------------

Please send patches and support requests to tools@kernel.org.

Submissions must be made under the terms of the Linux Foundation
certificate of contribution and should include a Signed-off-by line.
See the DCO file for details.
promptable-traceback 1.0.0
Python package that optimises AI-assisted coding.
Requires Python: >=3.7

# PromptableTraceback


## Overview

PromptableTraceback is a lightweight Python debugging library designed to optimise AI-assisted coding.

**Why use it?** When code fails, you typically spend a couple minutes gathering relevant lines of code, checking variable states, and copying the traceback into an LLM to help you debug. This library automates that process by capturing the "state of the world" at the exact moment of failure and formatting it into a clean, LLM-ready report.


## Installation

Install PromptableTraceback via `pip` from [PyPI](https://pypi.org/project/promptable-traceback/):

```bash
pip install promptable-traceback
```

**Requirements:** 
- Python 3.7+
- Works across Windows, MacOS, and Linux


## Example Usage

**Targeted monitoring:** Use the `@promptable_traceback.catch` decorator to capture errors that occur within a specific function.
```py
import promptable_traceback

@promptable_traceback.catch()  # Initialise locally.
def my_func(var1):
    var1 = int(var1)  # Trigger an error.

my_func("frfr")
```

**Universal monitoring:** Use `promptable_traceback.hook` to capture any unhandled errors across your entire application.
```py
import promptable_traceback

promptable_traceback.hook()  # Initialise globally.

def my_func(var1):
    var1 = int(var1)  # Trigger an error.

my_func("frfr")
```


## API Reference

The following parameters are available for targeted and universal monitoring.

- **`context_window` (int):** The number of lines captured above and below the line of code which errored. Set to 25 by default. Note: This is capped by the boundaries of the function when using the decorator, or the boundaries of the file when using the hook.
- **`mask_secrets` (bool):** When set to True, variables containing sensitive data will have their values redacted. Set to True by default.


## Suggestions & Feedback

I am always looking for ways to make this tool more useful for different development workflows.

If you have ideas for:
- **Alternative invocation:** Different ways to trigger the library into specific frameworks.
- **Tailored reporting:** Ideas for specific report formats that work better for certain LLMs or specialised debugging scenarios.
- **Feature requests:** Anything else that would make your debugging life easier.

Please feel free to open an issue or reach out!
nut-base-server 0.0.1
NUT Base Server


# nut-base-server
NUT compatible server to use with adapters for different UPS-like devices

NUT Server based on [NUT Protocol Docs](https://networkupstools.org/docs/developer-guide.chunked/net-protocol.html) and the [Variables Docs](https://networkupstools.org/docs/developer-guide.chunked/_variables.html)
cider-cli 0.1.7
IP address space visualization (pcap, geofeed, MaxMind)
Requires Python: >=3.10

# cider-cli
https://pypi.org/project/cider-cli/

Cider-cli is a cli tool for producing CIDR maps, also known as "ip census maps", "ip maps", or "address space maps". These are very powerful graphs in your developer tool kit for understanding network traffic and visualizing address space in an organized fashion:
![example-map](https://raw.githubusercontent.com/lramos0/cider-cli/refs/heads/main/documentation/images/example-map.png )
The goal is to solve and visualize complexities in address spaces, trends which may be clearer simply with a little color:
![example-grouped-map](https://raw.githubusercontent.com/lramos0/cider-cli/refs/heads/main/documentation/images/example-grouped-map.png)

## Installation
Cider-cli is currently an unpublished tool, but for beta testing purposes you can install via:

### Install latest:
```shell
pip install cider-cli
```

### Development Installation

```shell
git clone https://github.com/lramos0/cider-cli
cd cider-cli
pip install -e .
```

## 🧭 How to Use?

You can produce CIDR maps on an input, see [supported data sources](#-supported-data-sources), using:
```shell
cider {input} --kind {geofeed|maxmind|pcap|cider} [options]

```

## 📁 Supported Data Sources
### 1. Formatted CSV (geofeeds, script outputs, etc)

CSV files with lines of the form:

ip_prefix,cc,region,city,...

Run:
```shell
cider ripe.csv --kind geofeed -o ripe_map.html
```

### 2. MaxMind CSV Snapshot Folder

The input must be the directory containing:

GeoLite2-City-Blocks-IPv4.csv
GeoLite2-City-Locations-en.csv

Run:
```shell
cider GeoLite2-City-CSV_20250902 --kind maxmind -o maxmind_map.html

```

### 3. Packet Capture (.pcap)

You can generate a quick pcap of outbound traffic:
```shell
sudo tcpdump -i en0 -w capture.pcap 'tcp[tcpflags] & tcp-syn != 0'
```

Visualize it:

ipmap map capture.pcap --kind pcap -o pcap_map.html

## 🎨 Visualization Options
Currently, the formats allow for the following options (default is html output). This can be set with the output tag:
```
--output result.html
--output result.png --output-format png
```

# 📊 Example: Full Command
```shell
cider ripe.20250903.geo.csv \
--kind geofeed \
--view /16 \
--mode primary \
--colorscale default \
--output ripe_map.html
```


## 🏁 Output

Every visualization is an interactive Plotly map with:

1. Clickable mode toggles

2. Primary org / country count / prefix count views

3. Responsive scaling

4. Exportable HTML or PNG

## Further Reading

You can find more details about this project on my official website [Logan Ramos](https://loganramos.com/components/cider-cli)
test_package_pythagoras_of_samos 0.1
A double entry accounting system in python
Requires Python: >=3.8

[![Unit Tests](https://github.com/Chase-Horton/test_ledge/actions/workflows/main.yml/badge.svg)](https://github.com/Chase-Horton/test_ledge/actions/workflows/main.yml)
# Ledge
Ledge is a Python-based accounting framework designed for developers, and businesses who want full ownership of their financial data without the performance bottlenecks of text files or the privacy nightmares of the cloud.
## Philosophy
### The Problem
Currently the accounting software landscape is split into two extremes.
1. *Plain Text Accounting*: tools like `beancount`, `ledger`, `hledger`
  - Pros: Great for version control, easy to understand format
  - Cons: Parsing large histories is slow, data integrity is questionable as it does not rely on any source of truth, stock pricing and stock splits are obtuse and complex, storing historical pricing data in text files is archaic
2. *SaaS/Cloud Accounting*: tools like Quicken, Xero, or Mint
  - Pros: Simple to use, automated transaction recording, accesible anywhere
  - Cons: You do not own your data, exporting can be difficult, and you are subject to changes in pricing or policy
### The Solution
Double Entry accounting is relational by nature, by utilizing a local SQL database we gain:
  - Speed: Standard SQL indexing prevents having to slowly parse large text files
  - Integrity: ACID compliance and foreign key constraints act ensure ledger is balanced at a database level
  - Standardization: No domain specific language needs to be known, its just SQL, and can be analyzed in any of the available SQL client
## Project Goals
1. *Strict Double-Entry Accounting*:Assets + Liabilites + Income + Expense + Equity = 0
2. *Local First*:No backend required, default is SQLite, with support for PostgreSQL or MySQL
3. *Import API*: Robust API for scripting imports from various financial institutions
4. *Command Line Tool*: Tool for quickly producing balance sheets, income statements, and custom reports
5. *Commodity Pricing*: Associate a commodity price with a ticker to have market value reflected on historical charts automatically.