> ## Documentation Index
> Fetch the complete documentation index at: https://docs.responsibleailabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Python: Configuration

> अपने application के policy, plan capabilities, और dimensions के साथ read-only introspection client.get_config / get_capabilities / get_dimensions। कोई credits consumed नहीं।

<Info>
  **Concept:** [Applications](/concepts/applications) · [Policy Engine](/concepts/policy-engine) | **API:** [Configuration](/api-reference/config)
</Info>

<Note>
  **SDK 2.6.0** में added। हर API key एक application से bound है जिसका governance policy centrally [dashboard](https://responsibleailabs.ai/dashboard) में configured है। ये तीन methods आपके code को runtime पर वह configuration को read करने देते हैं — startup checks, dashboards, और monitoring के लिए useful। ये read-only हैं और **कोई credits consume नहीं करते**।
</Note>

```mermaid theme={null}
flowchart LR
    K["आपकी API key"] --> A["client.get_config()<br/>policy + enforcement mode"]
    K --> B["client.get_capabilities()<br/>plan features + limits"]
    K --> C["client.get_dimensions()<br/>weights + thresholds"]
```

## Application configuration

`get_config()` application को return करता है जिससे key bound है, इसका governance policy, और क्या enforcement actively responses को shape कर रहा है या केवल इन्हें observe कर रहा है।

```python theme={null}
from rail_score_sdk import RailScoreClient

client = RailScoreClient(api_key="YOUR_RAIL_API_KEY")

cfg = client.get_config()

print(f"Application: {cfg.application.id} ({cfg.application.environment})")
print(f"Plan:        {cfg.application.plan}")
print(f"Enforcement: {cfg.policy.enforcement}")   # log_only | block | regenerate
print(f"Eval mode:   {cfg.policy.eval_mode}")      # basic | deep
print(f"Threshold:   {cfg.policy.overall_threshold}")
print(f"Mode:        {cfg.enforcement.mode}")      # enforce | monitor

if cfg.policy.locked:
    print("Policy is locked by an administrator; per-request overrides are ignored.")
```

## Plan capabilities

`get_capabilities()` यह report करता है कि key का plan क्या access कर सकता है — evaluation modes, compliance frameworks, agent और DPDP features, और request limits। इसे use करें behavior को adapt करने के लिए बिना plan assumptions को hard-code किए।

```python theme={null}
caps = client.get_capabilities()

print(f"Plan: {caps.plan}")
print(f"Frameworks: {caps.compliance.get('frameworks')}")
print(f"DPDP evidence available: {caps.dpdp.get('evidence')}")   # Pro+ only
print(f"Requests/day: {caps.limits.get('requests_per_day')}")     # None = unlimited
```

## Dimension metadata

`get_dimensions()` आठ RAIL dimensions को return करता है **weight** और **threshold** के साथ जो आपके application के लिए configured है, plus score bands जिसमें एक result fall होता है।

```python theme={null}
dims = client.get_dimensions()

for d in dims.dimensions:
    print(f"{d.get('name'):14} weight={d.get('weight')} threshold={d.get('threshold')}")

for band in dims.score_bands:
    print(band.get("band"), ">=", band.get("min"))
```

<Tip>
  हर typed result भी एक `.raw` dict को expose करता है unmodified response के साथ, तो नए fields हमेशा reachable होते हैं भले ही SDK ने अभी एक typed accessor add नहीं किया।
</Tip>

## Async

Async client एक ही तीन methods को expose करता है:

```python theme={null}
import asyncio
from rail_score_sdk import AsyncRAILClient

async def main():
    client = AsyncRAILClient(api_key="YOUR_RAIL_API_KEY")
    caps = await client.get_capabilities()
    print(caps["plan"])  # async client raw dicts return करता है

asyncio.run(main())
```

## Related

<CardGroup cols={2}>
  <Card title="Configuration API" icon="gear" href="/api-reference/config">
    इन methods के पीछे के REST endpoints।
  </Card>

  <Card title="Policy Engine" icon="gavel" href="/concepts/policy-engine">
    कैसे enforcement, thresholds, और locking work करते हैं।
  </Card>
</CardGroup>
