Skip to main content

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

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

logicfp-2.1.0.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

logicfp-2.1.0-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

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

Hashes for logicfp-2.1.0.tar.gz
Algorithm Hash digest
SHA256 d40c289b70b6179d7d2a5414fa446295be854e9704426c045e6c400743bddc55
MD5 1697a1c50f4298a5d76e4c0d42c27405
BLAKE2b-256 c4199a897f479530d65cf63b2a9d7f2e9522b48fccf2a4e9adf856ac96662f0b

See more details on using hashes here.

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

Hashes for logicfp-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e4c639afb1018c0ca6638e2e0c0b017222d56f93f395fb5007564980064ec3b0
MD5 3429f22238f14d9177e4818344098666
BLAKE2b-256 d86bd63edaa458963a3669ffe1245d1ae072da712d0a0a4b61cedf48b4b10f1f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page