Skip to content

Official Python SDK for interacting with the WorkOS API

License

Notifications You must be signed in to change notification settings

chesampat/workos-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Official Python SDK for interacting with the WorkOS API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.7%
  • Shell 0.3%