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.6.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.6-py3-none-any.whl (61.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for spaceblocks_permissions_server-4.0.6.tar.gz
Algorithm Hash digest
SHA256 751329e6c37d99f5a082496471495b2d10c492c535e0a4f5ecb06d30b01c8548
MD5 e935fc44e1be530e3e0ee6bedd155046
BLAKE2b-256 78e1ff5960497d6d7ddb4ec4d8ae1bcabb9eb1660e41c2e3af5cecd63b64ec74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spaceblocks_permissions_server-4.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7afb9b2b6de2c1e2efa992a96d41144d72bd36e80310be589c4a8173de1fcd0b
MD5 9e7645dbbe7f4806cf09411cd310aea0
BLAKE2b-256 bd355d4d8424c824b142cfcae0c4a9db5c3137ee4bae0af30322a6414804610c

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