# CEfC
A *call-effect-commit* schema for safe data management Python.
This a metaprogramming framework that enables the safe execution
of Python code by tracking data modifications and commiting to them
only after functions complete their runs without errors. You can
create fast-failing services that can rerun with new inputs from the
same uncorrupted state.
The framework also treats exceptions-as-values, meaning that you can
check the validity of return arguments if you want, otherwise they
are cascaded throughout service calls.
## :zap: Quickstart
Install *CEfC* per `pip install cefc`. Then create and run the
following code snippet:
```python
from cefc import service
@service
def func(a: list, b: int):
a[0] = 1
a[0] /= b
@service
def outer_func(a: list, b:int):
return func(a, b)
a = [1,2,3]
outer_func(a, b=0)
print(a)
```
You will see the following output, where `a` is unaffected by would-be
modifications and there is a final warning about not having handled the
division-by-zero error at any point.

## :hammer_and_wrench: Safe types
This is a list of types whose safety is (planned to be) guaranteed
when presented as service arguments. Note that the safety of global state
is not guaranteed, but globals can be passed as preset arguments too.
- [x] list
- [ ] dict
- [ ] numpy array or GPU tensor
- [ ] object
Raw data
{
"_id": null,
"home_page": null,
"name": "cefc",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "safe execution, metaprogramming, transactional, error handling, services",
"author": null,
"author_email": "maniospas <maniospas@hotmail.com>",
"download_url": "https://files.pythonhosted.org/packages/9a/5f/541f4972a7c6f6f4784335f4d67eded8444e60b0f2579ce52b89e3eee3e2/cefc-0.1.0.tar.gz",
"platform": null,
"description": "# CEfC\n\nA *call-effect-commit* schema for safe data management Python.\n\nThis a metaprogramming framework that enables the safe execution\nof Python code by tracking data modifications and commiting to them\nonly after functions complete their runs without errors. You can \ncreate fast-failing services that can rerun with new inputs from the\nsame uncorrupted state. \n\nThe framework also treats exceptions-as-values, meaning that you can\ncheck the validity of return arguments if you want, otherwise they\nare cascaded throughout service calls.\n\n\n## :zap: Quickstart\n\nInstall *CEfC* per `pip install cefc`. Then create and run the\nfollowing code snippet:\n\n```python\nfrom cefc import service\n\n@service\ndef func(a: list, b: int):\n a[0] = 1\n a[0] /= b\n\n@service\ndef outer_func(a: list, b:int):\n return func(a, b)\n\na = [1,2,3]\nouter_func(a, b=0)\nprint(a)\n```\n\nYou will see the following output, where `a` is unaffected by would-be\nmodifications and there is a final warning about not having handled the\ndivision-by-zero error at any point.\n\n\n\n\n## :hammer_and_wrench: Safe types\n\nThis is a list of types whose safety is (planned to be) guaranteed \nwhen presented as service arguments. Note that the safety of global state \nis not guaranteed, but globals can be passed as preset arguments too.\n\n- [x] list\n- [ ] dict\n- [ ] numpy array or GPU tensor\n- [ ] object\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A call-effect-commit schema for safe data management in Python",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://github.com/maniospas/cefc#readme",
"Homepage": "https://github.com/maniospas/cefc",
"Repository": "https://github.com/maniospas/cefc"
},
"split_keywords": [
"safe execution",
" metaprogramming",
" transactional",
" error handling",
" services"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9456c932948cde5bfc12fef1fe34cf56e39a4a3fa8d3d03d240eac0e4e51d79a",
"md5": "82f4d52e35d82ebbedd1d21473798e02",
"sha256": "099a308052dbbbdc3cafa88dd3f3e9e582fd6b3a7a1f9c005dfb85f14fd1ba0f"
},
"downloads": -1,
"filename": "cefc-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "82f4d52e35d82ebbedd1d21473798e02",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 2234,
"upload_time": "2025-08-05T10:38:46",
"upload_time_iso_8601": "2025-08-05T10:38:46.170567Z",
"url": "https://files.pythonhosted.org/packages/94/56/c932948cde5bfc12fef1fe34cf56e39a4a3fa8d3d03d240eac0e4e51d79a/cefc-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9a5f541f4972a7c6f6f4784335f4d67eded8444e60b0f2579ce52b89e3eee3e2",
"md5": "a8faef0abc6ad6801f93a484c7a1aabc",
"sha256": "cf9d3f4e2fb82195efc7c2e90fd618503511da197f6df67a6459f5b570dfc45b"
},
"downloads": -1,
"filename": "cefc-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "a8faef0abc6ad6801f93a484c7a1aabc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 2298,
"upload_time": "2025-08-05T10:38:48",
"upload_time_iso_8601": "2025-08-05T10:38:48.464817Z",
"url": "https://files.pythonhosted.org/packages/9a/5f/541f4972a7c6f6f4784335f4d67eded8444e60b0f2579ce52b89e3eee3e2/cefc-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-05 10:38:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "maniospas",
"github_project": "cefc#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "cefc"
}