摘要:Server端代码: Client端代码: 运行结果如图:
阅读全文
摘要:Python解析具有相似JSON格式的字符串方法如下:
阅读全文
摘要:0.生成CA证书及server、client证书,参见https://github.com/grpc/grpc-java/tree/master/examples: 1.编写proto文件及生成对应python源文件,参考https://www.cnblogs.com/areful/p/103726
阅读全文
摘要:0.安装依赖库 1.编写proto文件 2.编译生成proto对应源文件 3.编写server端代码 4.编写client端代码 5.分别运行server、client代码,运行输出如下:
阅读全文
摘要:# -*- coding: utf-8 -*- # Author: areful # needs module 'mysql-connector-python', 'sqlalchemy', running command below to install it: # pip install mysql-connector-python # pip install sqlalchemy # ...
阅读全文
摘要:# -*- coding: utf-8 -*- # Author: areful # # needs module 'mysql-connector-python', running command below to install it: # pip install mysql-connector-python # # # remote connect mysql(on Ubuntu18.04...
阅读全文
摘要:# -*- coding: utf-8 -*- # Author: areful import base64 from Crypto import Random from Crypto.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5 from Crypto.PublicKey import RSA class RSACipher(object)...
阅读全文
摘要:两年前使用python时,碰到2.x下AES加密解密算法代码无法在3.x下顺利运行,花点时间解决了兼容问题,在2.7、3.6、3.7下运行良好。 Linux系统安装依赖库比较简单,Windows下稍嫌繁琐,装完必须的库也可以正常运行。 代码整理如下:
阅读全文