semvec/pypi-packages huggingface dataset:
py-flow-mapper 0.1.0b9.dev0
Python project analyzer and visualization tool
License: MIT
Requires Python: >=3.7
Keywords: static-analysis, call-graph, data-flow, mermaid, python-analysis

# PyFlowMapper
[![Publish Python Package](https://github.com/ArunKoundinya/py-flow-mapper/actions/workflows/publish.yml/badge.svg)](https://github.com/ArunKoundinya/py-flow-mapper/actions/workflows/publish.yml)


**PyFlowMapper** is a lightweight Python static-analysis tool that helps you understand **how functions connect and how data flows** across your codebase — without running your code.

It is designed for developers who want fast architectural insight into new or existing Python projects.

## What It Does

- Reads Python source files using AST (no execution)
- Detects which functions call which others
- Tracks return-value–based data flow between functions
- Generates clear Mermaid diagrams
- Works with **Python 3.12+**
- Automatically ignores virtual environments

## Quick Install

```bash
# Clone and install
git clone https://github.com/ArunKoundinya/py-flow-mapper.git
cd py-flow-mapper
pip install -e .

# Or install directly
pip install py-flow-mapper
```

## How to Use

### Analyze Your Project

```bash
pyflow analyze /path/to/your/project
```
This creates a `project_meta.json` file with all the analysis results.

### Create Diagrams

```bash
pyflow diagram /path/to/your/project/project_meta.json
```
### See Project Structure

```bash
pyflow structure /path/to/your/project
```
Shows a clean tree view of your project folders and files.

## What You Get

Metadata File — `project_meta.json`

Contains:

- List of all functions and where they are
- Which functions call which others
- How data moves between functions
- All imports and dependencies

One Types of Diagram
- Detailed Flow Graph - Shows modules and data flow

## Requirements
- Python 3.12 or higher

## Common Commands

| Command | What it does |
|---------|--------------|
| `pyflow analyze /path/to/project` | Analyze a project |
| `pyflow diagram /path/to/project/project_meta.json` | Make diagrams |
| `pyflow structure /path/to/project` | Show folder structure |
| `pyflow --help` | Get help |
| `pyflow version` | Check version |

## Features

✅ Works with any Python 3.12+ project  
✅ No need to run your code  
✅ Creates visual diagrams  
✅ Shows data flow between functions  
✅ Handles imports correctly  
✅ Excludes virtual environments automatically  

## Tips

- Start with a small project to see how it works  
- Use `--entry-point` if your main file isn't `main.py`  
- View diagrams in VS Code or GitHub for best results  
- The tool ignores `venv/`, `.venv/`, and other common exclude folders  

## Full Documentation

Full documentation (including examples and architecture diagrams) is available in the `docs/` folder and built using Quarto.

## ⚠ Limitations

PyFlowMapper uses static analysis. It may not fully resolve:

- Runtime imports
- Heavy metaprogramming
- Highly dynamic call patterns

Despite this, it provides a strong and reliable architectural baseline for most Python projects.
smolllm 0.5.1
A minimal Python library for interacting with various LLM providers
License: MIT
Requires Python: >=3.13
Keywords: ai, anthropic, gemini, llm, openai

# SmolLLM

A minimal Python library for interacting with various LLM providers, featuring automatic API key load balancing and streaming responses.

## Installation

```bash
pip install smolllm
uv add "smolllm @ ../smolllm"
```

## Quick Start

```python
from dotenv import load_dotenv
import asyncio
from smolllm import ask_llm

# Load environment variables at your application startup
load_dotenv()

async def main():
    response = await ask_llm(
        "Say hello world",
        model="gemini/gemini-2.0-flash"
    )
    print(response)

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

## Provider Configuration

Format: `provider/model_name` (e.g., `openai/gpt-4`, `gemini/gemini-2.0-flash`)

### API Keys

The library looks for API keys in environment variables following the pattern: `{PROVIDER}_API_KEY`

Example:
```bash
# .env
OPENAI_API_KEY=sk-xxx
GEMINI_API_KEY=key1,key2  # Multiple keys supported
```

### Custom Base URLs

Override default API endpoints using: `{PROVIDER}_BASE_URL`

Example:
```bash
OPENAI_BASE_URL=https://custom.openai.com/v1
OLLAMA_BASE_URL=http://localhost:11434/v1
```

### Advanced Configuration

You can combine multiple keys and base URLs in several ways:

1. One key with multiple base URLs:
```bash
OLLAMA_API_KEY=ollama
OLLAMA_BASE_URL=http://localhost:11434/v1,http://other-server:11434/v1
```

2. Multiple keys with one base URL:
```bash
GEMINI_API_KEY=key1,key2
GEMINI_BASE_URL=https://api.gemini.com/v1
```

3. Paired keys and base URLs:
```bash
# Must have equal number of keys and URLs
# The library will randomly select matching pairs
GEMINI_API_KEY=key1,key2
GEMINI_BASE_URL=https://api.gemini.com/v1,https://api.gemini.com/v2
```

## Environment Setup Best Practices

When using SmolLLM in your project, you should handle environment variables at your application level:

1. Create a `.env` file:
```bash
# .env
OPENAI_API_KEY=sk-xxx
GEMINI_API_KEY=xxx,xxx2
ANTHROPIC_API_KEY=sk-xxx
```

2. Load environment variables before using SmolLLM:
```python
from dotenv import load_dotenv
import os

# Load at your application startup
load_dotenv()

# Now you can use SmolLLM
from smolllm import ask_llm
```

## Tips

- Keep sensitive API keys in `.env` (add to .gitignore)
- Create `.env.example` for documentation
- For production, consider using your platform's secret management system
- When using multiple keys, separate with commas (no spaces)