Skip to main content

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

image-20240613213435081

Project details


Release history Release notifications | RSS feed

This version

0.5

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)

Uploaded Source

Built Distribution

is3_analyse-0.5-py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page