opjectserver 0.0.0
opject
Object Passing Library
Contents
About
Install
Usage
Packages
Codeophon
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
NodeJS
Python
The opject server can serve any kind of object. However, depending on the preferred language, a specific opject server can be used for
NodeJS
Python
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
@plurid/opject-client-javascript • JavaScript opject client
@plurid/opject-server-javascript • JavaScript opject server
@plurid/opject-client-python • Python opject client
@plurid/opject-server-python • Python opject server
Codeophon
licensing: delicense
versioning: αver
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.