semvec/pypi-packages huggingface dataset:
solcheck 0.1.5
A smart contract auditing tools
Requires Python: >=3.7

# Solcheck | Solidity Contract Audit Tools

These tools are meant for Hackaton-BI, but it can be further enhanced depends on the needs, this tools use 2 type of check semantic using SMT and Slither analyzer. Both of these tools working hand in hand to generate a report in .md format for it to be easier to check if there is any vunerbility. There is also auto fix features that I implement using OpenAI API, but you need to feed it your own api key, for now I'm using the 4.0 model, but later on I will make it customizeable to change the model version either to latest version or earlier version like 3.5, the auto fix works by fethcing the report file that already been generated from the tools

## How to use (in script)

```python
from audit_tools.cli_input import run_static_analysis
from audit_tools.cli_input import write_markdown_report
import audit_tools.auto_fix as auto_fix
import os
from dotenv import load_dotenv

load_dotenv()
auto_fix.get_openai_client(os.getenv("OPENAI_API_KEY"))
sol_file = "/contracts/SimpleEscrow.sol"
output_path = "results/reports"

functions, variables, invariant_results, slither_issues = run_static_analysis(sol_file)
write_markdown_report(sol_file, functions, variables, invariant_results, slither_issues, output_path)
```

## How to use (cli tools)

I've proided a cli tools for the github repo version if you want to tinker more with the tools

```bash
python cli_input.py 
    contracts/SimpleEscrow.sol 
    results/report.md -
    -fix y 
    --output fixed/SimpleEscrow_fixed.sol
```

I'll be adding a multiple file audit into this tools later on, so that it can detect all the sol file in a single directory and then check all of them and generate the appropriate reports and auto-fix if its enabled
pygments-kakoune 0.1.1
Pygments lexer for Kakoune
Requires Python: >=3.12

# Pygments Kakoune Lexer

