semvec/pypi-packages huggingface dataset:
log4data 0.1.3
Helper library to configure logging for python
Requires Python: >=3.8

# Logging for Data Pipelines

This library simplifies the logging setup process for new data pipelines, eliminating the need to repeatedly look up logger configurations.

## Installation

Install the library via pip:

```sh
pip install log4data
```

## Usage

To start using the library, simply import it in your script, and use the default configuration if you don't want to manually configure the logger.

```python
import src.log4data.main as l4d
import logging as lg


if __name__ == "__main__":
    l4d.default_setup_logger()
    lg.info("Setup complete")
```

With just a few lines of code, you can set up effective logging. This will generate a log like this:

```log
2024-07-03 00:00:00,000 - root - INFO - We are logging!
```

A more advanced use of the library is parametrize the file name or the logging level like this:

```python
# main.py
import log4data as l4d
import logging as lg


if __name__ == "__main__":
    args = l4d.set_log_args(return_args=True)
    l4d.setup_logger_from_args(args)

    lg.info("Setup complete")
```

And then call python:

```sh
python main.py -lglv debug -lgfn etl.log
```

Finally, `@inject_logger` is a decorator to automatically add a logger to a function, named after that function. This is used like this:

```python
# main.py
import argparse
import logging as lg
import log4data as l4d


@l4d.inject_logger
def my_data_processing_function(data, logger=None):
    logger.info(f"Processing data: {data}")
    print(data)
    return data


if __name__ == "__main__":
    # parse arguments
    parser = argparse.ArgumentParser()
    parser.add_argument("-d", "--data", type=str, default="sample data")
    l4d.set_log_args(parser)
    args = parser.parse_args()

    # Configure logging
    l4d.setup_logger_from_args(args)

    # Call the function without providing the logger manually
    my_data_processing_function(args.data)
```

Then, calling this:

```sh
python main.py -d "Hello log for data."
```

Results in this log:

```log
2024-07-03 00:00:00,000 - my_data_processing_function - INFO - Processing data: Hello log for data.
```

## Contributing

This is a small project developed for my team and me, and while major upgrades are not planned, we welcome pull requests. If you encounter bugs or wish to suggest new features, please initiate a discussion by opening an issue.

## License

This repository is under the MIT license.
mur 0.0.8
Mur CLI for packaging and publishing agents and tools.
Requires Python: >=3.9

![mur](https://github.com/murmur-nexus/murmur/blob/main/docs/docs/assets/mur-header-github.png)

![PyPI - Version](https://img.shields.io/pypi/v/mur)
![PyPI - License](https://img.shields.io/pypi/l/mur)
![Mur - Able](https://github.com/murmur-nexus/murmur/blob/main/docs/docs/assets/mur-able-badge.png)

# mur
A simple CLI to manage tools on your MCP (Model Context Protocol) server. 

## Install

```bash
pip install mur 
```

## Quickstart

- Host your own MCP with [capsule](https://github.com/murmur-nexus/capsule)
- [Find some tools](https://artifacts.murmur.nexus) or [build your own](https://murmur-nexus.github.io/murmur/how-to/create-a-tool/)
- Manage tools using `mur` commands

## Commands

### `mur install`

Install one or more tools into your MCP

```bash
mur install TOOL --host HOST
```

- `TOOL`: Name of the tool or toolkit to install e.g. [get_weather](https://artifacts.murmur.nexus/ewg/get_weather)
- `HOST`: Host URL from where you want to install e.g. `http://localhost:8000`

### `mur uninstall`

Uninstall one or more tools from your MCP

```bash
mur uninstall TOOL --host HOST
```

- `TOOL`: Name of the tool or toolkit to uninstall e.g. [get_weather](https://artifacts.murmur.nexus/ewg/get_weather)
- `HOST`: Host URL from where you want to uninstall e.g. `http://localhost:8000`

### `mur list`

List installed tools on your MCP

```bash
mur list --host HOST
```

- `HOST`: Host URL from where you want to list tools e.g. `http://localhost:8000`

### `mur config set`

Set a configuration for host.

```bash
mur config set public host HOST
```

- `HOST`: Host URL from where you want to install e.g. `http://localhost:8000`

This allows you to (un)install and list tools without having to specify the host every time. E.g. `mur install TOOL --host` will point to the configured HOST value. Not specifying a host will install the tool in your local python environment under the [murmur](https://github.com/murmur-nexus/murmur) namespace. 


## 🚀 Community

`mur` is in its early stages, and we're actively building it with the developer community in mind. Your insights, ideas, and use cases will help shape its future. First time contributors are welcome! Check out the [GitHub issues](https://github.com/murmur-nexus/mur/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) for some ideas.

---

**Feedback**  
Try `mur`, and let us know what you think. Star this repo 🌟 and join our [Discord community 💬](https://discord.gg/RGKCfD8HhC) to share your feedback and help make tooling for agents accessible for everyone.