semvec/pypi-packages huggingface dataset:
flake8-functions-names 0.4.0
An extension for flake8 that validates functions names, decomposition and conformity with annotations.
License: MIT
Requires Python: >=3.8
Keywords: flake8

# flake8-functions-names

[![PyPI version](https://badge.fury.io/py/flake8-functions-names.svg)](https://badge.fury.io/py/flake8-functions-names)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flake8-functions-names)

An extension for flake8 that validates functions names, decomposition and
conformity with annotations. The plugin also has some validations
of [deal](https://github.com/life4/deal) contracts.

This plugin helps to provide better naming for functions.
The validations are based on my articles:

- [Python functions naming: an algorithm](https://melevir.medium.com/python-functions-naming-the-algorithm-74320a18278d)
- [Python functions naming: 10 tips](https://melevir.medium.com/python-functions-naming-tips-376f12549f9)

`deal`-related validations are enabled only if `deal` is installed.
They are disabled otherwise.

## Installation

```terminal
pip install flake8-functions-names
```

## Example

```python
def is_user_banned(user: User) -> str:
    return 'is_banned' if user.id in BANNED_USERS else 'not_banned'

def save_user(user: User) -> None:
    user.save()
```

Usage:

```terminal
$ flake8 test.py
text.py:1:35: FNE001 Name of the function says that it should return bool-like, but it returns str
text.py:4:4: FNE003 Name of the function uses "save", but not uses "to"
```

Tested on Python 3.8+ and flake8 3.9+.

## Error codes

| Error code |                     Description          |
|:----------:|:----------------------------------------:|
|   FNE001   | Name of the function says that it should return `bool-like`[^1], but it returns *actual_type* |
|   FNE002   | The method has a `@property` decorator, but has a verb in it's name (*verb*) |
|   FNE003   | Name of the function uses `save`, but not uses `to` |
|   FNE004   | Name of the function uses `load`, but not uses `from` |
|   FNE005   | Return type of the function is `bool-like`[^1], but the name doesn't show it |
|   FNE006   | Name of function says, that it works with data, so it should be pure, but it has no `@deal.pure()` |
|   FNE007   | `and` is not recommended in functions names |
|   FNE008   | Name of functions ends with it's first argument name |

[^1]: bool-like return types: bool, TypeGuard
gev 0.1.0
General Events Manager
License: MIT
Requires Python: >=3.8,<4.0
Keywords: python,events

# Gev (General Events Manager)

```shell
$ pip install gev
```

---

## Usage

```python
from gev import Event, EventManager

manager = EventManager()

def handler_1(e):
    print("handler_1 called with", e)

def handler_2(e):
    print("handler_2 called with", e)

# Register event handlers
manager.on('sys_1::event_a').do(handler_1)
manager.on('sys_1::event_b').do(handler_2)

manager.take(Event(
    source='sys_1',
    type='event_a',
    payload={'a': 1}
))  # handler_1 will be called

manager.take(Event(
    source='sys_1',
    type='event_b',
    payload={'b': 1}
))  # handler_1 will be called
```

If you don't want to initialize an `EventManager` instance,
you can use the global `default_manager` and its `on` and `take` methods exposed at module level.

```python
from gev import on, take, Event

def handler_1(e):
    print("handler_1 called with", e)

on('sys_1::event_a').do(handler_1)

take(Event(
    source='sys_1',
    type='event_a',
    payload={'a': 1}
))  # handler_1 will be called
```
opsctl 0.2.2
OPS CTL Tool
License: MIT

# Ops CTL tool
*Generated by script `generate_readme.sh`*

[![Org](https://img.shields.io/static/v1?label=org&message=TMAN&color=597ed9)](https://will.bowxeon.com)
![Author](https://img.shields.io/static/v1?label=author&message=v.stone@163.com&color=blue)
![License](https://img.shields.io/github/license/seoktaehyeon/opsctl)
[![python](https://img.shields.io/static/v1?label=Python&message=3.8&color=3776AB)](https://www.python.org)
[![PyPI](https://img.shields.io/pypi/v/opsctl.svg)](https://pypi.org/project/opsctl/)

### Install

```bash
pip install opsctl
```

### Upgrade

```bash
pip install opsctl --upgrade
```

### Test

```bash
python setup.py install
cd test
pytest *
```

### Feature

```text

opsctl
  tmpl2art	Render templates to articles
  env2json	Get environ variables to Json file
  env2yaml	Get environ variables to YAML file
  bamboo	Bamboo CLI
  version	Show opsctl version
```

- 	Render templates to articles

```text

opsctl tmpl2art
  --config	Key-Value config file path, file type is YAML
  --tmpl	Template dir path or template file path
  --output	Articles output path
```

- 	Get environ variables to Json file

```text

opsctl env2json
  --output	Output Json file path
  --input	Optional. Ensure your input file format that is must be same with output of command "env".
         	Get current os environ variables if let this option empty.
```

- 	Get environ variables to YAML file

```text

opsctl env2yaml
  --output	Output YAML file path
  --input	Optional. Ensure your input file format that is must be same with output of command "env".
         	Get current os environ variables if let this option empty.
```

- 	Bamboo CLI

```text

opsctl bamboo
  --host	Bamboo server host base url
  --token	Bamboo server access token
  --deploy	Trigger Bamboo deployment project running. Format is deploymentProjectName:environmentName
  --param	Optional. Update target variables paramKey:paramValue
```