How to use metacall - 5 common examples

To help you get started, we’ve selected a few metacall examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github metacall / core / source / examples / metacallpy / main.py View on Github external
#!/usr/bin/env python3

from metacall import metacall_initialize, metacall_load, metacall, metacall_destroy

# Initialize metacall
metacall_initialize();

# Example call
metacall("hello");

# Destroy metacall
metacall_destroy();
github metacall / examples / auth-function-mesh / auth.py View on Github external
def encrypt(text):
	return metacall('sign', text)
github metacall / examples / auth-function-mesh / auth.py View on Github external
def decrypt(token):
	return metacall('verify', token)
github FooSoft / metacall / metacall.py View on Github external
def wrapper(func):
        assert func.func_code.co_argcount == len(types)
        func.descriptor = Descriptor(func.func_code.co_name, types)
        return func
github metacall / examples / auth-function-mesh / auth.py View on Github external
#!/usr/bin/env python

"""MetaCall Examples - Auth Function Mesh.

[MetaCall](https://metacall.io)
[MetaCall Examples](https://github.com/metacall/examples)

This modules demonstrates a basic example of a python backend that executes
a call to another backend written in JavaScript (NodeJS).

""" 

from metacall import metacall_load_from_file, metacall

metacall_load_from_file('node', ['auth-function-mesh/auth/auth.js'])

def encrypt(text):
	return metacall('sign', text)

def decrypt(token):
	return metacall('verify', token)

metacall

A library for providing inter-language foreign function interface calls

Apache-2.0
Latest version published 2 years ago

Package Health Score

63 / 100
Full package analysis

Similar packages