logicfp protection runtime and HTTP service
Project description
Logic Fingerprint (logicfp)
logicfp is a Python protection library for wrapping function boundaries with circuit-breaker style control.
Developer documentation lives in README.developer.md.
Install
pip install logicfp
Quick Start
from logicfp import protect
@protect(simple=False)
def call_model(request):
return {"answer": request.payload["text"].upper()}
result = call_model(payload={"text": "hello"})
Use @protect() when you want the simplest user-mode entrypoint.
Use create_protector() when you need more than one protector instance.
Use logicfp.user_mode when you want explicit user-mode types like ProtectRuntimeError.
Minimal Config
Put your project config at:
your_project/config/config.yaml
logicfp:
instance_id: decorator-node
default_source: user_function
backend_type: memory
Use logicfp: as the main YAML section name. Older logic_fingerprint: configs are still accepted for compatibility.
Learn More
- Quick user-mode guide: documents/Tutorial/用户模式快速接入.md
- User mode: documents/Tutorial/用户模式示例.md
- Mode guide: documents/Tutorial/protect 的用户模式与工程模式.md
- Optional engineering mode: documents/Tutorial/工程模式示例.md
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file logicfp-2.1.0.tar.gz.
File metadata
- Download URL: logicfp-2.1.0.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d40c289b70b6179d7d2a5414fa446295be854e9704426c045e6c400743bddc55
|
|
| MD5 |
1697a1c50f4298a5d76e4c0d42c27405
|
|
| BLAKE2b-256 |
c4199a897f479530d65cf63b2a9d7f2e9522b48fccf2a4e9adf856ac96662f0b
|
File details
Details for the file logicfp-2.1.0-py3-none-any.whl.
File metadata
- Download URL: logicfp-2.1.0-py3-none-any.whl
- Upload date:
- Size: 32.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4c639afb1018c0ca6638e2e0c0b017222d56f93f395fb5007564980064ec3b0
|
|
| MD5 |
3429f22238f14d9177e4818344098666
|
|
| BLAKE2b-256 |
d86bd63edaa458963a3669ffe1245d1ae072da712d0a0a4b61cedf48b4b10f1f
|