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

Uploaded Python 3

File details

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

File metadata

  • Download URL: streambird-1.0.7.tar.gz
  • Upload date:
  • Size: 10.7 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.7.tar.gz
Algorithm Hash digest
SHA256 652f241826a758861a44124bf1768e8cb9be82946f27a87d3d9022a66f720f0a
MD5 38e839cfdb726e64f60678da0a3eab41
BLAKE2b-256 c275d4d6072f65d47a88ef4cca5a214084b8658babc1487a397cd64ebabb3d3d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: streambird-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 14.6 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c07b50df3424832febff0588c74d46e557c4a0c069b4bbf4ce142494f5b23da8
MD5 6cd04e4f86a63f73d2852b9562661de2
BLAKE2b-256 7d5a96387425d52544e75a69416fc682dea6180926164f399ca3317679284abd

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