diff --git a/tap_lucid_scim/client.py b/tap_lucid_scim/client.py index 2fb8d78..2659ed9 100644 --- a/tap_lucid_scim/client.py +++ b/tap_lucid_scim/client.py @@ -3,11 +3,12 @@ from __future__ import annotations from typing import Any, Callable -from memoization import cached +from urllib.parse import parse_qsl + import requests +from memoization import cached from singer_sdk.authenticators import BearerTokenAuthenticator from singer_sdk.streams import RESTStream -from urllib.parse import parse_qsl from tap_lucid_scim.pagination import LucidScimPaginator @@ -66,7 +67,7 @@ def get_new_paginator(self) -> LucidScimPaginator: """ return LucidScimPaginator(start_value=1, page_size=0) - #TODO: add backoff + # TODO: add backoff # https://lucidchart.zendesk.com/hc/en-us/community/posts/8678361152020-Rate-Limit-for-Lucid-chart-SCIM-API-s # 100 request/minute limit with 429 code diff --git a/tap_lucid_scim/streams.py b/tap_lucid_scim/streams.py index aee75f7..923720a 100644 --- a/tap_lucid_scim/streams.py +++ b/tap_lucid_scim/streams.py @@ -5,7 +5,6 @@ import typing as t from pathlib import Path - from tap_lucid_scim.client import LucidScimStream SCHEMAS_DIR = Path(__file__).parent / Path("./schemas") @@ -21,7 +20,7 @@ class UsersStream(LucidScimStream): schema_filepath = SCHEMAS_DIR / "users.json" # noqa: ERA001 -#class GroupsStream(LucidScimStream): +# class GroupsStream(LucidScimStream): # """Define custom stream.""" # # name = "groups" @@ -30,11 +29,11 @@ class UsersStream(LucidScimStream): # replication_key = None # schema_filepath = SCHEMAS_DIR / "groups.json" # noqa: ERA001 -#class GroupsStream(LucidScimSchemas): +# class GroupsStream(LucidScimSchemas): # """Define custom stream.""" # # name = "schemas" # path = "/Schemas" # primary_keys: t.ClassVar[list[str]] = ["id"] # replication_key = None -# schema_filepath = SCHEMAS_DIR / "groups.json" # noqa: ERA001 \ No newline at end of file +# schema_filepath = SCHEMAS_DIR / "groups.json" # noqa: ERA001 diff --git a/tap_lucid_scim/tap.py b/tap_lucid_scim/tap.py index 22ec55f..206d6e9 100644 --- a/tap_lucid_scim/tap.py +++ b/tap_lucid_scim/tap.py @@ -36,10 +36,10 @@ class TapLucidScim(Tap): description="Custom configuration for streams.", ), th.Property( - 'page_size', + "page_size", th.IntegerType, default=None, - description='Result limit for paginated streams' + description="Result limit for paginated streams", ), th.Property( "api_url", @@ -56,7 +56,7 @@ def discover_streams(self) -> list[streams.LucidScimStream]: A list of discovered streams. """ return [ - # streams.GroupsStream(self), + # streams.GroupsStream(self), streams.UsersStream(self), ]