Skip to main content

python nodes server for fineflow

Project description

pyfineflow

fineflow的python节点后端

usage

install

pip install pyfineflow

make a demo

create dir and files like this:

  • pyfineflow-demo/
    • main.py
    • app.py
    • math_nodes.py
# app.py
from pyfineflow.core import Fine
fine = Fine('pyserver', 'python后端')
# math_nodes.py
import time
from datetime import datetime
from pathlib import Path
from pyfineflow.core import get_ctx
from app import fine


@fine.node(category='数学运算', name="相加")
def add(num1: int, num2: int) -> int:
    num = num2 + num1
    return num


@fine.node(category='数学运算', name="相减")
def sub(num1: int, num2: int = 2) -> int:
    num = num1 - num2
    return num


@fine.node(category='数学运算', name="原路返回")
def sub(num1: int, num2: int = 2) -> (int, int):
    return num1, num2
# main.py
from app import fine


def init():
    import math_nodes
    _ = math_nodes


init()
fine.init_server(port=8081)

run it:

python main.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyfineflow-1.1.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyfineflow-1.1.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file pyfineflow-1.1.1.tar.gz.

File metadata

  • Download URL: pyfineflow-1.1.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.8

File hashes

Hashes for pyfineflow-1.1.1.tar.gz
Algorithm Hash digest
SHA256 532b285b148cfd863f80d6e64fb1d88a5eaf01b61fc62b33afc35cc4f51607b4
MD5 7009659b92d27130be0323d4815939c1
BLAKE2b-256 0e198c9b5862486b7a2c1c5e0b57e91663467321bcac7a6a468ee5ea83da4a5e

See more details on using hashes here.

File details

Details for the file pyfineflow-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyfineflow-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.8

File hashes

Hashes for pyfineflow-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f2e7ae45c93ed84b1ff7ec2a369eb135fc22e8af44ee6e12ce1d64d1b7ca54e
MD5 0c1864cc1f1174a3e56c6b427b7dff7b
BLAKE2b-256 a892669f7cce81812bfc45b1dcf4bf4d1ad034b95b05f104050a3598ca8928a2

See more details on using hashes here.

Supported by

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