semvec/pypi-packages huggingface dataset:
semantic-kernel-tools 0.1.0
Ready-to-use plugins and tools for Semantic Kernel
License: MIT
Requires Python: >=3.8

# Semantic Kernel Ready to Use Tools

![Python 3.10+](https://img.shields.io/badge/Python-3.10%2B-blue)
![License MIT](https://img.shields.io/badge/License-MIT-green)

A collection of tools and plugins for Semantic Kernel Framework that enhances AI applications with Python code execution, web search capabilities, and detailed logging.

## 🚀 Overview

Semantic Kernel Tools provides a set of powerful plugins for the Semantic Kernel Framework:

* **Python Code Generator**: Generate and execute Python code safely based on natural language requests
* **Web Search Plugin**: Integrate Tavily search API for web search capabilities
* **SK Logger**: Enhanced logging with colorful output and detailed tracking

## ✨ Features

* **Python Code Generation and Execution**: Generate robust Python code and execute it in a controlled environment
* **Web Search Integration**: Search the web using Tavily API
* **Enhanced Logging**: Track AI operations with detailed, colorful logs
* **Extensible Architecture**: Easily customize or extend functionality

## 📋 Requirements

* Python 3.10+
* Semantic Kernel 1.0.0+

## 📥 Installation

```bash
pip install semantic-kernel-tools
```

## 🚀 Quick Start

```python
import asyncio
import os
from semantic_kernel import Kernel
from semantic_kernel.connectors.ai.bedrock import BedrockChatCompletion
from dotenv import load_dotenv

from semantic_kernel_tools import SKLogger, LogLevel, PythonCodeGeneratorPlugin, TavilySearchPlugin

async def main():
    # Load environment variables
    load_dotenv()
    
    # Create a new kernel
    kernel = Kernel()
    
    # Add Bedrock service
    kernel.add_service(
        BedrockChatCompletion(model_id=os.getenv("ANTHROPIC_MODEL_ID"))
    )
    
    # Create logger
    logger = SKLogger(name="SKDemo", level=LogLevel.INFO)
    
    # Add Python Code Generator plugin
    python_generator = PythonCodeGeneratorPlugin()
    kernel.add_plugin(python_generator, plugin_name="PythonCodeGenerator")
    
    # Add Tavily Web Search plugin
    tavily_search = TavilySearchPlugin(api_key=os.getenv("TAVILY_API_KEY"))
    kernel.add_plugin(tavily_search, plugin_name="TavilyWebSearch")
    
    # Use the plugins
    code_request = "Create a function to calculate the factorial of a number and then compute 10!"
    search_request = "What are the latest developments in quantum computing?"
    
    logger.section("EXECUTING CODE")
    code_result = await python_generator.generate_and_execute_code(code_request)
    
    logger.section("WEB SEARCH")
    search_result = await tavily_search.search(search_request)
    
    print(code_result)
    print(search_result)

if __name__ == "__main__":
    asyncio.run(main())
```

## 📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

---

Built with ❤️ for AI developers working with Semantic Kernel.
dtpybucket 1.0.0
A package to improved bucket and s3 compatible system library to have better development experience.
License: MIT
Requires Python: <3.12.0,>=3.11.9

# Python Bucket Manager

**Python Bucket Manager** is a lightweight Python package that simplifies interactions with Amazon S3 or S3-compatible storage services. It provides an easy-to-use wrapper around the boto3 client, enabling you to upload, download, duplicate, and delete files within your S3 bucket with minimal code.

## Features

- **Seamless S3 Integration**: Connect to AWS S3 or any S3-compatible storage service with custom endpoint URLs, regions, and credentials.
- **File Operations**:
  - **Upload**: Send files as bytes or directly from a file path.
  - **Download**: Retrieve files either to a local path or directly into a file-like object.
  - **Duplicate**: Copy files within the bucket with automatic renaming to avoid conflicts.
  - **Delete**: Remove files from your bucket.
  - **Check Existence**: Verify if a file exists using an S3 head object request.

## Installation

### Prerequisites

- Python 3.11 or higher
- [boto3](https://pypi.org/project/boto3/)

### Install via pip

If `dtpybucket` is available on PyPI, you can install it with:

```bash
pip install dtpybucket
```

## Usage

Below is an example of how to use Bucket in your code:

```python
from dtpybucket.bucket import Bucket

def main():
    # Initialize the bucket
    my_bucket = Bucket(
        name="my-bucket-name",
        s3_mode=False,
        endpoint_url="https://my-s3-endpoint.com",
        access_key="my-access-key",
        secret_key="my-secret-key",
        region_name="us-east-1"
    )

    # Example: Upload a file from disk
    file_key = "images/sample.png"
    url = my_bucket.upload_by_path(file_path="local/path/to/sample.png", key=file_key)
    print(f"File uploaded to: {url}")

    # Example: Check if file exists
    exists = my_bucket.check_file_exists(file_key)
    print(f"File exists: {exists}")

    # Example: Download the file
    my_bucket.download(key=file_key, filepath="downloads/sample.png")
    print("File downloaded successfully.")

    # Example: Duplicate the file
    duplicate_url = my_bucket.duplicate(source_key=file_key, destination_key="images/sample_copy.png")
    print(f"File duplicated to: {duplicate_url}")

    # Example: Safe duplicate (auto appends a number if the destination key exists)
    safe_duplicate_url = my_bucket.safe_duplicate(source_key=file_key)
    print(f"File safely duplicated to: {safe_duplicate_url}")

    # Example: Delete the file
    my_bucket.delete(file_key)
    print(f"File {file_key} deleted.")


if __name__ == "__main__":
    main()
```