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

# Python SDK - Type checking

> The SDK ships py.typed and is clean under mypy --strict and pyright, so your calls into it are actually checked.

*Since v0.11.0.*

The SDK ships a `py.typed` marker and is clean under both `mypy --strict` and `pyright`. You get real types for every public call with no stub package and no configuration.

## Why the marker matters

The SDK has been annotated since early versions. Until v0.11.0 those annotations were invisible to you.

[PEP 561](https://peps.python.org/pep-0561/) says a type checker must ignore an installed package's inline annotations unless the package ships a `py.typed` marker file. Without it, `mypy` and `pyright` treat every import from the package as `Any` - so this:

```python theme={null}
from westyx_nexus import NexusClient, NexusConfig

nexus = NexusClient.create(NexusConfig(base_url=..., api_key=...))
flag = nexus.get_flag("checkout.v2", default=False)
```

type-checked as `Any` throughout. A typo in a method name, a wrong argument type, a misused return value - none of it was caught, and none of it appeared in your editor either.

Both `westyx_nexus` and `nexus_openfeature` carry the marker now.

## What you get

```python theme={null}
reveal_type(nexus.get_flag("checkout.v2", default=False))  # bool
reveal_type(nexus.get_config("database.url"))              # str
reveal_type(nexus.get_secret_file_path("TLS_CERT"))        # str | None
```

<Note>
  `get_secret_file_path` returning `str | None` is the case that earns its keep: under `--strict`, passing it straight to `open()` is now an error, because the key may not be a `file`-type secret.
</Note>

## Checking your own code

Nothing extra to install - the marker is in the wheel:

```sh theme={null}
pip install westyx-nexus-sdk
mypy your_package/
```

If your project runs `--strict`, this SDK will not be the source of `Any`.

### The optional extras

`django` and `botocore` ship no type information of their own, so the framework adapters that import them resolve to `Any` regardless of what this SDK does. If you use the Django adapter and want it checked, add [`django-stubs`](https://pypi.org/project/django-stubs/) to your own dev dependencies. `flask` and `fastapi` are typed upstream and need nothing.

## Next

* [Installation](/sdks/python/installation)
* [Configuration](/sdks/python/configuration)
* [API reference](/sdks/python/api-reference)
