semvec/pypi-packages huggingface dataset:
printlogs 0.1.0
A Python library for logging print statements with timestamps
License: MIT
Requires Python: >=3.7
Keywords: logging, print, timestamp, pdf, csv, txt

# PrintLog

A Python library that captures print statements and saves them with timestamps in various formats (TXT, CSV, PDF).

## Features

- Automatically captures all print statements
- Adds timestamps to each log entry
- Supports multiple export formats (TXT, CSV, PDF)
- Context manager support
- Clean and organized log format

## Installation

```bash
pip install printlog
```

## Usage

### Basic Usage

```python
from printlog import PrintLogger

# Create a logger instance
logger = PrintLogger()

# Your print statements will now be logged
print("Hello, World!")
print("This is a test message")

# Save logs to a file
logger.save_logs()  # Saves as TXT by default
```

### Using Different Export Formats

```python
from printlog import PrintLogger

logger = PrintLogger()

print("First message")
print("Second message")

# Save as different formats
logger.save_logs(format="txt", output_file="output.txt")
logger.save_logs(format="csv", output_file="output.csv")
logger.save_logs(format="pdf", output_file="output.pdf")
```

### Using as Context Manager

```python
from printlog import PrintLogger

with PrintLogger() as logger:
    print("This message will be logged")
    print("And this one too")

# Logs are automatically saved when the context manager exits
```

### Accessing Logs Programmatically

```python
from printlog import PrintLogger

logger = PrintLogger()

print("Test message 1")
print("Test message 2")

# Get all logs
logs = logger.get_logs()
for timestamp, message in logs:
    print(f"{timestamp}: {message}")

# Clear logs if needed
logger.clear_logs()
```

## Output Formats

### TXT Format
```
[2024-03-14 10:30:45] Hello, World!
[2024-03-14 10:30:46] This is a test message
```

### CSV Format
```csv
Timestamp,Message
2024-03-14 10:30:45,Hello, World!
2024-03-14 10:30:46,This is a test message
```

### PDF Format
A nicely formatted PDF document with timestamps and messages.

## License

This project is licensed under the MIT License - see the LICENSE file for details.
wfrim-cin 0.1.0
Biblioteca Wfrim
License: MIT
Requires Python: >=3.10

# Weighted Fuzzy Reference Ideal Method (W-FRIM)

Este projeto implementa o **Weighted Fuzzy Reference Ideal Method (W-FRIM)**, uma abordagem multicritério baseada em lógica fuzzy para auxiliar na **avaliação e ranqueamento de alternativas** considerando pesos de critérios, referências ideais e estruturas de preferência.

## Como Funciona

O método recebe um único arquivo JSON contendo:

- **Critérios**
- **Alternativas** com valores fuzzy por critério
- **Faixas de valores esperados** por critério
- **Referências ideais fuzzy**
- **Estrutura de preferência (λ)** por critério
- **Pesos fuzzy** por critério

Esses dados são processados para:

- Normalizar os valores fuzzy com base nas referências ideais;
- Ponderar os valores normalizados usando os pesos dos critérios;
- Calcular os índices relativos de cada alternativa;
- Gerar o ranqueamento das alternativas.


## Estrutura dos Arquivos

```
.
├── data/
│   ├── input.json
├── main.py
└── README.md
```

## Instalação

Requisitos:
- Python 3.7+

## Execução

Rode o script principal com:

```bash
python main.py
```

## Exemplo de Entrada (`input.json`)

```json
{
  "method": "W-FRIM",
  "parameters": {
    "criteria": ["C1", "C2", "C3", "C4", "C5", "C6"],
    "performance_matrix": [
      {
        "name": "A1",
        "values": {
          "C1": [3.3712, 3.44, 3.5088],
          "C2": [2.9890, 3.05, 3.1110],
          "C3": [12.6518, 12.91, 13.1682],
          "C4": [0.5350, 0.546, 0.5569],
          "C5": [0.1274, 0.13, 0.1326],
          "C6": [1.0141, 1.0348, 1.0555]
        }
      }
      // ...
    ],
    "range": {
      "C1": [[2.4304, 2.4800, 2.5296], [3.9396, 4.0200, 4.1004]]
      // ...
    },
    "reference_ideal": {
      "C1": [[3.4300, 3.500, 3.5700], [3.9396, 4.0200, 4.1004]]
      // ...
    },
    "preferences": {
      "C1": 1,
      "C2": 1,
      // ...
    },
    "weights": {
      "C1": [0.1568, 0.1600, 0.1632],
      // ...
    }
  }
}
```

