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
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
pyfineflow-1.1.0.tar.gz
(9.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfineflow-1.1.0.tar.gz.
File metadata
- Download URL: pyfineflow-1.1.0.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4c9eedb7e1ece4c3040f11316dbf5fbe8e9427c9712c71a1e7708e40b7d6163
|
|
| MD5 |
c9587e45de734bbf2b089a579bd0a792
|
|
| BLAKE2b-256 |
cd1f9593c482715f0e5bd36a437077d01fd53f4c167ea41cdd0dba804bb1b315
|
File details
Details for the file pyfineflow-1.1.0-py3-none-any.whl.
File metadata
- Download URL: pyfineflow-1.1.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1e1e0bd003a2343e845b284856cb32c2b63a178a738a2aa392e7317f937e889
|
|
| MD5 |
859bd34883159c2aa43291812f566118
|
|
| BLAKE2b-256 |
d44dd17138a9ef27c2ab923089c4a124fdfddef4e2e911a14bf362f3aeabb37b
|