# deeppupil **Repository Path**: yc1124/deeppupil ## Basic Information - **Project Name**: deeppupil - **Description**: 超级简陋的Python微服务解决方案 - **Primary Language**: Python - **License**: LGPL-2.1 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-04-28 - **Last Updated**: 2025-09-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # deeppupil #### 介绍 超级简陋的Python微服务解决方案 #### 源码地址 gitee地址:https://gitee.com/yc1124/deeppupil github地址:https://github.com/yoooooran/deeppupil #### 项目结构 - api_gateway.py # API网关 - service_registry.py # 服务注册与发现 - service_1.py # 测试服务1 - service_2.py # 测试服务2 - pic.py # 本地图片读取/修改 - pic_mat.py # socket服务 - pic_mat_receive.py # socket接收 - video.py #本地视频读取 #### 准备工作 Python >= 3.11.0 (最低3.9+版本) #### 安装教程 安装依赖环境 pip install -r requirements.txt 安装etcd(附docker安装方式) docker pull bitnami/etcd docker run -it --name etcd-server \ -p 2379:2379 -p 2380:2380 \ --env ALLOW_NONE_AUTHENTICATION=yes \ -d bitnami/etcd #### 使用说明 1. 启动etcd 2. python service_1.py 3. python service_2.py 4. python api_gateway.py # This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings. import cv2 import qrcode import numpy as np def print_hi(name): # Use a breakpoint in the code line below to debug your script. print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint. qr = qrcode.make('test') # qr.save('qr.png') qr = np.array(qr, dtype=np.uint8) img = cv2.imread('demo2.jpg') b, g, r = cv2.split(img) # img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) qr = cv2.resize(qr, b.shape) layer0 = cv2.bitwise_and(b, 1) b = b - layer0 + qr img = cv2.merge((b, g, r)) cv2.imwrite('test.jpg', img, [int(cv2.IMWRITE_JPEG_QUALITY), 100]) def read(): img = cv2.imread('test.jpg') b, g, r = cv2.split(img) layer0 = cv2.bitwise_and(b, 1) layer0[layer0 == 1] = 255 cv2.imwrite('qr_test.png', layer0) # Press the green button in the gutter to run the script. if __name__ == '__main__': # print_hi('PyCharm') read() # See PyCharm help at https://www.jetbrains.com/help/pycharm/