semvec/pypi-packages huggingface dataset:
modinit 0.1.1
A tool for initializing AI model training repositories
License: MIT
Requires Python: >=3.6
Keywords: ai, machine learning, project structure, initialization

# modinit

**modinit** is a Python package that helps you quickly scaffold AI model training repositories with a standardized, best-practice structure. It saves you time and ensures consistency across your machine learning projects.

## Why use modinit?

- **Instant project setup:** Get started with a ready-to-use directory structure in seconds.
- **Best practices built-in:** Follows common conventions for organizing data, code, configs, and tests.
- **Docstring templates:** All generated Python files include helpful docstrings.
- **Easy to use:** Simple command-line interface.

## Demo

![modinit demo](demo/modinit.gif)

## Installation

```bash
pip install modinit
```

## Usage

To create a new project, run:

```bash
modinit my-project
```

This will generate a new directory called `my-project` with a recommended structure for AI/ML projects.

### Example

Below is a real example of using `modinit` to create a project called `voice-rumba`:

```bash
$ pip install modinit
$ modinit voice-rumba
Successfully created project: voice-rumba
To get started, navigate to the project directory:
  cd voice-rumba
```

The generated structure looks like this:

```
voice-rumba/
├── README.md
├── .gitignore
├── configs/
│   └── config.yaml
├── data/
│   ├── raw/
│   ├── processed/
│   └── interim/
├── main.py
├── notebooks/
│   └── prototype.ipynb
├── requirements.txt
├── src/
│   ├── __init__.py
│   ├── data.py
│   ├── evaluate.py
│   ├── model.py
│   ├── train.py
│   └── utils.py
└── tests/
    ├── __init__.py
    ├── test_data.py
    ├── test_model.py
    └── test_train.py
```

## Features

- Creates a well-structured project directory for AI model training
- Follows best practices for machine learning project organization
- Includes helpful docstrings in all generated files
- Simple command-line interface

## Development

To contribute to this project:

1. Clone the repository
2. Create a virtual environment
3. Install development dependencies: `pip install -e ".[dev]"`
4. Make your changes
5. Run tests: `pytest`

## License

MIT
muffinscorp 1.0.3
Python client library for MuffinsCorp AI API
License: MIT
Requires Python: >=3.8
Keywords: ai, muffinscorp, api, client

# MuffinsCorp AI Python Client

A Python client library for the MuffinsCorp AI API.

## Installation

```bash
pip install muffinscorp
```

## Quick Start

```python
import os
from muffinscorp import MuffinsCorp

# Set API key as environment variable
os.environ["MUFFINS_AI_API_KEY"] = "your-api-key-here"

# Initialize client
client = MuffinsCorp()

# Send a message to the AI model
response = client.chat.create(
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello, how are you today?"}
    ],
    model="chat-model-small",
    stream=False
)

print(response)
```

## Streaming Responses

```python
import os
from muffinscorp import MuffinsCorp

# Set API key as environment variable
os.environ["MUFFINS_AI_API_KEY"] = "your-api-key-here"

# Initialize client
client = MuffinsCorp()

# Stream the response
for chunk in client.chat.create(
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Write a short story about a robot baker."}
    ],
    model="chat-model-small",
    stream=True
):
    # Process each chunk as it arrives
    print(chunk)
```

## Available Resources

### Chat

Create chat completions with various models.

```python
# Create a chat completion
response = client.chat.create(
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello, how are you today?"}
    ],
    model="chat-model-small",
    stream=False
)
```

### Models

List available models.

```python
# Get available models
models = client.models.list()
print(models)
```

### Subscriptions

List available subscription plans.

```python
# Get available subscription plans
plans = client.subscriptions.list()
print(plans)
```

### Credits

Check your account balance.

```python
# Get credit balance
balance = client.credits.get_balance()
print(f"Credits remaining: {balance['credits']}")
```

## Error Handling

```python
from muffinscorp import MuffinsCorp, AuthenticationError, CreditError

try:
    client = MuffinsCorp(api_key="invalid-key")
    response = client.chat.create(
        messages=[{"role": "user", "content": "Hello"}]
    )
except AuthenticationError as e:
    print(f"Authentication error: {e}")
except CreditError as e:
    print(f"Credit error: {e}, remaining credits: {e.credits_remaining}")
except Exception as e:
    print(f"General error: {e}")
```

## License

MIT