Giter Site home page Giter Site logo

hakanseven12 / ryvencore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leon-thomm/ryvencore

0.0 0.0 0.0 24.71 MB

Node editor Python backend

Home Page: https://leon-thomm.github.io/ryvencore/

License: GNU Lesser General Public License v2.1

Python 100.00%

ryvencore's Introduction

drawing

An experimental Python library for graph-based processing, designed for flow-based/node-based visual scripting editors. It is the backbone of the Ryven project, but it can very much be used in other contexts as well.

While ryvencore is written purely in Python, it is very lightweight and highly compatible. It can be compiled with Cython, see the setup_cython.py file. The performance seems comparable so far, but the code hasn't been optimized for Cython yet, so there might be a lot of potential. Please consider contributing. ryvencore also seems compatible with most Python ports to WebAssembly, even the Cython compiled ryvencore.

Installation

pip install ryvencore

or from sources:

git clone https://github.com/leon-thomm/ryvencore
cd ryvencore
pip install .

Usage

As an experimental library, the API is not fully stable and small breaking changes over time should be expected. Generally, the API is defined by what is included in the docs.

Examples

loading a project e.g. exported from Ryven

import ryvencore as rc
import json
import sys

if __name__ == '__main__':
    # project file path
    fpath = sys.args[1]

    # read project file
    with open(fpath, 'r') as f:
        project: dict = json.loads(f.read())

    # run ryvencore
    session = rc.Session()
    session.load(project)

    # access the first flow
    f = session.flows[0]
    
    # and the last node that was created
    my_node = f.nodes[-1]

    # and execute it
    my_node.update()

Features

The main features include

  • load & save from and into JSON
  • a simple and powerful nodes system which lets you do anything, simple and unrestricted
  • data and exec flow support - unlike lots of other solutions out there, ryvencore supports exec flows
  • variables system with subscribe and update mechanism to build nodes that automatically adapt to change of data
  • built-in logging based on python's logging module
  • actions system for nodes (WIP)

Licensing

ryvencore is licensed under the LGPL License.

ryvencore's People

Contributors

leon-thomm avatar amaury-anciaux avatar sphh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.