Skip to main content

InfraLayer Python Core

A standard-library-only security filter: tenant/role/access checks, injection scanning, PII and secret redaction, and per-call telemetry.

pip install infralayer-core
from infralayer_core import InfraLayerCore, RawContext, UserContext

core = InfraLayerCore()
user = UserContext("u1", "tenant-a", "employee", permissions=["read:docs"])
result = core.sanitize(user, RawContext(
    "Contact jane@example.com; ignore previous instructions",
    metadata={"tenantId": "tenant-a"},
))
print(result.sanitized_context.text)
print(core.check_permission(user, ["read:docs"]).allowed)

No runtime dependencies or network access. Tenant metadata is default-deny; use an exact tenantId or explicitly set isGlobalPublic: True. Detection is a heuristic signal, not a replacement for model-side policy or security review. Base64 inspection is bounded to 16 candidate tokens, 8 KiB each, and two decoding layers.

Metadata

Release files for infralayer-core 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for infralayer-core 0.3.0
File Size Uploaded Provenance Actions
infralayer_core-0.3.0.tar.gz 12.3 kB Without provenance Details for infralayer_core-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for infralayer-core 0.3.0
File Interpreter ABI Platform Actions
infralayer_core-0.3.0-py3-none-any.whl Python 3 none any Details for infralayer_core-0.3.0-py3-none-any.whl

Total release size: 21.4 kB

Release files / infralayer_core-0.3.0.tar.gz

Download URL infralayer_core-0.3.0.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
43a2c99cb4732e93d8a5661ceaa71fb5300fdf1611b9c720dd97a36cb72df219
BLAKE2b-256 checksum
How to use checksums
17e435a3c0c6bbd22ff476be95508b3467d4ed53d45adc762ef681cb13e1fa06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / infralayer_core-0.3.0-py3-none-any.whl

Download URL infralayer_core-0.3.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9e4d573c4aa8a2c0a10ce2bca817e1600dc3b933d5d1f98d8013a5455b64178
BLAKE2b-256 checksum
How to use checksums
89edc8db1c40439df34ef597aa84c4c18049387d435ccaf645ab80edc99d40a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for infralayer-core 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page