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.6.tar.gz (10.5 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.6-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: streambird-1.0.6.tar.gz
  • Upload date:
  • Size: 10.5 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.6.tar.gz
Algorithm Hash digest
SHA256 1595282b833b314c279e14352c8511bca601af4ded26172fcbdbc4205ba12fa8
MD5 e41538d27949a48ab7a1bbb1f56c94a1
BLAKE2b-256 8f1567b137520717f59f98220c7d6bbe5fbfef87b8e123c97fbcba3b0f96e4f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: streambird-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 13.9 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fa96e3f1afd36651be32004991b7328cfa69ddfb4ac5d532ffbec777a1a09ab2
MD5 576096f9b243a0f85bebcef82da001b8
BLAKE2b-256 2912f937d71692a98d442438cfdcff39c0e550caaf9211ba8c9559cd45fe3233

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