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.16.tar.gz (19.8 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: scenera.node-0.3.16.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.16.tar.gz
Algorithm Hash digest
SHA256 15d4104ffa865eda21e50cf2acaf546b95987057d22cf2c59960d72d6bfd451b
MD5 5090b72eebaa23eac43cbe56ff625b93
BLAKE2b-256 e152c163ab020eda65950000a024c3169831ce146f6038f1684e911287618b5c

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