Skip to main content

Server SDK for Space Blocks Permissions, a permissions-as-a-service platform for developers

Project description

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:

pip install spaceblocks-permissions-server

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spaceblocks_permissions_server-4.0.2.tar.gz (31.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spaceblocks_permissions_server-4.0.2-py3-none-any.whl (61.7 kB view details)

Uploaded Python 3

File details

Details for the file spaceblocks_permissions_server-4.0.2.tar.gz.

File metadata

File hashes

Hashes for spaceblocks_permissions_server-4.0.2.tar.gz
Algorithm Hash digest
SHA256 37adbc69ba347e33ac57dd08a08037ba2819d9526b7232cb9a7cb084f55cf2f4
MD5 69b8e9ac49b1b419b7a9e81538757b81
BLAKE2b-256 39c8559973863fe8a66555421de8c203fad346a2dd3e06c6f44f3da4d2c8612b

See more details on using hashes here.

File details

Details for the file spaceblocks_permissions_server-4.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for spaceblocks_permissions_server-4.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3ce3bbaa2dc7bce8dfa38b9839ae9fe8fcbff4bc9b21d2cfaf6040f3cb1e35cf
MD5 482ce7c280ee012f95676908906a328b
BLAKE2b-256 4a95266333b6720665939a08763ffe9b8fcb748053997576b9daa9cdb180fcf3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page