semvec/pypi-packages huggingface dataset:
sql-spliter 0.0.2
Use YAML files to strip SQL statements from the program, and implement dynamic SQL through Jinja2.

Use of SQL Spitter
==========================

Use YAML files to strip SQL statements from the program, and implement dynamic SQL through Jinja2.

.. pull-quote:: 
    Specify sql folder

.. code-block:: python

    from sql_splitter import SqlLoader


    # Configure the path of the sql folder
    SqlLoader.SQL_FILE_PATH = "/Users/kela/Program/open-sources/sql-splitter/sql_splitter/example/sql"
    loader = SqlLoader()

.. pull-quote:: 
    Load all sql statements

.. code-block:: python

    # All sql statements are loaded while the application is running
    loader.preload_all_sqls()
    print(f'All sqls: {loader.sqls}')


.. pull-quote:: 
    Gets the specified sql statement

.. code-block:: python

    # Obtain sql based on sql_id
    sql = loader.get(
        "user.index.query_user_info", options={}
    )
    print(f"current sql: {sql}")

.. pull-quote:: 
    Write sql statements sql/user/index.yml

.. code-block:: sql

    SELECT
        user.id,
        user.account_id,
        user.account_name,
        user.user_name,
        user.password,
        user.phone,
        user.is_delete,
        user.enable_flag,
        user.register_datetime,
        group.name AS group_name
    FROM user
    JOIN group ON user.group_id = group.id
    WHERE user.id = :user_id

.. pull-quote:: 
    Generate dynamic sql with the option parameter

.. code-block:: sql

    SELECT
        user.id,
        user.account_id,
        user.account_name,
        user.user_name,
        user.password,
        user.phone,
        user.is_delete,
        user.enable_flag,
        user.register_datetime,
        group.name AS group_name
    FROM user
    JOIN group ON user.group_id = group.id
    {% if user_id > 0 %}
    WHERE user.id = :user_id
    {% endif %}

.. code-block:: python

    # Obtain sql based on sql_id with option
    # Dynamic sql requires passing in parameters to be filtered
    sql = loader.get(
        "user.index.query_user_info", 
        options={
            'user_id': 1
        }
    )
    print(f"current sql: {sql}")
    # 生成的sql语句
    """
    SELECT
        user.id,
        user.account_id,
        user.account_name,
        user.user_name,
        user.password,
        user.phone,
        user.is_delete,
        user.enable_flag,
        user.register_datetime,
        group.name AS group_name
    FROM user
    JOIN group ON user.group_id = group.id
    WHERE user.id = :user_id
    """
pylint-modularity 0.2.1
Pylint plugin to help enforce separation of concerns through import restrictions.
Requires Python: >=3.11,<4.0

# pylint-modularity

Pylint plugin to help enforce separation of concerns.

## Installation

Install the module with e.g. `poetry add --group dev pylint_modularity`.

## Usage
In your Pylint configuration (e.g. in `pyproject.toml`) add the following:
```
[tool.pylint.MAIN]
load-plugins = "pylint_modularity"
```

### Import restrictions
Once the plugin is enabled, in your Pylint configuration (e.g. in `pyproject.toml`) add the following:
```
[tool.pylint.MAIN]
import-restriction = [
    "module_visited->module_import_restriction",
    "module2_visited -> restriction\\..*"
]

The restrictions configured as part of `import-restriction` setting, and as represented above take the following shape - `module_visited -> import_restriction`
- `module_visited`: The module which is presently being looked at. This could be a RegEx in order to capture several modules.
- `->`: The separator denoting the module being investigated (on the left), and the restricted imports (on the right). You can optionally add spaces around it for clarity.
- `import_restriction`: The module which is restricted from being imported within the module being investigated. This could be a RegEx in order to capture several modules.
pixoo1664 1.0.2
Unofficial Divoom pixoo REST library, beer not included.
Requires Python: >=3.8

# PIXOO1664

Unofficial Divoom pixoo REST library, beer not included.

To install
```bash
pip install pixoo1664
```

To use:
```python
from pixoo1664 import Pixoo

pixoo = Pixoo("192.168.16.64")
```
## Text

To send text:
```python
pixoo.send_text("Hello there !")
```

To clear text:
```python
pixoo.clear_text()
```

## Image
To create and send an image:
```python
from PIL import Image, ImageDraw

img = Image.new("RGB", size=(64,64))

draw = ImageDraw.Draw(img)
draw.text(text="Who's the", xy=(3, 10), fill=(255, 43, 43, 255))
draw.text(text="BOSS NOW ??", xy=(3, 20), fill=(43, 255, 43, 255))
draw.line(xy=((0, 20), (64, 20)))

pixoo.send_image(img)
```

Send gif frames in one call (60ms btw frames)
```python
# list of Image
pixoo.send_images(images, speed=60)
```

## Brightness

Get brightness 0~100
```python
pixoo.get_brightness() # -> 80
```

Set brightness 0~100
```python
pixoo.set_brightness(90)
```

Set screen on/off
```python
pixoo.set_screen(True)
pixoo.set_screen(False)
```

## Time

Set system time
```python
pixoo.set_system_time(1672416000)
```

Get system time
```python
pixoo.get_system_time() # -> 1672416000
```

Set 24 hour mode (reset when the device power off)
```python
pixoo.set_24_hour_mode(True)
```

Set 12 hour mode (reset when the device power off)
```python
pixoo.set_24_hour_mode(False)
```

## Temperature mode

Set temperature in Celsius
```python
pixoo.set_temperature_in_celsius(True)
```

Set temperature in Fahrenheit
```python
pixoo.set_temperature_in_celsius(False)
```

## Screen rotation

Set rotation angle in degree 0, 90, 180 and 270
```python
pixoo.set_rotation_angle(90)
```

## Configuration

Get all settings (https://doc.divoom-gz.com/web/#/12?page_id=243)
```python
pixoo.get_all_conf()
#   {
#     "Brightness":100,
#     "RotationFlag":1,
#     "ClockTime":60,
#     "GalleryTime":60,
#     "SingleGalleyTime":5,
#     "PowerOnChannelId":1,
#     "GalleryShowTimeFlag":1,
#     "CurClockId":1,
#     "Time24Flag":1,
#     "TemperatureMode":1,
#     "GyrateAngle":1,
#     "MirrorFlag":1,
#     "LightSwitch":1
#   }
```

## Page

Set a timer
```python
pixoo.set_timer(minute=1, second=3, start=True)
```