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
# 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.0.8.tar.gz
(8.7 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.0.8.tar.gz.
File metadata
- Download URL: pyfineflow-1.0.8.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89ddd2a1d10d3f27867fe8c80dbfbabb4fb53087b4f360bfee7cdf1bdf72b490
|
|
| MD5 |
44a208e61d4ba04a67ccb7a2b64f117e
|
|
| BLAKE2b-256 |
cdbad89137741a7c2a888adefd4b573f74344f9b92417515a2cab2bfd4037fe0
|
File details
Details for the file pyfineflow-1.0.8-py3-none-any.whl.
File metadata
- Download URL: pyfineflow-1.0.8-py3-none-any.whl
- Upload date:
- Size: 9.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 |
87b9252e2881089669ae16fd5fed6736e3975b8cf22cbcffeb5e3f1db9d361f2
|
|
| MD5 |
07cf35efcbb493ecebcd868a7a8de49d
|
|
| BLAKE2b-256 |
11a93aeaa10cf263505116c417bf01e82dfe575a5e2e1456eac077cd7c843c78
|