## Exemplo de Saída (`output.json`)

```json
{
  "method": "W-FRIM",
  "results": {
    "ranking": ["A8", "A2", "A4", "A5", "A7", "A9", "A10", "A1", "A3", "A6", "A11"],
    "scores": {
      "A1": 0.379715,
      "A2": 0.539774,
      "A3": 0.377886,
      "A4": 0.493291,
      "A5": 0.460452,
      "A6": 0.358407,
      "A7": 0.441508,
      "A8": 0.577422,
      "A9": 0.416644,
      "A10": 0.413317,
      "A11": 0.208098
    },
    "normalized_weights": {
      "A1": {
        "C1": 0.13986,
        "C2": 0.120719,
        "C3": 0.13683,
        "C4": 0.118757,
        "C5": 0.02649,
        "C6": 0.125826
      },
      // ...
    }
  }
}
```

## Referência Teórica

A implementação do método está baseado no artigo W-FRIM: A weighted fuzzy RIM approach.

## Autores
Victoria Pantoja - vpa@cin.ufpe.br
mcp-agent-tools 0.1.0
Tools for integrating with MCP servers for AI agents
License: MIT
Requires Python: >=3.10

# MCP Agent Tools

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

MCP Agent Tools is a Python library that bridges Model Context Protocol (MCP) servers with various AI agent frameworks. It provides tools to easily expose MCP server capabilities to AI agents, with built-in support for the SmolAgents framework.

## What is MCP?

Model Context Protocol (MCP) is a standardized protocol for exposing tools and capabilities to AI models and agents. MCP servers provide a consistent interface for AI agents to access external tools and capabilities.

## Features

- Connect to MCP servers using stdio or Server-Sent Events (SSE)
- Convert MCP tools to SmolAgents-compatible tools
- Manage persistent connections to MCP servers
- Easily extend to support other agent frameworks

## Installation

```bash
pip install mcp-agent-tools
```

## Quick Start

```python
import asyncio
from mcp_agent_tools import MCPClient, SmolMCPToolFactory

# Connect to an MCP server
async def main():
    # Using SSE connection
    client = MCPClient.create_sse_client(server_url="http://localhost:8000/sse")
    
    async with client as mcp:
        # List available tools
        tools = await mcp.list_tools()
        print(f"Available tools: {tools}")
        
        # Call a tool
        result = await mcp.call_tool("echo", {"message": "Hello from MCP client!"})
        print(f"Tool result: {result}")

# Integration with SmolAgents
def use_with_smolagents():
    # Create factory and convert tools
    factory = SmolMCPToolFactory(server_url="http://localhost:8000/sse")
    
    # Get tools as SmolAgents tools
    tools = factory.get_smolagent_tools()
    
    # Use with SmolAgents
    from smolagents import CodeAgent, LiteLLMModel
    
    model = LiteLLMModel(model_id="openai/gpt-4o")
    agent = CodeAgent(tools=tools, model=model)
    
    # Run agent
    result = agent.run("List the allowed directories")
    print(result)

if __name__ == "__main__":
    asyncio.run(main())
```

## Documentation

### Main Components

- **MCPClient**: Low-level client for connecting to MCP servers
- **MCPToolService**: Persistent service for managing MCP connections
- **MCPTool**: Class representing individual MCP tools
- **SmolMCPToolFactory**: Factory for converting MCP tools to SmolAgents tools

### Connection Methods

MCP Agent Tools supports two connection methods:

1. **stdio**: Connect to an MCP server running as a child process
2. **SSE (Server-Sent Events)**: Connect to an MCP server over HTTP

### Usage Examples

See the `examples.py` file for comprehensive usage examples.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the LICENSE file for details.