semvec/pypi-packages huggingface dataset:
netinterfaces 0.1.0
Cross-platform network interface enumeration
Requires Python: >=3.7
Keywords: network interfaces cross-platform

# netinterfaces

[![Python Version](https://img.shields.io/badge/python-3.7%2B-blue.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A lightweight and cross-platform Python library to retrieve network interface names with a simple API.

Find on PyPI -  

## Features
- **Single-function API** – Quickly retrieve network interface names with minimal effort.
- **Cross-platform support** – Works on Windows, Linux, and macOS.
- **No external dependencies** – Pure Python implementation with no additional requirements.
- **Consistent output format** – Provides a uniform list output across different operating systems.
- **Handles errors gracefully** – Returns an empty list in case of errors instead of crashing.

## Installation

Install `netinterfaces` using `pip`:

```bash
pip install netinterfaces
```

## Usage

Import and use `get_interfaces` to retrieve network interface names:

```python
from netinterfaces import get_interfaces

interfaces = get_interfaces()
print(interfaces)  # Example output: ['eth0', 'wlan0', 'lo']
```

## Platform-Specific Examples

The library adapts to different platforms and returns interface names accordingly:

- **Linux**: `['lo', 'eth0', 'wlan0']`
- **Windows**: `['Ethernet', 'Wi-Fi', 'Loopback Pseudo-Interface']`
- **macOS**: `['lo0', 'en0', 'en1']`

## API Documentation

### `get_interfaces()`
```python
def get_interfaces() -> list:
    """
    Retrieves a list of network interface names available on the system.
    
    Returns:
        list: A list of network interface names (e.g., ['eth0', 'wlan0', 'lo']).
        If an error occurs, an empty list is returned.
    """
```
#### Returns
- **List of strings**: Each string represents a network interface name.
- **Empty list**: Returned in case of an error (e.g., lack of permissions, unexpected system behavior).

## Contributing

Contributions are welcome! To contribute:
1. Fork the repository.
2. Create a new branch (`feature-branch`).
3. Implement your changes and write tests if necessary.
4. Submit a pull request.

## License

This project is licensed under the MIT License - see the [LICENSE](https://github.com/Deadpool2000/netinterfaces/blob/main/LICENSE) file for details.

## Support

If you encounter any issues or have feature requests, please open an [issue](https://github.com/Deadpool2000/netinterfaces/issues) on the GitHub repository.
utilitea 0.1.1
A collection of convenience functions and classes for Python.
Requires Python: >=3.11

# utilitea

utilitea is a collection of handy Python utilities designed to simplify everyday coding tasks. Whether you need quick data manipulations, system helpers, or streamlined workflow tools, utilitea serves up a refreshing blend of convenience and efficiency.

## Depeche

A message transmitting utility.

```python
import time
from utilitea import depeche as dp

if __name__ == "__main__":
    # Example user-defined function for handling messages
	def handle_message(message: str):
		print(message)
    
	updater = dp.StatusUpdater(handle_message)

	msg1 = updater.add_message("First update")
	msg2 = updater.add_message("Second update")
	msg3 = updater.add_message("Third update")
    
	time.sleep(1)  # Simulate delay

	msg1.mark_finished_safely(updater)  # Marks first message as finished
	time.sleep(1)  # Allow processing

	msg2.mark_finished_safely(updater)  # Marks second message as finished
	time.sleep(1)  # Allow processing

	msg3.mark_finished_safely(updater)  # Marks third message as finished
	time.sleep(1)  # Allow processing

	updater.stop()
```

## Semaphore

A signal transmitting utility.

```python
from utilitea import semaphore as sp

if __name__ == "__main__":
    import doctest
    doctest.testmod()

    def handler(data):
        print(f"Received {data}")

    semaphore = sp.Semaphore()
    semaphore.connect("event", handler)
    semaphore.emit("event", "Hello")
    del semaphore
```