semvec/pypi-packages huggingface dataset:
img2info 0.2.4
Im2  Python SDK (Upgraded): Clean client with auth, error handling, supports file/url/bytes/base64, includes examples and CLI, easy installation.
Requires Python: >=3.8

# OCR for IMG2.INFO Python SDK (Upgraded)

## Mô tả

SDK nâng cấp cho Im2 info:

- Client sạch với xác thực, xử lý lỗi
- Hỗ trợ input: file, url, bytes, base64
- Có ví dụ và CLI đơn giản
- Cài đặt dễ dàng: `pip install -e .`

## Hướng dẫn sử dụng

### 1. Cài đặt package

Nếu đã upload lên PyPI:

```powershell
pip install img22info==0.2.2
```

Hoặc cài từ source:

```powershell
pip install -e .
```

### 2. Cài đặt dependencies

```powershell
pip install requests
```

### 3. Thiết lập API key

Windows CMD:

```powershell
set OCR_API_KEY=your_key
```

PowerShell:

```powershell
$env:OCR_API_KEY="your_key"
```

Linux/macOS:

```sh
export OCR_API_KEY=your_key
```

### 4. Sử dụng trong code Python

```python
from ocrspace import OCRClient
client = OCRClient(api_key="your_key")
result = client.from_file("invoice.png")
print(result.text)
```
llama-index-storage-chat-store-mongo 0.3.0
llama-index storage-chat-store mongo integration
Requires Python: <4.0,>=3.9

# LlamaIndex Chat Store Integration: MongoDB Chat Store

## Installation

```bash
pip install llama-index-storage-chat-store-mongodb
```

## Usage

Using `MongoChatStore` from `llama_index.storage.chat_store.mongo`
you can store chat history in MongoDB.

```python
from llama_index.storage.chat_store.mongo import MongoChatStore

# Initialize the MongoDB chat store with URI and database name and collection name
chat_store = MongoChatStore(
    mongodb_uri="mongodb://localhost:27017/",
    db_name="llama_index",
    collection_name="chat_sessions",
)
```

You can also initialize the chat store with a `MongoClient` or `AsyncMongoClient` and a database name and collection name.

```python
from pymongo import MongoClient, AsyncMongoClient

client = MongoClient("mongodb://localhost:27017/")
async_client = AsyncMongoClient("mongodb://localhost:27017/")

chat_store = MongoChatStore(
    client=client,
    amongo_client=async_client,
    db_name="llama_index",
    collection_name="chat_sessions",
)
```

You can also initialize the chat store with a `Collection` or `AsyncCollection`.

```python
from pymongo import Collection
from pymongo.asynchronous import AsyncCollection

client = MongoClient("mongodb://localhost:27017/")
async_client = AsyncMongoClient("mongodb://localhost:27017/")

collection = client["llama_index"]["chat_sessions"]
async_collection = async_client["llama_index"]["chat_sessions"]

chat_store = MongoChatStore(
    collection=collection, async_collection=async_collection
)
```

## Usage with LlamaIndex

```python
from llama_index.core.chat_engine.types import ChatMessage

chat_memory = ChatMemoryBuffer.from_defaults(
    token_limit=3000,
    chat_store=chat_store,
    chat_store_key="user1",
)
```
llama-index-readers-mongodb 0.5.0
llama-index readers mongodb integration
Requires Python: <4.0,>=3.9

# LlamaIndex Readers Integration: Mongo

## Overview

Simple Mongo Reader allows loading data from a MongoDB database. It concatenates specified fields from each document into a single document used by LlamaIndex.

### Installation

You can install MongoDB Reader via pip:

```bash
pip install llama-index-readers-mongodb
```

### Usage

```python
from llama_index.readers.mongodb import SimpleMongoReader

# Initialize SimpleMongoReader
reader = SimpleMongoReader(
    host="<Mongo Host>",  # Mongo host address
    port=27017,  # Mongo port (default: 27017)
    uri="<Mongo Connection String>",  # Provide the URI if not using host and port
)

# Lazy load data from MongoDB
documents = reader.lazy_load_data(
    db_name="<Database Name>",  # Name of the database
    collection_name="<Collection Name>",  # Name of the collection
    field_names=[
        "text"
    ],  # Names of the fields to concatenate (default: ["text"])
    separator="",  # Separator between fields (default: "")
    query_dict=None,  # Query to filter documents (default: None)
    max_docs=0,  # Maximum number of documents to load (default: 0)
    metadata_names=None,  # Names of the fields to add to metadata attribute (default: None)
)
```

