No project description provided
Project description
Python Compute Module
Simple implementation of the Compute Module interface. Function definitions are automatically inferred using pydantic, allowing you to automatically register functions at runtime.
Basic Usage
from python_compute_module.app import ComputeModuleApp
app = ComputeModuleApp()
@app.function
def add(a: int, b: int) -> int:
return a + b
@app.function
def multiply(a: int, b: int) -> int:
return a * b
@app.function
def greet(a: str) -> int:
return f"Greetings, {a}!"
if __name__ == '__main__':
app.run()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for python_compute_module-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcac8cfc3adeb169d88ab441cce7fae441689fda2e765bf0dec5609fdd8ce89b |
|
MD5 | 2e0370c32f787cc551304bd5629b3489 |
|
BLAKE2b-256 | b0b6d0ca8da1852c4eb44ffc143cbcd39f2d7b0aa27519ca6294fc750aa0f4c4 |
Close
Hashes for python_compute_module-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63348d51891ee975f70442ab03bd585b9c476c1d6dac030dd3ae8f425e4c79f5 |
|
MD5 | eac81ff0936cbc26fa34807d1c3ef4c3 |
|
BLAKE2b-256 | e300721474aa46e27b938289cee40e6b2e4c5b69c5481fbd09d5a099c32cd186 |