Skip to main content

server for object passing

Project description



License: DEL

opject

Object Passing Library

Contents

About

opject is a specification and implementation for passing objects through the network.

An object is a self-contained piece of code.

The passing of the object through the network is obtained in 2 steps:

  • a registered object is requested by the opject client from the opject server;
  • the opject client instantiates or runs in a virtual machine the received object.

opject has clients for

The opject server can serve any kind of object. However, depending on the preferred language, a specific opject server can be used for

The opject registry grants extended functionality through a web interface. The registry can be self-hosted or cloud-hosted.

Install

Install by running

pip install opject-server

Usage

A simple opject server will only require passing a verify_token function and starting the server.

from opject_server import Server as OpjectServer


test_token = '__TESTS__'
port = 7766

def verify_token(
    token,
):
    return token == test_token


server = OpjectServer(
    verify_token=verify_token
)

server.start(
    port=port,
)

The opject server will use the local filesystem for storing data.

Custom functions can be passed to the opject server to implement any kind of logic handling following the interfaces

def verify_token(
    token: str,
):
    pass

def get_object(
    id: str,
):
    pass

def get_metadata(
    id: str,
):
    pass

def register_object(
    id: str,
    data: str,
):
    pass

def register_metadata(
    id: str,
    data: dict, # { dependencies: str }
):
    pass

def remove_object(
    id: str,
):
    pass

Packages

Version

@plurid/opject-client-javascriptJavaScript opject client

Version

@plurid/opject-server-javascriptJavaScript opject server

Version

@plurid/opject-client-pythonPython opject client

Version

@plurid/opject-server-pythonPython opject server

Codeophon

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

opject-server-0.0.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page