# 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
Raw data
{
"_id": null,
"home_page": "https://spaceblocks.cloud",
"name": "spaceblocks-permissions-server",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "space blocks, permissions, rbac",
"author": "Space Blocks Team",
"author_email": "hello@spaceblocks.cloud",
"download_url": "https://files.pythonhosted.org/packages/bf/d3/cb484202a4c8b9859f07b30fd7f0ba6684e18866f6a49ce5abedeaa0bd73/spaceblocks_permissions_server-2.12.0.tar.gz",
"platform": null,
"description": "# Space Blocks Permissions Server SDK for Python\n\nThis is the Python server SDK for Space Blocks Permissions.\n\n## Usage\n\nRequired Python version: 3.8 or later.\n\nThe package is published to the official Python Package Index (https://pypi.org/project/spaceblocks-permissions-server).\n\nIt can be installed with:\n\n```bash\npip install spaceblocks-permissions-server\n```\n\nTo get started, import the package and create an instance of the `PermissionsClient`:\n\n```python\nfrom spaceblocks_permissions_server import (\n PermissionsClient,\n ClientAuthenticationOptions\n)\n\nclient = PermissionsClient(\n '<SPACE_BLOCKS_PERMISSIONS_URL>',\n ClientAuthenticationOptions(\n api_key='<YOUR_API_KEY>',\n client_id='<YOUR_CLIENT_ID>',\n client_secret='<YOUR_CLIENT_SECRET>'\n )\n)\n\nclient.permission_api.check_permissions(...)\n```\n\nThe code above uses a client ID and secret to issue an access token,\nbut a custom token can also be provided by using the `TokenAuthenticationOptions` instead.\nAdditionally, the client takes further options via a `SpaceBlocksClientOptions` as the third parameter.\n\nDocumentation for the platform and APIs are available here: https://docs.spaceblocks.cloud/permissions\n\nA simple example can be found here: https://github.com/wemogy/spaceblocks-sample-helloworld/tree/main/python\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Server SDK for Space Blocks Permissions, a permissions-as-a-service platform for developers",
"version": "2.12.0",
"project_urls": {
"Documentation": "https://docs.spaceblocks.cloud/permissions",
"Homepage": "https://spaceblocks.cloud"
},
"split_keywords": [
"space blocks",
" permissions",
" rbac"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "60c41ba0b7b4612d9fa428ff09177510242d73cc0e89b556dc09125746202cba",
"md5": "8fd7fbd5d5f511caedb735ec24b44014",
"sha256": "3d20a3d6a6320786254600597e0f6ed800342aeb8855466dcb0ac6ca26130ce4"
},
"downloads": -1,
"filename": "spaceblocks_permissions_server-2.12.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8fd7fbd5d5f511caedb735ec24b44014",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 61712,
"upload_time": "2024-12-07T14:45:22",
"upload_time_iso_8601": "2024-12-07T14:45:22.275990Z",
"url": "https://files.pythonhosted.org/packages/60/c4/1ba0b7b4612d9fa428ff09177510242d73cc0e89b556dc09125746202cba/spaceblocks_permissions_server-2.12.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bfd3cb484202a4c8b9859f07b30fd7f0ba6684e18866f6a49ce5abedeaa0bd73",
"md5": "56755ba1429fe2f8d204af7eae5c9f1f",
"sha256": "8d95980f6962efa3688a42f86dfc07851bfe8048e1f3917e28eef95e6d1a4fff"
},
"downloads": -1,
"filename": "spaceblocks_permissions_server-2.12.0.tar.gz",
"has_sig": false,
"md5_digest": "56755ba1429fe2f8d204af7eae5c9f1f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 31077,
"upload_time": "2024-12-07T14:45:23",
"upload_time_iso_8601": "2024-12-07T14:45:23.240929Z",
"url": "https://files.pythonhosted.org/packages/bf/d3/cb484202a4c8b9859f07b30fd7f0ba6684e18866f6a49ce5abedeaa0bd73/spaceblocks_permissions_server-2.12.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-07 14:45:23",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "spaceblocks-permissions-server"
}