Implementation for MongoDB reader can be found [here](https://docs.llamaindex.ai/en/stable/examples/data_connectors/MongoDemo/)

This loader is designed to be used as a way to load data into
[LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index) and/or subsequently
used as a Tool in a [LangChain](https://github.com/hwchase17/langchain) Agent.
ece241-submission-static-analyzer 0.0.5
A package that performs static analysis on code submissions.
Requires Python: >=3.8


### Usage:
```python
from ece241_submission_static_analyzer.main import check, StaticAnalysisItem
from ece241_submission_static_analyzer.all_rules import RULES_YOU_ARE_CHECKING

request = [
    StaticAnalysisItem(
        rule=RULES_YOU_ARE_CHECKING(), 
        kwargs=KWARGS,
        file=FILE_NAME
    ),
    # other rules
]

results = check(request)
```
### Rules

#### FunctionMustReturnRule
This rule checks if the last statement of given functions are return statements. If students uses print instead of return, this rule will be violated. 

```python
kwargs={"function_names": ["func1", "func2"]}
```
Note, if you meant to check member function of a class, the function name should be `ClassName.FunctionName`


#### RequireClassRule
This rule checks if the given class is defined in a file/module. 

```python
kwargs={"class_names": ["class1", "class2"]}
```


#### RequireFileRule
This rule checks if the a file exist. 

```python
kwargs={}
```

#### RequireFunctionRule
This rule checks if given functions are defined. 

```python
kwargs={"function_names": ["func1", "func2"]}
```
Note, if you meant to check member function of a class, the function name should be `ClassName.FunctionName`


#### NoInputFuncRule
This rule requires no `input` function is used inside the given file. This applies whether students use them inside the class definition, function definition, regardless the function might be called. One exception is node under `if __name__ == "__main__":` block is NOT checked. 

```python
kwargs={}
```

#### NoRootStatementsRule
This rule that no statement is allowed at root level. This checks if there is any function calls, print statements, input statements are used at root level. Class definitions function definitions, package imports, `if __name__ == "__main__":` block are allowed. 

```python
kwargs={}
```


### Returns: 
A list of `ViolationResult` objects. 
```python 
class ViolationResult(NamedTuple):
    file_path: str
    line_number: int
    message: str
    rule: RuleType
    severity: SeverityType  # Updated to use SeverityType
```

SeverityType values: 
```python
class SeverityType(Enum):
    ERROR = "error"
    WARNING = "warning"
    INFO = "info"
```

### Bundled check
Usage
```python 
from ece241_submission_static_analyzer.main import bundle
```

Function bundle signature
```python
def bundle(file: str, classes: list[str], functions: list[str]) -> list[StaticAnalysisItem]:
```

This function builds `RequireClassRule`->`RequireFunctionRule`->`NoInputFuncRule`->`NoRootStatementsRule`->`FunctionMustReturnRule` lists. 
Note: there is no file check. File check is suggested as a upstream parent check.
sparse-numeric-table-sebastian-achim-mueller 1.2.11
Read, write, and query sparse tables

####################
Sparse Numeric Table
####################
|TestStatus| |PyPiStatus| |BlackStyle| |BlackPackStyle| |MITLicenseBadge|

Query, write, read, and dynamically grow a sparse numeric table.
I do love ``pandas.DataFrame`` and I do love ``numpy.recarray``.
But when the table is sparse and still won't fit into your memory one needs
to combine the best of ``pandas``, ``numpy`` and ``zipfile`` to get the job done.
This is the Sparse Numeric Table.

Install
=======
.. code-block:: bash

    pip install sparse-numeric-table-sebastian-achim-mueller

Test
====
.. code-block:: bash

    pytest .




Fileformat
==========
Efficient write and read using binary blocks (``numpy`` dumps) in a ``zip`` file.
On read, you only need to read the columns and indices you need. No need to read the
entire file. Files can be explored with any ``zip`` file reader.


*****
Usage
*****

See ``./sparse_numeric_table/tests`` for examples.

1st) You create a ``dict`` representing the dtypes of your table.
Columns which only appear together are bundeled into a ``level`` .
Each ``level`` has an index to merge and join with other ``levels``.

.. code-block:: python

    my_table_dtypes = {
        "A": [
            ("a", "<u8"),
            ("b", "<f8"),
            ("c", "<f4"),
        ],
        "B": [
            ("g", "<i8"),
        ],
        "C": [
            ("m", "<i2"),
            ("n", "<u8"),
        ],
    }


Here ``A`` , ``B`` , and ``C`` are the ``level`` keys.
``a, ... , n`` are the column keys.

2nd) You create/read/write the table.


