Skip to content

Commit

Permalink
Merge pull request #2 from integration-os/chore/rename-package
Browse files Browse the repository at this point in the history
chore: rename package import
  • Loading branch information
paulkr authored Aug 22, 2024
2 parents a7702ea + e29cdc3 commit 5e3f5b6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ pip install integrationos-authkit
Here's a quick example of how to use the SDK:

```python
from integrationos import AuthKit
from integrationos import AuthKitToken

@app.route('/authkit-token', methods=['POST'])
def create_authkit_token():
def create():
payload = {
"group": "meaningful-id", # a meaningful identifier (i.e., organizationId)
"label": "Friendly Label", # a human-friendly label (i.e., organizationName)
"group": "org_123", # a meaningful identifier (i.e., organizationId)
"label": "Acme", # a human-friendly label (i.e., organizationName)
}

embed_token = AuthKit("sk_live_12345")
response = embed_token.create(payload)
authKitToken = AuthKitToken("sk_live_12345")
token = authKitToken.create(payload)

return response
return token
```

You'll want to switch out the API Key for your own, which will later tell your frontend which integrations you'd like to make available to your users.

You'll also want to populate the `Group` and `Label` fields depending on how you want to organize and query your users' connected accounts. The Group is especially important as it's used to generate the unique [Connection Key](https://docs.integrationos.com/docs/setup) for the user once they successfully connect an account.
You'll also want to populate the `group` and `label` fields depending on how you want to organize and query your users' connected accounts. The Group is especially important as it's used to generate the unique [Connection Key](https://docs.integrationos.com/docs/setup) for the user once they successfully connect an account.

## Full Documentation

Expand Down
6 changes: 3 additions & 3 deletions integrationos/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .auth_kit import AuthKit
from .auth_kit import AuthKitToken

__all__ = ['AuthKit']
__all__ = ['AuthKitToken']

__version__ = "1.0.0"
__version__ = "1.0.1"
2 changes: 1 addition & 1 deletion integrationos/auth_kit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import requests
from typing import Dict, List, Union

class AuthKit:
class AuthKitToken:
def __init__(self, secret: str, configs: Dict = None):
self.secret = secret
self.configs = configs or {}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="integrationos-authkit",
version="1.0.0",
version="1.0.1",
author="IntegrationOS",
author_email="[email protected]",
description="Secure token generation for IntegrationOS AuthKit in Python",
Expand Down

0 comments on commit 5e3f5b6

Please sign in to comment.