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

Uploaded Python 3

File details

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

File metadata

  • Download URL: streambird-1.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 aa687b758f0a15df851ee9af98fe3899972561d37bb2657ec99304927f0f0ac3
MD5 7d6022840e3c0f39a69a14bb1c464ea9
BLAKE2b-256 f4d2c8e2aa40d75361469b7a30d94f8b0c0b91be773471145a272ced38638104

See more details on using hashes here.

File details

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

File metadata

  • Download URL: streambird-1.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f9643c537117290a05a2560cc28645d5bdfae54c218c45a293a16cc30c81fa84
MD5 2939243fe1068e30db985b336d5bdcc3
BLAKE2b-256 6d275feb91b74d6c317d5f898cc01ac091b03503b0586176a448ee7931a9262f

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