Metadata-Version: 2.4
Name: smbcloud-sdk-auth
Version: 0.3.33
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
License-File: LICENSE
Summary: Python Auth SDK for smbCloud, built from Rust.
Keywords: smbcloud,auth,sdk,python,rust
Author-email: Seto Elkahfi <hej@setoelkahfi.se>
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://docs.smbcloud.xyz/cli
Project-URL: Homepage, https://github.com/smbcloudXYZ/smbcloud-cli/tree/main/sdk/python
Project-URL: Issues, https://github.com/smbcloudXYZ/smbcloud-cli/issues
Project-URL: Repository, https://github.com/smbcloudXYZ/smbcloud-cli

# smbCloud SDK Auth

Python authentication SDK for smbCloud, built from Rust.

## About

`smbcloud-sdk-auth` wraps the shared Rust Auth crate through PyO3 and maturin so
Python apps can use the same tenant auth contract as the browser SDK.

Current exported Python APIs include:

- `signup_with_client`
- `login_with_client`
- `logout_with_client`
- `me_with_client`
- `remove_with_client`
- `Environment`
- `AuthClient`

## Install

```bash
pip install smbcloud-sdk-auth
```

## Usage

```python
from smbcloud_auth import AuthClient, Environment

client = AuthClient(
    env=Environment.PRODUCTION,
    app_id="app-id",
    app_secret="app-secret",
)

signup = client.signup("name@example.com", "password123")
login = client.login("name@example.com", "password123")
user = client.me(login["access_token"])
```

## Local packaging

From `sdk/python`:

```bash
maturin build
```

## License

MIT

