semvec/pypi-packages huggingface dataset:
juji-python-sdk 0.2.4
Juji Python SDK
Requires Python: >=3.10

# Juji Python SDK

This is a Python SDK for [Juji Chatbot](https://juji.io) and [Juji Design](https://juji.ai/rep), using the [Juji API](https://juji.io/docs/api).

## Installation

```bash
pip install juji-python-sdk
```

## Usage
The Chatbot and Design SDKs are in the same package.

### Chatbot
```python
from juji_python_sdk import Chatbot

chatbot = Chatbot("<chatbot_url>")

participation = chatbot.start_chat()
```

#### Asynchronous message handling

```python
def handle_message(message: dict):
    if message["type"] == "normal":
        print(f"Juji: {message['text']}")
    elif message["type"] == "flowinfo":
        print(f"Juji is waiting for your response...")

participation.add_message_callback(handle_message)

time.sleep(10)

print("You: Hello, how are you?")
participation.send_chat_msg("Hello, how are you?")

time.sleep(10)

print("You: Bye!")
participation.end()
```

#### Synchronous message handling

```python
messages = participation.get_messages()
print(messages)

print("You: Hello, how are you?")
messages = participation.send_chat_msg("Hello, how are you?")
print(messages) 
```

### Design

```python
from juji_python_sdk import JujiDesign

design = JujiDesign("<juji_api_key>", "<juji_platform_url>")

brands = design.get_brands()

browser_key = uuid.uuid4()
design.add_faq(["Where can I buy some tomatoes?"], 
               ["We have the best tomatoes in the world!"], 
               "<engagement_id>", 
               browser_key)
``` 
Check out the [design_example.py](design_example.py) for a complete example.
gemini-data-extractor 0.1.2
A simple tool to extract data from PDFs and images using Google's gemini-2.0-flash-001 model.
Requires Python: >=3.12

# Gemini Data Extractor

This tool is a prof-of-concept for extracting data from PDFs and images, using the `gemini-2.0-flash-001` LLM from Google. This model attracted a lot of attention lately due to its good performances ad affordable API prices.

It uses Google's GenAI library to interact with the model and extract data from a given document using your prompt. The extracted date is returned in JSON format.

## Installation

You can install the tool using pip:

```bash
pip install gemini-data-extractor
```

## Usage

You can use the tool by running the following command (see also "Authentication" below):

```bash
gemini-data-extractor --path path/to/your/file.pdf --prompt-text "Your prompt here"
```

The tool will return the extracted data in JSON format to the standard output. In case of a long prompt, you can save it to a file and pass the path to the file using the `--prompt-file` argument:

```bash
gemini-data-extractor --path path/to/your/file.png --prompt-file path/to/your/prompt.txt
```

## Authentication

In order to use the `gemini` API you need to authenticate either using a gemini studio API key or via the Google Cloud SDK. You can obtain a key from [Google AI Studio](https://aistudio.google.com). You can then authenticate using the `--api-key` argument or setting the `GEMINI_API_KEY` environment variable:

```bash
gemini-data-extractor --path path/to/your/file.pdf --prompt "Your prompt here" --api-key your-api-key
```

or

```bash
export GEMINI_API_KEY=your-api-key
gemini-data-extractor --path path/to/your/file.pdf --prompt "Your prompt here"
```

Alternatively, if you have a working Google Cloud Account and the Google Cloud SDK installed, you can authenticate using the `gcloud` command:

```bash
gcloud auth application-default login
```

Then you can use the tool with the options `--project-id` and `--location` (or by setting the `GCP_PROJECT_ID` and `GCP_LOCATION` environment variables):

```bash
gemini-data-extractor --path path/to/your/file.pdf --prompt "Your prompt here" --project-id your-project-id --location your-location
```

or

```bash
export GCP_PROJECT_ID=your-project-id
export GCP_LOCATION=your-location
gemini-data-extractor --path path/to/your/file.pdf --prompt "Your prompt here"
```

## License

This tool is licensed under the MIT license. You can find more information in the [LICENSE](LICENSE) file.

## Disclaimer

Gemini is a trademark of Google LLC. This project is not affiliated with Google LLC. The tool uses the GenAI library to interact with the `gemini-2.0-flash-001` LLM from Google.
 The tool is provided as-is and is not officially supported by Google LLC. Use it at your own risk.
auto-privacy-audit 0.1.2
自动隐私合规检测器：基于 AST 的静态代码分析工具，帮助检测代码中的敏感信息泄露风险
Requires Python: >=3.6

# AutoPrivacyAudit

**自动隐私合规检测器**  
AutoPrivacyAudit 是一个基于 Python 的静态代码分析工具，旨在帮助开发者检测代码中潜在的敏感信息泄露风险。利用 AST（抽象语法树）解析技术，本项目能够自动识别日志记录、打印输出等场景中涉及敏感数据（如 email、password、phone 等）的使用情况，从而提高代码安全性和隐私合规性。

## 特性
- **静态代码分析**  
  自动解析代码并检测敏感关键词，识别潜在的隐私泄露风险。
- **日志输出检测**  
  检查 `print` 和日志函数（如 `logging.info`、`logging.error` 等）中是否直接输出了敏感信息。
- **详细审计报告**  
  为每个检测到的问题提供所在文件、代码行号和建议的修复方案，方便开发者快速定位和修改问题。
- **CI/CD 集成**  
  提供命令行接口，便于将检测工具集成到持续集成、代码评审及部署流程中。
- **可扩展的规则系统**  
  支持用户自定义敏感数据的检测规则，满足不同项目和业务场景的需求。

## 安装
你可以通过 pip 直接安装 AutoPrivacyAudit：
```bash
pip install auto_privacy_audit
```

## 使用示例
下面是一个简单的示例，展示如何使用 AutoPrivacyAudit 检测代码中的敏感信息：
```python
from auto_privacy_audit import PrivacyAuditAnalyzer

code = '''
import logging

def test():
    print("User email is test@example.com")
    logging.info("User password: 123456")
'''

analyzer = PrivacyAuditAnalyzer(code)
issues = analyzer.analyze()
for issue in issues:
    print(f"Line {issue['lineno']}: {issue['message']}")
```

运行后，你将看到输出中标明了敏感信息所在的代码行及具体提示信息。
```bash
Line 5: 检测到敏感信息 'email' （敏感关键词 & 敏感模式） 在文本: User email is test@example.com
Line 6: 检测到敏感信息 'password' （敏感关键词） 在文本: User password: 123456
```

## 联系方式
- Email: [1257330051@qq.com]
- GitHub: [@Yantha6]
cpypes 0.0.1
IPC implementation of ctypes API
Requires Python: >=3.7

cpypes
======

`cpypes` is a drop-in substitute for `ctypes` that runs the compiled
code in a separate process.

This provides separation between the Python process and the process
running the compiled code, which could allow you to debug the
compiled code more easily, or even run it on a separate machine!

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

```
pip install cpypes
```

```
>>> import cpypes

>>> libc = cpypes.CDLL("libc.so.6")
>>> dst = cpypes.create_string_buffer(10)
>>> libc.strncpy(dst, b"Hello, world!", 5)
-1783489504
>>> dst.value
b'Hello'
```

By default, `cpypes` starts up a server for itself. You can also start
the server manually and then use

```
cpypes.connect(("127.0.0.1", 5555))
```

to connect to it (you should do right after importing it). The server
is typically installed at `.venv/cpypes/server/main`. To start it
listening on a port, run

```
.venv/cpypes/server/main 5555
```

Use Case Examples
-----------------

* You write a C library (`.so`) and want to write unit tests for the
  public functions. You can write the unit tests in Python, run them
  with `pytest`, and run the library under `valgrind`!

* Say you have a `.so` on an embedded Linux device that you want to
  test out. You can run the `cpypes` server on the embedded device
  (you'll need to compile the server for that architecture, and make
  sure the embedded device has `libffi` on it) and then connect to it
  with `cpypes` running on your laptop!

Requirements
------------

`cpypes` currently supports only Linux.

`cpypes` requires `make`, `gcc`, and `libffi-dev` to build the server.

Caveats
-------

Because it runs the compiled code in a separate process, `cpypes` is
inherently unsuitable for some applications. For example, running
`printf` in `cpypes` will always write to the server's standard output
rather than the current process's (which, incidentally, will most
likely cause a fatal error for `cpypes`). You can certainly use
file descriptors in the server; you just need to make sure you don't
try to use the *client's* file descriptors in the *server's* context,
or anything equivalent.

Coming Soon
-----------

* Option to start server under `valgrind`.

* Support for more types.