python-compute-module


Namepython-compute-module JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2024-06-01 12:07:00
maintainerNone
docs_urlNone
authorYour Name
requires_python<4.0,>=3.12
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## 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

```python
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()
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "python-compute-module",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/9f/14/6bc5bcbe29de1c8012deb06c5834174e4d78092cd5e996f016901718b983/python_compute_module-0.2.0.tar.gz",
    "platform": null,
    "description": "## Python Compute Module\n\nSimple implementation of the Compute Module interface. Function definitions are automatically inferred using pydantic, allowing you to automatically register functions at runtime.\n\n### Basic Usage\n\n```python\nfrom python_compute_module.app import ComputeModuleApp\n\n\napp = ComputeModuleApp()\n\n\n@app.function\ndef add(a: int, b: int) -> int:\n    return a + b\n\n\n@app.function\ndef multiply(a: int, b: int) -> int:\n    return a * b\n\n\n@app.function\ndef greet(a: str) -> int:\n    return f\"Greetings, {a}!\"\n\n\nif __name__ == '__main__':\n    app.run()\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": null,
    "version": "0.2.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cd99a5bccaa504a560181e6b2e08581180f093adab4786a8058efc1d30cc33f6",
                "md5": "9f3ccdf9614e9f6fd60deca5e29af2db",
                "sha256": "052e7204aa0a8d611a0a57c98804b400c7c02f497daa8398d842e37112f22d11"
            },
            "downloads": -1,
            "filename": "python_compute_module-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9f3ccdf9614e9f6fd60deca5e29af2db",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 5448,
            "upload_time": "2024-06-01T12:06:59",
            "upload_time_iso_8601": "2024-06-01T12:06:59.329927Z",
            "url": "https://files.pythonhosted.org/packages/cd/99/a5bccaa504a560181e6b2e08581180f093adab4786a8058efc1d30cc33f6/python_compute_module-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f146bc5bcbe29de1c8012deb06c5834174e4d78092cd5e996f016901718b983",
                "md5": "32db0609ed7f10d455901b686fa20c1a",
                "sha256": "8bddbde9e3a06a647de56375efa68909b6f471e2960db0b7297ea8aebdf6be30"
            },
            "downloads": -1,
            "filename": "python_compute_module-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "32db0609ed7f10d455901b686fa20c1a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 3737,
            "upload_time": "2024-06-01T12:07:00",
            "upload_time_iso_8601": "2024-06-01T12:07:00.822053Z",
            "url": "https://files.pythonhosted.org/packages/9f/14/6bc5bcbe29de1c8012deb06c5834174e4d78092cd5e996f016901718b983/python_compute_module-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-01 12:07:00",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "python-compute-module"
}
        
Elapsed time: 0.54196s