semvec/pypi-packages huggingface dataset:
qianxun-wechat-sdk 0.0.3
千寻微信框架SDK包
Requires Python: >=3.6

# 千寻微信框架的 Python SDK

## 介绍

千寻微信框架的 Python SDK，基于千寻微信框架的 HTTP API 接口，封装了一些常用的接口，方便开发者使用。

## 安装

```shell

pip install qianxun-wechat-sdk

```

## 使用示例

```python
import qianxun.Emoji as Emoji       # 导入 qianxun Emoji 表情模块
from qianxun.SDK import Robot       # 导入 qianxun SDK 框架

# 创建一个回调函数来接收 qianxun 框架的回调事件
def callback(request):
    print('=' * 50 + '回调事件' + '=' * 50, end='\n\n')
    print(request)

    if request['event'] == 10014:
        print('账号变动事件(10014)')

    if request['event'] == 10008:
        print('收到群聊消息(10008)')

    if request['event'] == 10009:
        print('收到私聊消息(10009)')

    if request['event'] == 10010:
        print('自己发出消息(10010)')

    if request['event'] == 10006:
        print('收到转账事件(10006)')

    if request['event'] == 10013:
        print('撤回事件(10013)')

    if request['event'] == 10011:
        print('好友请求(10011)')

    if request['event'] == 10007:
        print('支付事件(10007)')


if __name__ == '__main__':

    # 创建一个机器人实例，传入机器人的 ip 和端口，以及机器人的 wxid (可选)
    robot = Robot(host='127.0.0.1', port=7777, bot_wxid='')

    # 调用机器人的登录接口, 获取机器人的 wxid
    robot.bot_wxid = robot.getWeChatList()['result'][0]['wxid']

    # 创建一个机器人的回调事件，传入回调函数和端口
    robot.callbackEvents(callback_fun=callback, port=5000)

    # 调用机器人的发送文本消息接口，传入机器人的 wxid 和消息内容
    robot.sendTextMessage(wxid='filehelper', msg=f'你好 {Emoji.小丑脸} 测试 {Emoji.表情_捂脸}')

```
fast-brainfuck 3.0.1
Brainfuck "compiler" for Python (fast)
Requires Python: >=3.6
Keywords: brainfuck

<p><span><span style="font-family:Verdana, Arial, Helvetica, sans-serif;line-height:19px;text-indent:26px;"><span style="font-size:14px;"><span style="font-family:Arial;line-height:26px;"><br></span></span></span></span></p>

# A big bugfix is applied to this package due to the technique Python uses to import modules.

In previous versions, when brainfuck_to_function is called, it creates a module named _foo, which is imported. But Python also stores it into a cache, that means when you call brainfuck_to_function again, the new module would not be imported, which causes a function the same as the previous function is returned.

However, in this version and higher, a module with a random name is created instead, which fixed the bug.

### This is a very fast brainfuck "compiler".

When used, it builds brainfuck code into Python extension modules, and imports it.

Requires:
1. Python>=3.6
2. C++ Compiler available
3. pybind11

#### Running brainfuck

Use the 'brainfuck_to_function' function to convert brainfuck into function.
It will take several seconds for the C++ compiler to build the module, but after build, you can call it anytime without building, which will be faster, and about 3x faster than directly using a brainfuck **interpreter** implemented in C++.
```python
from fastbf import brainfuck_to_function
code='++++++++[>++++++++<-]>++++++++.>++++++++++++[>++++++++<-]>+++++.+++++++..+++.>++++[>++++++++<-]>.<<<<+++++++++++++++.>>.+++.------.--------.>>+.'
func=brainfuck_to_function(code)
func() # Hello World!
```

#### Freezing brainfuck into executables

fast-brainfuck is not supposed to be frozen into executables (e.g. using PyInstaller).
But fortunately, you can use the 'dist_brainfuck' function to convert brainfuck into Python modules.
You can write setup.py like this:

```python
from fastbf import dist_brainfuck
code='++++++++[>++++++++<-]>++++++++.>++++++++++++[>++++++++<-]>+++++.+++++++..+++.>++++[>++++++++<-]>.<<<<+++++++++++++++.>>.+++.------.--------.>>+.'
dist_brainfuck(
    code,'hello'
)
```
Then run **python setup.py build_ext --inplace**, the files hello.py and hello.xxx.pyd (hello.xxx.so) will be created, you can now use
```python
import hello
hello.run()
```
to run the brainfuck in your script (which **CAN** be frozen into executables).

Note that fast-brainfuck does **NOT** clean up the temporary files it creates. You have to manually delete them if you want.

fast-brainfuck can run on **CPython** or **PyPy**.

#### ImportError: xxx
If you encountered this error when using this package in PyPy in Windows, that means your username has non-ASCII characters.
You can run
```python
import os
os.environ['TMP']='C:\\Somedir'
```
before using fast-brainfuck to fix the error.

Note that moving the pointer to the left of the origin causes **UNDEFINED BEHAVIOR** in this version