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 details)
Built Distribution
File details
Details for the file is3_analyse-0.5.tar.gz
.
File metadata
- Download URL: is3_analyse-0.5.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe2671df80d6759221edbb036c4cf8fba24eafe364d4471b020cad35794dfa65 |
|
MD5 | 277f972e38a0dbb5891e698905c7c5b4 |
|
BLAKE2b-256 | f46d24d20d3e3cb631dcd984156d2f05136720da04d8c876961176b0015a8b74 |
File details
Details for the file is3_analyse-0.5-py3-none-any.whl
.
File metadata
- Download URL: is3_analyse-0.5-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f34a29a7c7ad6ff5b26499dbcc56a5b26321e87102f25cb9090211647ac53de5 |
|
MD5 | 13fbfc00a1c321f44e3ada4e6b778835 |
|
BLAKE2b-256 | 8df109e1a636dba0218129e748e59a0274e9c3678232a2fd4a872b962a139905 |