Skip to main content

Scenera Node SDK

Project description

ScenerNodeSDK

Scenera Node SDK

Scenera Node SDK is a Python library intended to interact easily with the SceneMark and to build AI nodes easily according to the rules of the Scenera PaaS.

Table of Contents

Installation

You can install Scenera Node SDK from PyPI:

pip install scenera.node

This package supports Python 3.6+.

Usage

Here's a basic example of how to use Scenera Node SDK:

import logging
from flask import Flask, request
from flask_cors import CORS
from scenera.node import SceneMark
from scenera.node.logger import configure_logger

## logger 
logger = logging.getLogger(__name__)
logger = configure_logger(logger, debug=True)

app = Flask(__name__)
CORS(app)

NODE_ID = "my_example_node"

@app.route(f'/{NODE_ID}/1.0', methods = ['POST'])
def node_endpoint():

    ## The first thing we do is load the request into the SceneMark object
    scenemark = SceneMark(
        request = request,
        node_id = NODE_ID,
        disable_linter = False
        )
        
    """
    Your node goes here
    """
   
    ## We automatically return the SceneMark back to the NodeSequencer
    scenemark.return_scenemark_to_ns()
    return "Success"

Example Node

Coming soon.

Documentation

You can find the complete API documentation at our documentation website.

License

This project is licensed under the terms of the MIT license. See LICENSE for more details.

Support

If you encounter any issues, please report them via the issue tracker on GitHub.

For more general questions or discussions, you can reach out to us at dirk.meulenbelt@scenera.net.

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

scenera.node-0.3.18.tar.gz (19.8 kB view details)

Uploaded Source

File details

Details for the file scenera.node-0.3.18.tar.gz.

File metadata

  • Download URL: scenera.node-0.3.18.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for scenera.node-0.3.18.tar.gz
Algorithm Hash digest
SHA256 5cccd451b8ae099b7ac99b51f8497f1c68c249c0eb9dbbd86b949f8586b207c6
MD5 271df0db8d23282c3c871da187171f47
BLAKE2b-256 4fec1672c29ea44844762dc2b2524f83b7c1c839d9d5bd2b127d31488455ed92

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