Metadata-Version: 2.1
Name: spaceblocks-permissions-server
Version: 2.9.2
Summary: Server SDK for Space Blocks Permissions, a permissions-as-a-service platform for developers
Home-page: https://spaceblocks.cloud
License: MIT
Keywords: space blocks,permissions,rbac
Author: Space Blocks Team
Author-email: hello@spaceblocks.cloud
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pydantic (>=2)
Requires-Dist: python-dateutil (>=2.8.2)
Requires-Dist: typing-extensions (>=4.7.1)
Requires-Dist: urllib3 (>=1.25.3)
Project-URL: Documentation, https://docs.spaceblocks.cloud/permissions
Description-Content-Type: text/markdown

# Space Blocks Permissions Server SDK for Python

This is the Python server SDK for Space Blocks Permissions.

## Usage

Required Python version: 3.8 or later.

The package is published to the official Python Package Index (https://pypi.org/project/spaceblocks-permissions-server).

It can be installed with:

```bash
pip install spaceblocks-permissions-server
```

To get started, import the package and create an instance of the `PermissionsClient`:

```python
from spaceblocks_permissions_server import (
    PermissionsClient,
    ClientAuthenticationOptions
)

client = PermissionsClient(
    '<SPACE_BLOCKS_PERMISSIONS_URL>',
    ClientAuthenticationOptions(
        api_key='<YOUR_API_KEY>',
        client_id='<YOUR_CLIENT_ID>',
        client_secret='<YOUR_CLIENT_SECRET>'
    )
)

client.permission_api.check_permissions(...)
```

The code above uses a client ID and secret to issue an access token,
but a custom token can also be provided by using the `TokenAuthenticationOptions` instead.
Additionally, the client takes further options via a `SpaceBlocksClientOptions` as the third parameter.

Documentation for the platform and APIs are available here: https://docs.spaceblocks.cloud/permissions

A simple example can be found here: https://github.com/wemogy/spaceblocks-sample-helloworld/tree/main/python

