semvec/pypi-packages huggingface dataset:
aiogram-pagination 0.1.9
Module for deep pagination in an aiogram bot

# aiogram-pagination


*This module will help you create layered callback menus.
The module is based on the concept that each callback has all the preceding callbacks in it.*

***

### INSTALLATION
> pip install aiogram-pagination
***

### QUICK START


To create callbacks you need to use the callback factory from 
the aiogram-pagination module

```python
from aiogram_pagination.utils.callback_stack_factory import CallbackStackFactory

cb = CallbackStackFactory('foo', 'bar')
```

You can use both the simple version of the callback stack
and the version with abbreviated callbacks.

Simple version:

```python
from aiogram_pagination.callback_stack import SimpleCallbackStack

callback_stack = SimpleCallbackStack(callback_data={'foo': 0, 'bar': 1, 'previous': ''},
                                     callback_factory=cb)
callback_stack.next(callback_data={'foo': 6, 'bar': 6},
                    callback_factory=cb)
callback_stack.previous()
```

Version with abbreviation:

```python
from aiogram_pagination.callback_stack import AbbreviatedCallbackStack

callback_stack = AbbreviatedCallbackStack(
    callback_data={'foo': 0, 'bar': 1, 'previous': ''},
    callback_factory=cb
)

callback_stack.next(callback_data={'foo': 6, 'bar': 6},
                    callback_factory=cb)
callback_stack.previous(default='some:callback')
```

***

### CONFIGURATION
For configuration, you can use any configuration file placed 
in the root directory of the project or in the data folder.

The module uses configs under the "callback stack" key.
the default is config.json in the data folder of the aiogram-pagination module.

Example:

```json
{
  "callback_stack":
  {
      "storage": "redis",
      "cache_time_limit": 3600,
      "max_pagination_depth": false,
      "redis_db": 1
  }
}
```
gs-sdk 2.0.0
sdk调用
Requires Python: >=3.9

# sdk

## 实现sdk调用中mqtt,http,rpc

## 如何写sdk调用其他服务http接口


要写A服务的sdk，A服务提供了1个http接口login，确定参数，在方法中实现具体的调用，如调用地址，使用post/get/put/patch等，最后返回结果
```
ret = SdkInterface.login(username="admin", password="c93ccd78b2076528346216b3b2f701e6", http_api_version="4.7.1")
```
要写A服务的sdk，A服务提供了1个rpc接口，确定参数，在方法中实现具体的调用，如调用地址，console服务名，最后返回结果

```
SdkInterface.query_check(data=param)

```
要写A服务的sdk，A服务需要一个topic，定义topic数据结构,
```
ret2 = SdkInterface.check(param=param)
```

订阅A服务topic,  定义回调函数，在回调函数中处理数据
```
SdkInterface.test_subscribe(lambda client, userdata, msg: print(msg.payload))
```

## 包制作
https://zhuanlan.zhihu.com/p/79164800
- python3.9 -m pip install --user --upgrade setuptools wheel twine
- python3.9 setup.py sdist bdist_wheel
- python3.9 -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*