.. code-block::

     A             B         C

     idx a b c     idx g     idx m n
     ___ _ _ _     ___ _
    |_0_|_|_|_|   |_0_|_|
    |_1_|_|_|_|
    |_2_|_|_|_|    ___ _
    |_3_|_|_|_|   |_3_|_|
    |_4_|_|_|_|   |_4_|_|    ___ _ _
    |_5_|_|_|_|   |_5_|_|   |_5_|_|_|
    |_6_|_|_|_|
    |_7_|_|_|_|
    |_8_|_|_|_|    ___ _
    |_9_|_|_|_|   |_9_|_|
    |10_|_|_|_|   |10_|_|
    |11_|_|_|_|    ___ _     ___ _ _
    |12_|_|_|_|   |12_|_|   |12_|_|_|
    |13_|_|_|_|    ___ _
    |14_|_|_|_|   |14_|_|


.. |TestStatus| image:: https://github.com/cherenkov-plenoscope/sparse_numeric_table/actions/workflows/test.yml/badge.svg?branch=main
    :target: https://github.com/cherenkov-plenoscope/sparse_numeric_table/actions/workflows/test.yml

.. |PyPiStatus| image:: https://img.shields.io/pypi/v/sparse_numeric_table_sebastian-achim-mueller
    :target: https://pypi.org/project/sparse_numeric_table_sebastian-achim-mueller

.. |BlackStyle| image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black

.. |BlackPackStyle| image:: https://img.shields.io/badge/pack%20style-black-000000.svg
    :target: https://github.com/cherenkov-plenoscope/black_pack

.. |MITLicenseBadge| image:: https://img.shields.io/badge/License-MIT-yellow.svg
    :target: https://opensource.org/licenses/MIT
propagate-uncertainties-sebastian-achim-mueller 0.2.6
Propagate the uncertainty of multiple values

#######################
Propagate Uncertainties
#######################
|TestStatus| |PyPiStatus| |BlackStyle| |BlackPackStyle| |MITLicenseBadge|

Propagate the uncertainties of your variables in simple expressions.

Examples
--------
.. code:: python

    import propagate_uncertainties as pu

    pu.add(x=1, x_au=0.1, y=4, y_au=0.1)
    (5, 0.14142135623730953)

    pu.multiply(x=2, x_au=0.2, y=3, y_au=0.1)
    (6, 0.632455532033676)

    pu.divide(x=5.0, x_au=1.0, y=2.0, y_au=0.1)
    (2.5, 0.5153882032022076)

    pu.sqrt(x=4, x_au=0.1)
    (2.0, 0.025)


Functions
---------
- ``add(x,y)``
- ``multiply(x,y)``
- ``divide(x,y)``
- ``hypot(x,y)``
- ``sqrt(x)``
- ``max([x0, x1, x2, ... xN])``
- ``sum([x0, x1, x2, ... xN])``
- ``sum_axis0(X)``
- ``integrate(f=[y0, y1, y2, ... yN], x_bin_edges=[x0, x1, x2, ... x(N+1)])``


.. |BlackStyle| image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black

.. |TestStatus| image:: https://github.com/cherenkov-plenoscope/propagate_uncertainties/actions/workflows/test.yml/badge.svg?branch=main
    :target: https://github.com/cherenkov-plenoscope/propagate_uncertainties/actions/workflows/test.yml

