Skip to content

Commit a7702ea

Browse files
authored
Merge pull request #1 from integration-os/chore/version-1.0.0
chore: sdk version 1.0.0
2 parents be7b467 + 060f411 commit a7702ea

File tree

4 files changed

+17
-31
lines changed

4 files changed

+17
-31
lines changed

README.md

+13-20
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# IntegrationOS AuthKit SDK for Python
22

3-
Secure token generation for [IntegrationOS AuthKit](https://docs.integrationos.com/docs/authkit)
4-
using [PyPI](https://pypi.org/).
3+
Secure token generation for [IntegrationOS AuthKit](https://docs.integrationos.com/docs/authkit) using [PyPI](https://pypi.org/).
54

65
## Installation
76

@@ -18,29 +17,23 @@ Here's a quick example of how to use the SDK:
1817
```python
1918
from integrationos import AuthKit
2019

21-
# Initialize the AuthKit with your secret
22-
auth_kit = AuthKit("your_secret_here")
20+
@app.route('/authkit-token', methods=['POST'])
21+
def create_authkit_token():
22+
payload = {
23+
"group": "meaningful-id", # a meaningful identifier (i.e., organizationId)
24+
"label": "Friendly Label", # a human-friendly label (i.e., organizationName)
25+
}
2326

24-
# Create an embed token
25-
payload = {
26-
"group": "your_group",
27-
"label": "your_label",
28-
# Add other required parameters
29-
}
27+
embed_token = AuthKit("sk_live_12345")
28+
response = embed_token.create(payload)
3029

31-
result = auth_kit.create(payload)
32-
print(result)
30+
return response
3331
```
3432

35-
You'll want to switch out the API Key for your own, which will later tell your frontend which integrations you'd like to
36-
make available to your users.
33+
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.
3734

38-
You'll also want to populate the `Group` and `Label` fields depending on how you want to organize and query your users'
39-
connected accounts. The Group is especially important as it's used to generate the
40-
unique [Connection Key](https://docs.integrationos.com/docs/setup) for the user once they successfully connect an
41-
account.
35+
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.
4236

4337
## Full Documentation
4438

45-
Please refer to the official [IntegrationOS AuthKit](https://docs.integrationos.com/docs/authkit) docs for a more
46-
holistic understanding of IntegrationOS AuthKit.
39+
Please refer to the official [IntegrationOS AuthKit](https://docs.integrationos.com/docs/authkit) docs for a more holistic understanding of IntegrationOS AuthKit.

integrationos/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
__all__ = ['AuthKit']
44

5-
__version__ = "0.1.0"
5+
__version__ = "1.0.0"

integrationos/auth_kit.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,11 @@ def __init__(self, secret: str, configs: Dict = None):
1010

1111
def _get_url(self, type: str) -> str:
1212
services_url = self.configs.get("base_url", "https://api.integrationos.com")
13-
14-
if "localhost" in services_url:
15-
api_url = "http://localhost:3005"
16-
elif "development" in services_url:
17-
api_url = "https://development-api.integrationos.com"
18-
else:
19-
api_url = "https://api.integrationos.com"
2013

2114
urls = {
2215
"get_settings": f"{services_url}/internal/v1/settings/get",
2316
"create_event_link": f"{services_url}/internal/v1/event-links/create",
24-
"get_connection_definitions": f"{api_url}/v1/public/connection-definitions?limit=100",
17+
"get_connection_definitions": f"{services_url}/v1/public/connection-definitions?limit=100",
2518
"create_embed_token": f"{services_url}/internal/v1/embed-tokens/create",
2619
"get_session_id": f"{services_url}/v1/public/generate-id/session_id",
2720
}

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
from setuptools import setup, find_packages
1+
from setuptools import setup
22

33
with open("README.md", "r", encoding="utf-8") as fh:
44
long_description = fh.read()
55

66
setup(
77
name="integrationos-authkit",
8-
version="0.1.0",
8+
version="1.0.0",
99
author="IntegrationOS",
1010
author_email="[email protected]",
1111
description="Secure token generation for IntegrationOS AuthKit in Python",

0 commit comments

Comments
 (0)