Skip to main content

WorkOS Python Client

Project description

workos-python

Pyhon SDK to conveniently access the WorkOS API.

Installation

To install from PyPi, run the following:

pip install workos

To install from source, clone the repo and run the following:

python setup.py install

Getting Started

The package will need to be configured with your api key at a minimum and project id if you plan on utilizing SSO:

import workos

workos.api_key = sk_abdsomecharactersm284
workos.project_id = project_b27needthisforssotemxo

For your convenience, a client is available as an entry point for accessing the WorkOS feature set:

from workos import client

# URL to redirect a User to to initiate the WorkOS OAuth 2.0 workflow
client.sso.get_authorization_url(
    domain='customer-domain.com',
    redirect_uri='my-domain.com/auth/callback',
    state={
        'stuff': 'from_the_original_request',
        'more_things': 'ill_get_it_all_back_when_oauth_is_complete',
    }
)

# Get the WorkOSProfile for an authenticated User
client.get_profile(oauth_code)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

workos-0.6.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

workos-0.6.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file workos-0.6.0.tar.gz.

File metadata

  • Download URL: workos-0.6.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for workos-0.6.0.tar.gz
Algorithm Hash digest
SHA256 e915c84bb42ca2c762f7f5afed145ff29c845bd5737b1b9d9f0920f178b63958
MD5 c728b4b7d000f83ebcb12311b08ce0ca
BLAKE2b-256 64790c569529e1676753f3bc6809a0aec7dc3545ec3057728dd6320f6adf67f1

See more details on using hashes here.

File details

Details for the file workos-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: workos-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for workos-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e263728c06c023255b8ab62216f82e266a1cedbe7fa7138f2d3a453bbf74f9dc
MD5 2db7bcdcc9e9e793ce4c6798f38139a9
BLAKE2b-256 3e429dbb3402d1371bdcf7b71121ee9884002932117dd2939ef5429d75c3af4c

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