This project implements a Kakoune lexer for the Pygments library. Because
Kakoune syntax is very similar to POSIX, the lexer is implemented as a subclass
of the `BashLexer`. The keywords, values, attributes, and types are taken
directly from
[Kakoune's own highlighting definitions](https://github.com/mawww/kakoune/blob/master/rc/filetype/kakrc.kak).
The lexer is available as the package `pygments-kakoune`. You can add it to your
project with `uv add pygments-kakoune`.
cellblender 0.1.2
Tools for selection of cell lines
Requires Python: >=3.7

## 📦 PyPI
- For documentation refer to

https://cellblender.readthedocs.io/en/latest/cellblender.html

You can install this package via pip:

```bash
pip install cellblender
```

or first clone the package and then

```
pip install -e .


```
phone-email-extractor 0.1.0
Simple email,urls and phone number extractor
Requires Python: >=3.6

# Contact Extractify

**Contact Extractify** is a lightweight Python package to extract email addresses, phone numbers, and URLs from raw text. It's built with simplicity and accuracy in mind, making it ideal for quick data extraction tasks or preprocessing text from websites, documents, or logs.

---

## ✨ Features

- 📧 Extract email addresses using robust regex
- 📱 Extract international and local phone numbers
- 🔗 Extract URLs (HTTP, HTTPS, and `www.` formats)
- 🧼 Deduplicated and normalized results

---

## 🚀 Installation

You can install the package using:

```bash
pip install contact-extractify



## 🧑‍💻 Usage

```python
from contact_extractor.core import extract_emails, extract_phones, extract_urls

text = """
Contact us at hello@example.com or visit https://example.com.
You can also call us at +1 (555) 123-4567.
"""

emails = extract_emails(text)
phones = extract_phones(text)
urls = extract_urls(text)

print("Emails:", emails)
print("Phones:", phones)
print("URLs:", urls)
```

---

## 📦 Functions

| Function           | Description                           |
|--------------------|---------------------------------------|
| `extract_emails()` | Extracts all valid email addresses    |
| `extract_phones()` | Extracts phone numbers (normalized)   |
| `extract_urls()`   | Extracts valid URLs from the text     |

---

## 📝 License

This project is licensed under the [MIT License](LICENSE).

---


## 📫 Contact

Maintained by **Gaurav Rawal** – [gauravrawal2001@gmail.com](mailto:gauravrawal2001@gmail.com)
invesytoolbox 0.0.26
Tools for Python scripts or terminal
Requires Python: <3.12,>=3.7
Keywords: toolbox, utilities, scripts, terminal

# invesytoolbox

A set of useful tools, created for my own convenience.

Why "invesy"? Invesy (from German **In**halts**ve**rwaltungs**sy**stem == content management system) is a closed source cms I created with Thomas Macher. It's only used in-house, that's why we didn't bother making it open source.

Invesy runs on Zope, so most of the individual website's logic runs in restricted Python. That's one reason for this toolbox: providing a set of useful functions in one single package which can be allowed in our restricted Python environment without having to allow a long list of external packages. Also some packages, while being importable, contain functions or methods not usable in restricted Python (like bs4's prettify).

That's also why all date and time functions also take into account the old DateTime (as opposed to datetime) package, on which Zope is still relying upon heavily.

## Links

- The documentation can be found here: [rastaf.gitlab.io/invesytoolbox](https://rastaf.gitlab.io/invesytoolbox/).
- The project history can be found here: [HISTORY.md](https://gitlab.com/Rastaf/invesytoolbox/blob/master/HISTORY.md)
add-server 0.1.0
Add your description here
Requires Python: >=3.13

# ADD TWO NUMBER BY MCP SERVER

This package provides a simple MCP server that exposes a tool to add two numbers, using the [MCP Python SDK](https://pypi.org/project/mcp/).

## Installation

You need Python 3.13+ and the MCP package. Install dependencies with:

```sh
pip install "mcp[cli]>=1.11.0"
```

Or, if using [uv](https://docs.astral.sh/uv/):

```sh
uv pip install "mcp[cli]>=1.11.0"
```

## Usage

### As a CLI script

If installed as a package, you can run the server with:

```sh
add-server
```

### As a Python module

You can also run the server using the module syntax:

```sh
python -m add_server
```

This will start the MCP server, exposing a tool to add two numbers. You can connect to it using MCP-compatible clients or tools.

## MCP Server Details

The server is implemented using the [FastMCP](https://pypi.org/project/mcp/) class from the MCP SDK. The main entry point is defined in `src/add_server/__init__.py` and is called by both the CLI and module entry points.

For more details on MCP, see the [MCP PyPI documentation](https://pypi.org/project/mcp/) or the [refs/add-server.md](refs/add-server.md) file in this repository.
henau-auth 0.1.9
河南农业大学统一授权认证服务 python SDK
Requires Python: >=3.10

# HenauAuth FastAPI 脚手架

## 概述
本项目包含一个 FastAPI 项目脚手架，它集成了河南农业大学 OAuth 2.0 服务，使开发者能够轻松地在 FastAPI 应用程序中实现用户身份验证。

## 使用 

```bash
ha fastapi init --name myapp
```

# HenauAuth FastAPI 集成示例

本项目将 河南农业大学 OAuth 2.0 服务 与 FastAPI 应用程序集成，以便于开发者使用

## 概述

`HenauAuth` 库简化了在 FastAPI 应用程序中针对河南农业大学 OAuth 2.0 服务器验证用户的过程。 此示例展示了该库的基本设置和用法。

## 准备工作

- Python 3.10+
- FastAPI
- `henau_auth` 库 (通过 pip 安装: `pip install henau_auth`)

## 配置

1.  从河南农业大学 OAuth 2.0 服务器管理面板获取 `app_id` 和 `app_secret`。
2.  在您的 FastAPI 应用程序中配置 `HenauAuth` 客户端:

    ```python
    from fastapi import FastAPI, Request
    from henau_auth import HenauAuth

    app = FastAPI()

    client = HenauAuth(
        app_id="YOUR_APP_ID",  # 替换为您的应用程序 ID
        app_secret="YOUR_APP_SECRET",  # 替换为您的应用程序密钥
        base_url="https://oauth.henau.edu.cn"  # 授权服务器地址 (默认为 https://oauth.henau.edu.cn)
    )

    
    app.add_middleware(
        client.get_fastapi_middleware(),
        login_router="/login", # 登录接口的路由，默认为 /login
        excluded_routes=["/test"], # 排除的路由，被排除的路由不会进行鉴权，默认为 []
        redirect_url="https://www.baidu.com",
        jwt_secret="dasdsafdsfsregtrjukiuok", # jwt的密钥，不传值则每次动态生成一个 建议传值32位字符串即可
        expires_delta=3600, # jwt过期时间，默认为3600分钟，单位分钟
        enable_permission_controller=True, # 是否启用权限控制，Defaults to True 启用后 request中会携带一个casbin 权限控制对象
        # get_user_func = lambda payload: User.get_or_none(User.open_id == payload["henau_openid"]) 
        # 如果传入了get_user_func，则会在获取到用户信息后调用该函数，该函数可以返回一个用户对象，该用户对象会被存储在request.state.user中
    )

    @app.get("/login")
    async def login(request: Request, code: str):
        e : Enforcer = request.state.e
        return {"user": request.state.user, "token": request.state.token}


    @app.get("/other")
    async def user(request: Request):
        e : Enforcer = request.state.e
        return {"user": request.state.user}


    @app.get("/test")
    async def test(request: Request, code: str = None):
        e : Enforcer = request.state.e
        return {"code": code, "user": str(request.state) }

    ```

    **重要提示:** 将 `"YOUR_APP_ID"` 和 `"YOUR_APP_SECRET"` 替换为您实际的应用程序凭据。 强烈建议设置一个强大的 32 字符 `jwt_secret` 以确保安全。

## 用法

1.  运行 FastAPI 应用程序:

    ```bash
    uvicorn app:app --reload
    ```

2.  访问 `/login` 端点以启动 OAuth 2.0 流程。 您需要使用您的 `app_id` 构建授权 URL，并将用户重定向到河南农业大学 OAuth 2.0 服务器。 成功验证后，服务器会将用户重定向回您的 `/login` 端点，并提供授权 `code`。

3.  `HenauAuth` 中间件将自动处理授权码的交换以获取访问令牌，并检索用户的信息。 用户对象将在 `request.state.user` 中可用，JWT 令牌将在 `request.state.token` 中可用。

4.  受保护的路由 (即，不在 `excluded_routes` 中的路由) 将需要在 `Authorization` 标头中提供有效的 JWT 令牌。

## 接口

-   `/login`: 登录接口。 处理来自河南农业大学 OAuth 2.0 服务器的 OAuth 2.0 回调。
-   `/other`: 示例受保护的接口。 需要有效的 JWT 令牌。
-   `/test`: 示例不受保护的接口。 无需身份验证即可访问。

## 自定义用户检索 (`get_user_func`)

`app.add_middleware` 中的 `get_user_func` 参数允许您将经过身份验证的用户信息与应用程序的用户模型集成。 该函数接收来自访问令牌的有效负载，并应根据有效负载中的信息返回用户对象。 示例代码展示了如何使用有效负载中的 `open_id` 从数据库中检索用户。

## 注意

-   这是一个基本示例，可能需要根据您的特定应用程序要求进行调整。
-   确保在您的生产环境中实施适当的错误处理和安全措施。
-   有关更高级的配置选项和功能，请参阅 `henau_auth` 库文档。