semvec/pypi-packages huggingface dataset:
openttd-helpers 2.0.0
Small helpers common in most Python applications for OpenTTD
Requires Python: >=3.11

# openttd-helpers

[![GitHub License](https://img.shields.io/github/license/OpenTTD/py-helpers)](https://github.com/OpenTTD/py-helpers/blob/main/LICENSE)

A repository full of small bits of Python code, commonly used in other
projects developed for OpenTTD.

To increase maintainability and to decrease code duplication, this repository
was created.

# Usage

`pip install openttd-helpers`

See `examples/` folder for example use, or look into OpenTTD repositories containing Python code.

# Modules

## asyncio_helper

Helpers to make the user of `ayncio` easier.

- task: `enable_strong_referenced_tasks()` makes returned tasks from `ayncio.create_task` strong, so they are not garbage collected unexpectedly.

## click_helper

Helpers to make the use of `click` easier.

- command: by default, add `-h` to the allowed parameters.
- extend: allow extending a `click.command()` in other functions.
- import_module: used in combination with `Choice`, to auto-load modules based on the choice.

## logging_helper

Setup a default logger via a `click.extend()` function.

## sentry_helper

Setup Sentry via a `click.extend()` function.
pyflet 0.3.2
A CLI tool for generating and managing web projects using Flet.
Requires Python: >=3.6

# PyFlet CLI

PyFlet CLI is a command-line interface tool designed to facilitate the creation and management of Flet web projects. It automates the setup process and provides essential commands for project initialization and user management.

## Installation

To install PyFlet CLI, use the following command:

```sh
pip install pyflet
```

## Usage

Run the CLI using:

```sh
pyflet [COMMAND] [OPTIONS]
```

### Commands

#### 1. Create a Flet Web Project

```sh
pyflet create-flet-web <project_name>
```

Creates a new Flet web project using a predefined template.

#### 2. Initialize a Project

```sh
pyflet init-project --reload <true/false> --project_path <path> --platform <web/android/ios>
```

- `--reload`: Automatically reload the project on changes (default: `true`).
- `--project_path`: Path to the main Python file (default: `main.py`).
- `--platform`: Target platform (default: `web`).

#### 3. Create a Superuser

```sh
pyflet createsuperuser
```

Prompts the user to enter credentials and creates a superuser in the database.

#### 4. Get Support

```sh
pyflet support
```

Displays support information and the author's YouTube channel.

## Configuration

### Database Management

This CLI interacts with SQLite databases using the `manage_sql` library. The superuser creation command inserts data into the `users` table.

### Cloning Project Templates

The CLI clones project templates from the repository:

```
https://github.com/webtechmoz/pyflet-models.git
```

It copies template files to the new project directory while replacing placeholders.

## Logging

The CLI provides informative logs in different levels:

- `info`: General information (blue)
- `success`: Successful operations (green)
- `warning`: Potential issues (yellow)
- `error`: Errors encountered (red)

## Contributing

Feel free to contribute to this project by submitting issues or pull requests on GitHub.

## License

This project is licensed under the MIT License.

## Author

Created by DevPythonMZ.

ðŸ“¢ Subscribe to the YouTube channel: [@devpythonMZ](https://youtube.com/@devpythonMZ)
pydaconf-plugins-k8s 0.1.0
Pydaconf plugin for Kubernetes Secrets
Requires Python: >=3.10

# Pydaconf Kubernetes Secrets Plugin
Pydaconf plugin for Kubernetes Secrets

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/varadinov/pydaconf-plugins-k8s/ci.yaml)
![GitHub last commit](https://img.shields.io/github/last-commit/varadinov/pydaconf-plugins-k8s)
![GitHub](https://img.shields.io/github/license/varadinov/pydaconf-plugins-k8s)

## Pydaconf 
For more information about Pydaconf see the [Docs](https://varadinov.github.io/pydaconf/).

## Installation
Install using `pip install pydaconf-plugins-k8s`  

## A Simple Example
* Create config file in toml, yaml or json
```yaml
secret: K8S_SECRET:///secret_name=my-secret,key=username
```

* Create Pydantic Model and load the configuration
```python
from pydaconf import PydaConf
from pydantic import BaseModel


class Config(BaseModel):
    secret: str

provider = PydaConf[Config]()
provider.from_file("config.yaml")
print(provider.config.secret)
```

## Supported parameters
Parameters can be passed in the configuration value in the following format:
```
K8S_SECRET:///param1=value1,param2=value2
```

| Parameter  | Description                                                                                                                      |
|------------|----------------------------------------------------------------------------------------------------------------------------------|
| secret_name | The name of the kubernetes secret                                                                                                |
| key        | The key of the specific secret element                                                                                           |
| namespace  | If not provided, the plugin will try to load it from the POD file system. If not available, the 'default' namespace will be used |
| watch | Watch the secret for any updates.                                                                                                |

## OnUpdate callback
The plugin can monitor secret update events and notify the on_update_callback. It starts a background thread and subscribes to updates. When an update occurs, it notifies the on_update_callback, ensuring the value in the configuration stays up to date and next time when you access it, it will be the updated version. You can also subscribe to updates using the `.on_update` method.

```python
from pydaconf import PydaConf
from pydantic import BaseModel

def on_change_callback(key: str, value: str):
    print(f"Configuration updated: {key} -> {value}")

class Config(BaseModel):
    api_key: str

provider = PydaConf[Config]()
provider.from_file("config.yaml")

# Subscribe to updates for api_key
provider.on_update(".api_key", on_change_callback)
```
eventspype 1.0.3
A Python framework for building event-driven applications with a clean publisher-subscriber pattern implementation.
Requires Python: <4.0,>=3.13

# Events Pypeline

[![CI](https://github.com/gianlucapagliara/eventspype/actions/workflows/ci.yml/badge.svg)](https://github.com/gianlucapagliara/eventspype/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/gianlucapagliara/eventspype/branch/main/graph/badge.svg)](https://codecov.io/gh/gianlucapagliara/eventspype)
[![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/)

A lightweight and type-safe Python framework for building event-driven applications. eventspype provides a clean publisher-subscriber pattern implementation, making it easy to create decoupled and maintainable event-driven systems.

## Features

- 🎯 Type-safe publisher-subscriber pattern implementation
- 🔄 Support for multiple publishers and subscribers
- 🚀 Asynchronous event handling capabilities
- 🛠️ Easy to use and integrate
- 📦 Zero dependencies
- 🔒 Thread-safe event distribution

## Installation

```bash
# Using pip
pip install eventspype

# Using poetry
poetry add eventspype
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.