.. |PyPiStatus| image:: https://img.shields.io/pypi/v/propagate_uncertainties_sebastian-achim-mueller
    :target: https://pypi.org/project/propagate_uncertainties_sebastian-achim-mueller

.. |BlackPackStyle| image:: https://img.shields.io/badge/pack%20style-black-000000.svg
    :target: https://github.com/cherenkov-plenoscope/black_pack

.. |MITLicenseBadge| image:: https://img.shields.io/badge/License-MIT-yellow.svg
    :target: https://opensource.org/licenses/MIT
slg-dev-ops 1.21.24
This is a description.
Requires Python: >=3.6.3

# Python Package Boilerplate

This is an minimal example of how to publish a python package.

You can follow along with the [guide](https://nrempel.com/how-to-publish-a-python-package-to-pypi).


### WARNING: do not run apply_custom_naming.py from another directory. It will delete things (potentially).
### INFO: If no script name is entered, it will delete both the scripts directory and scripts line from setup.py
To apply a custom name to your package, run:

python3 apply_custom_naming.py
img22info 0.2.2
Im2  Python SDK (Upgraded): Clean client with auth, error handling, supports file/url/bytes/base64, includes examples and CLI, easy installation.
Requires Python: >=3.8

# OCR.Space Python SDK (Upgraded)

## Mô tả

SDK nâng cấp cho Im2 info:

- Client sạch với xác thực, xử lý lỗi
- Hỗ trợ input: file, url, bytes, base64
- Có ví dụ và CLI đơn giản
- Cài đặt dễ dàng: `pip install -e .`

## Hướng dẫn sử dụng

### 1. Cài đặt package

Nếu đã upload lên PyPI:

```powershell
pip install img2info==0.2.1
```

Hoặc cài từ source:

```powershell
pip install -e .
```

### 2. Cài đặt dependencies

```powershell
pip install requests
```

### 3. Thiết lập API key

Windows CMD:

```powershell
set OCRSPACE_API_KEY=your_key
```

PowerShell:

```powershell
$env:OCRSPACE_API_KEY="your_key"
```

Linux/macOS:

```sh
export OCRSPACE_API_KEY=your_key
```

### 4. Sử dụng trong code Python

```python
from ocrspace import OCRSpaceClient
client = OCRSpaceClient(api_key="your_key")
result = client.from_file("invoice.png")
print(result.text)
```
miagents-tl-google 0.1.0a1
Google API integrations for the miagents framework
Requires Python: >=3.12
Keywords: agents, ai, gmail, google, sheets, tasklib

# miagents-tl-google

Google API integrations for the miagents framework.

## Installation

```bash
pip install miagents-tl-google
```

## Setup

### 1. Google Cloud Console
1. Create project at [console.cloud.google.com](https://console.cloud.google.com/)
2. Enable Gmail/Sheets APIs
3. Configure OAuth consent screen
4. Create OAuth client ID (Desktop application)
5. Download credentials JSON

### 2. Environment Variables
```bash
export GOOGLE_CREDENTIALS_FILE=path/to/google_credentials.json
export GMAIL_TOKEN_FILE=path/to/gmail_token.json
export SHEETS_TOKEN_FILE=path/to/sheets_token.json
```

## Usage

Check the examples package in the main github repo. 

## Development

### Requirements
- Python ≥3.12
- miagents (core framework)
- google-auth ≥2.0.0
miagents-extras 0.1.0a1
Extra features and tools for the miagents framework
Requires Python: >=3.12
Keywords: agents, ai, extras, llm, tools

# miagents-extras

Extra tools for the miagents framework.

## Installation

```bash
pip install miagents-extras
```

## Components

### LLM Log Viewer

Web interface for viewing LLM conversation logs.

**Important Security Note**

**This feature is designed for local use only for the developer to check the LLM calls being made from the agent. It should not be exposed as a remote service over public internet.**


```bash
# Start log viewer
python -m miagents_extras.llm_log_viewer

# Custom log file
python -m miagents_extras.llm_log_viewer /path/to/logs.jsonl

# Custom port
python -m miagents_extras.llm_log_viewer --port 8080

# Development mode
python -m miagents_extras.llm_log_viewer --debug
```

## Development

### Requirements
- Python ≥3.12
- miagents (core framework)
- Flask ≥3.0.0
web-features 3.0.0
Library for working with web-features data
Requires Python: >=3.12

# web-features

Python library for working with
[web-features](https://github.com/web-platform-dx/web-features) data.

This library provides tools to download and read releases of the
web-features data. Unlike the npm package it does not bundle a
specific version of the data in the package. Instead it provides an
API for fetching specific releases from GitHub.

Once downloaded, Web Features data is parsed into
[pydantic](https://docs.pydantic.dev/latest/) models.

## Getting the latest web-features data

```py
import webfeatures

version, features = webfeatures.from_github()
```

## Caching latest web-features data

```py
import webfeatures

version = webfetures.download("web-features.json")

# Later
features = webfeatures.from_file("web-features.json")
```
kanuni-layer-sdk 0.2.0
A SDK for Kanuni
Requires Python: >=3.12
Keywords: kanuni, sdk, pwd, disability

# Kanuni SDK

## Installation

Repository: https://github.com/git-markkuria/kanuni-layer-sdk

## Overview

The Kanuni Layer SDK provides utilities to validate and redact sensitive information from user prompts before they are sent to downstream services (for example, LLMs). It offers a small, easy-to-integrate API for prompt validation and redaction.

Key features:

- Prompt validation
- Sensitive data redaction (emails, SSNs, credit cards, phone numbers, etc.)
- Single-call integration

## Installation

Install from PyPI:

```powershell
pip install kanuni-layer-sdk
```

Install from GitHub (latest source):

```powershell
pip install git+https://github.com/git-markkuria/kanuni-layer-sdk.git
```

Install locally for development:

```powershell
git clone https://github.com/git-markkuria/kanuni-layer-sdk.git
cd kanuni-layer-sdk
python -m pip install -e .
```

## Quick start

The package exposes a convenient function `reduct(prompt: str, opted_in: bool = True) -> str` that validates and redacts sensitive content.

Example usage:

```python
from kanuni_layer_sdk import reduct

prompt = (
	"My name is John Doe, SSN 123-45-6789, email john.doe@example.com. "
	"Please give me directions to the nearest pharmacy."
)

# Redact using default settings (opted_in=True)
redacted = reduct(prompt)
print("Redacted prompt:\n", redacted)

# Force opt-out (no redaction) if you need the raw prompt
raw = reduct(prompt, opted_in=False)
print("Raw prompt (opted out):\n", raw)
```

Notes:

- `reduct` performs basic prompt validation, optionally applies a transformation step (if configured), and then redacts sensitive values. The function returns the transformed/redacted prompt as a string.
- Check `kanuni_layer_sdk/main.py` and the `kanuni_layer_sdk/modules` package for implementation details.

## Development

- Package code lives under the `kanuni_layer_sdk` package. The primary entrypoint is `kanuni_layer_sdk.reduct`.
- See `requirements.txt` for runtime dependencies.

## Contributing

Issues and pull requests are welcome. Please open PRs against the repository linked above.

## License

See `PKG-INFO` or the repository for license details.

```powershell

pip install kanuni-layer-sdk
SuppsPlit 0.0.3
A data splitting based on support points.
Requires Python: >=3.6

# Python Wrapper for R package sPlit

sPlit: Split a Dataset for training and testing based on the idea of support points

Reference: Joseph, V. R., & Vakayil, A. (2022). SPlit: An optimal method for data splitting. Technometrics, 64(2), 166-176.

## Installation

Open a command terminal.

```console
git clone https://github.com/PanyiDong/SuppsPlit.git
cd SuppsPlit
python setup.py build_ext --inplace
```

## Usage

```python
import pandas as pd
import numpy as np
from SuppsPlit import SPlit

# toy dataset
df = pd.DataFrame({
    "X": np.random.randn(100),
    "Y": np.random.randn(100)
})

indices = SPlit(df, split_ratio=0.2, n_threads=2)
print("Test indices:", indices)
```