semvec/pypi-packages huggingface dataset:
minidynamicrender 1.2.6
A package that transform bilibili's dynamic data to image
Requires Python: >=3.8,<4.0

# DynamicRender

用于将B站的动态渲染为图片（需要配合适配器将动态转化为特定格式）

## 使用

### 安装

```bash
pip install dynamicrender
```

### 1. 格式化动态

```python

# 如果数据是grpc返回的数据
from google.protobuf.json_format import MessageToDict
from dynamicadaptor.DynamicConversion import formate_message
from bilirpc.api import get_dy_detail
import asyncio
from dynamicrender.Core import DyRender 

async def sample1():
    dynamic_grpc = await get_dy_detail("746530608345251842")
    dynamic: dict = MessageToDict(dynamic_grpc[0])
    dynamic_formate = formate_message("grpc", dynamic)
    render = DyRender()
    # DyRender 实例化时可以传两个参数
    #1. data_path: {str} 为静态文件所在的位置，当data_path内不存在Static目录，则会自动解压自带的Static到data_path内
    # 2.font_path: {str/dic}当font_path为str类型的时候必须为字体的路径，路径不存在的话会使用默认的字体
    # 不建议使用传dict的方法修改字体
    # 当font_path为dict的时候必须为如以下所示的dict:
    """
    {
     text: str
     extra_text: str
     emoji: str
    }
    三个都必须是字体的路径，text为文本主体的字体路径，extra_text为备选字体的路径，emoji为emoji字体的路径，
    
    注意！！！
    
    每款emoji字体的字体大小都有固定值，如果修改了emoji字体必须同时修改emoji字体的字体大小
    
    """
    result = await render.dyn_render(dynamic_formate)
    result.show()
    
asyncio.run(sample1())



# 如果是web返回的数据

import asyncio
import httpx
from dynamicrender.Core import DyRender
from dynamicadaptor.DynamicConversion import formate_message 

async def sample2():
    url = "https://api.bilibili.com/x/polymer/web-dynamic/v1/detail?timezone_offset=-480&id=746530608345251842"
    headers = {
        "Referer": "https://t.bilibili.com/746530608345251842"
    }
    result = httpx.get(url, headers=headers).json()
    dynamic_formate = formate_message("web", result["data"]["item"])
    render = DyRender()
    result = await render.dyn_render(dynamic_formate)
    result.show()


# asyncio.run(sample2())

```

### 示例

![示例图片](https://i0.hdslb.com/bfs/new_dyn/7fcb290284e46c75f432ee069349a49a37815472.png)
ghs-gendaqapi-py 1.2a0
Setup, control and acquire data from the Genesis Highspeed systems via python.
Requires Python: >=3.10

# GEN DAQ API - Python Driver
> Setup, control and acquire data from the Genesis Highspeed systems via python.

[![Build Status](https://dev.azure.com/GenesisHighSpeed/GHS%20ESW/_apis/build/status/hbk-world.ghs-gendaqapi-python?branchName=main)](https://dev.azure.com/GenesisHighSpeed/GHS%20ESW/_build/latest?definitionId=117&branchName=main)

The GEN DAQ API can be used to control the HBM GEN Series tethered mainframes.

## Requirements

Python 3.10+

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install [GEN DAQ API - Python Driver](https://pypi.org/project/ghs-gendaqapi-py/) package.

```bash
pip install ghs-gendaqapi-py
```

## Usage

Refer [examples](./examples) for detailed use cases. 
Refer [documentation](https://hbk-world.github.io/ghs-gendaqapi-python/html/index.html) for detailed API documentation

```python
from ghsapi import ghsapi

# create Gen Daq API's object
gen = ghsapi.GHS()

# connect to mainframe
gen.ghs_connect(IP_ADDRESS, PORT_NO)

# disconnect from mainframe
gen.ghs_disconnect()
```

## Development environment setup

Below are the steps to follow to setup devlopement enviroment for system integration and testing.

### Requirements

- `Python 3.10+`
- `Anaconda/Miniconda`

### Clone repo

```bash
git clone https://github.com/hbk-world/ghs-gendaqapi-python.git
```

### Virtual Environment

```bash
conda create --name <env> --file spec-file.txt
```

### Install dependencies

```bash
pip install -r requirements.txt
```

## Run example files

Edit files in [examples](./examples) to enter mainframe IP and Port number

```bash
python examples\FILENAME
```

## Testing

Edit files in [functionaltest](./functionaltest) to enter mainframe IP and Port number

### Unit test

```bash
python unittest\FILENAME
```

### Functional test

```bash
python functionaltest\FILENAME
```
congers 0.1.0
A Lightweight data model management for Python
Requires Python: >=3.8

# Conger

Lightweight data model management for Python ecosystem.

Specifically, `conger` provides a management interface for easy previewing, editing, and storing data models (defined by [pydantic](https://github.com/pydantic/pydantic) or dataclass).


## Install

If you using [rye](https://github.com/mitsuhiko/rye) (recommended), you can install `conger` as a dependency of your project:

```bash
rye add conger
```

or pip:

```bash
python -m pip install conger
```
## Quick Start

1. Define your data model (e.g. `Person`):

```Python
from conger import BaseModel, Field

class Person(BaseModel):
    name: str
    age: int = Field(..., gt=18, lt=100)
```

2. Add this data model to flask app:

```Python
from flask import Flask
import pickledb
from conger import Conger

app = Flask(__name__)
db = pickledb.load("db.json", True)
conger = Conger(app, database=db)

"""
your data model
"""

conger.add_model(Person)


if __name__ == "__main__":
    app.run()
```

3. visit [http://127.0.0.1:500/conger/](http://127.0.0.1:500/conger/)


LICENSE MIT