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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for spaceblocks_permissions_server-4.0.5.tar.gz
Algorithm Hash digest
SHA256 dc02716a3e272318f44650eaaf9607e464d36b139050a74f46fa62a9981913b9
MD5 bcc5417587e13d0e9ae455994ce507ab
BLAKE2b-256 215fa96c72f5f94e7beb79bb09a961c3cba2b083515630ca9e0e1470d916f270

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spaceblocks_permissions_server-4.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bd3c972f759f2729ab280e4575ca09c3bafc7fa44bf9f2cfad965ffd7061dd02
MD5 dad3e1687ac33fe74b338011794dea2a
BLAKE2b-256 41fdce4a46ea854293967bcda77ab05bb9136c7d831bab226dcaa802ac14da51

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