Skip to main content

The official Python client library for Streambird.io, the Passwordless Authentication Platform

Project description

Streambird | Python API Client

Installation

Install with PyPI (pip)

$ pip install --upgrade streambird

or install with Anaconda (conda)

$ conda install -c conda-forge streambird

Usage

import streambird

sb_client = streambird.Client("YOUR_API_KEY_HERE")

Example

Start a email magic link flow:

sb_client.magic_links.email.login_or_create(
    email='dev@streambird.io',
    login_redirect_url='https://example.com/login',
    registration_redirect_url='https://example.com/register',
)

Verify the magic llink token:

sb_client.magic_links.verify(
    token='bbqg5fxQrCkgIZr3HyWlxNdZ5l_lDNPrRlxnQ0KHTBk',
)

Error handling

If something went wrong while making API calls, then exceptions will be raised automatically as a StreambirdException parent type and child exceptions:

  • StreambirdInvalidRequest: 400 - Bad Request -- The request was unacceptable, often due to missing a required parameter.
  • StreambirdUnauthorized: 401 - Unauthorized -- No valid API key provided.
  • StreambirdNotEnabled: 402 - Not enabled -- Please contact support@streambird.io before creating this type of task.
  • StreambirdResourceNotFound: 404 - Not Found -- The requested resource doesn't exist.
  • StreambirdDuplicateResource: 409 - Conflict -- Object already exists with same name, idempotency key or unique_id.
  • StreambirdTooManyRequests: 429 - Too Many Requests -- Too many requests hit the API too quickly.
  • StreambirdInternalError: 500 - Internal Server Error -- We had a problem with our server. Try again later.
  • StreambirdServiceUnavailable: 503 - Server Timeout From Request Queueing -- Try again later.
  • StreambirdTimeoutError: 504 - Server Timeout Error -- Try again later.

Check out Streambird's API documentation for more details.

Troubleshooting

If you notice any problems, please email us at support@streambird.io.

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

streambird-1.0.5.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

streambird-1.0.5-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file streambird-1.0.5.tar.gz.

File metadata

  • Download URL: streambird-1.0.5.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.5

File hashes

Hashes for streambird-1.0.5.tar.gz
Algorithm Hash digest
SHA256 9ed3720ed992ed7add435726b094007e64eff026c544f2c358c275c08238a42b
MD5 f0dc4d454cfc6d697442ec6d2301c019
BLAKE2b-256 c9a2aeee127e2b451f86beefb2ed742e72b75945ed695b3e411194e991e2f5a5

See more details on using hashes here.

File details

Details for the file streambird-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: streambird-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.5

File hashes

Hashes for streambird-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 23b971c2853a2415d5bb07a9b05a245db5c83506313df18656d9c2b0dc9e27d7
MD5 15622aeda45dad0b77716e73012947ca
BLAKE2b-256 e77eaa60940c60c2ceeaaed0e29a4610057549ac252a3d91b921dcda63b2878b

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