is3 python server
Project description
Python服务脚手架
用于将工程算法以简单无脑的方式接入到python服务中,并支持通过API的形式访问
要求
python版本大于等于3.10
运行
运行requirements.txt
pip install -r requirements.txt
打开algorithm.py,将工程算法中的参数和方法体依次放入implement方法的参数和方法体中,下面是一个算法示意代码
class Algorithm(BaseAlgorithm):
def implement(self, a, b):
return {
'a': np.array([1, 3]),
'b': {
"2": {1, 2, 3},
"c": a / sum(b.c)
}
}
运行main.py文件
python main.py
通过postman发送Post请求,URL为http://localhost:5000/analyse
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
is3_analyse-0.5.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for is3_analyse-0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f34a29a7c7ad6ff5b26499dbcc56a5b26321e87102f25cb9090211647ac53de5 |
|
MD5 | 13fbfc00a1c321f44e3ada4e6b778835 |
|
BLAKE2b-256 | 8df109e1a636dba0218129e748e59a0274e9c3678232a2fd4a872b962a139905 |