Catalog PyPI
Back to packageRELEASE DETAILS

2.0.0

PyPI

aicompliant-discover

AICompliant Discovery SDK — automatic AI system detection via explicit wrapping

aianthropiccompliancediscoverygooglemonitoringopenai
Published23 Mar 2026
Direct dependencies0
Transitive dependenciesNot calculated

README

Version 2.0.0 documentation

aicompliant-discover v2.0.0

Enterprise-grade AI system auto-discovery SDK for Python.

v2.0.0 uses explicit wrapping (no monkey-patching, no global state mutation).

Installation

pip install aicompliant-discover

Quick Start

from aicompliant_discover import AIDiscovery
import anthropic

discovery = AIDiscovery(
    api_key="dk_your_api_key",
    endpoint="https://aicompliant.ai/v1/discovery/llm-usage",
)

# Wrap your Anthropic client — automatic usage tracking
client = discovery.wrap_anthropic(anthropic.Anthropic())

msg = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
# Usage automatically reported to AICompliant!

Supported Providers

Anthropic

client = discovery.wrap_anthropic(anthropic.Anthropic())
# or async:
client = discovery.wrap_anthropic(anthropic.AsyncAnthropic())

Google GenAI

model = discovery.wrap_google(genai.GenerativeModel("gemini-2.5-flash"))
response = model.generate_content("Hello")

Any Provider (generic trace)

result = discovery.trace(
    "My System", "OpenAI",
    lambda: openai.chat.completions.create(...),
    model="gpt-4",
    extract_usage=lambda r: {
        "input_tokens": r.usage.prompt_tokens,
        "output_tokens": r.usage.completion_tokens,
    },
)

Manual Reporting

discovery.capture(
    system_name="Resume Screener",
    provider="Anthropic",
    model="claude-sonnet-4-20250514",
    input_tokens=500,
    output_tokens=1500,
)

Configuration

ParameterEnv VarDescription
api_keyAIC_API_KEYAICompliant API key
endpointAIC_ENDPOINTDiscovery webhook URL
system_nameAIC_SYSTEM_NAME, SERVICE_NAME, APP_NAMEDefault system name
flush_size—Events before auto-flush (default: 50)
flush_interval—Seconds between flushes (default: 30)

v2.0.0 Migration from v1.0.0

v1.0.0 used monkey-patching (discovery.init()). v2.0.0 uses explicit wrapping:

# v1.0.0 (deprecated)
discovery.init()
client = anthropic.Anthropic()

# v2.0.0
client = discovery.wrap_anthropic(anthropic.Anthropic())

No global state is modified. Multiple discovery instances can coexist.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

2 collected
aicompliant_discover-2.0.0-py3-none-any.whl

bdist_wheel · 6.22 KB · Python py3

Source file
aicompliant_discover-2.0.0.tar.gz

sdist · 5.69 KB · Python source

Source file

Repository

PENDING
aicompliant/discover-python

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:15 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:3d1df881c86da3e59ffa271e69f35abcd63d7c4d15e7d0e0d4bd41a1df0af1eb

Other collected versions

View all collected versions →