diff --git a/pyproject.toml b/pyproject.toml index e192e73..64916d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "tonic-textual" -version = "3.0.0" +version = "3.0.1" description = "Wrappers around the Tonic Textual API" authors = ["Adam Kamor ", "Joe Ferrara ", "Ander Steele ", "Ethan Philpott ", "Lyon Van Voorhis ", "Kirill Medvedev ", "Travis Matthews "] license = "MIT" diff --git a/tonic_textual/__init__.py b/tonic_textual/__init__.py index 528787c..0552768 100644 --- a/tonic_textual/__init__.py +++ b/tonic_textual/__init__.py @@ -1 +1 @@ -__version__ = "3.0.0" +__version__ = "3.0.1" diff --git a/tonic_textual/parse_api.py b/tonic_textual/parse_api.py index 476a1a3..12e1a60 100644 --- a/tonic_textual/parse_api.py +++ b/tonic_textual/parse_api.py @@ -32,9 +32,9 @@ class TextualParse: Parameters ---------- - base_url : str - The URL to your Tonic Textual instance. Do not include trailing backslashes. - api_key : str + base_url : Optional[str] + The URL to your Tonic Textual instance. Do not include trailing backslashes. The default value is https://textual.tonic.ai. + api_key : Optional[str] Your API token. This argument is optional. Instead of providing the API token here, it is recommended that you set the API key in your environment as the value of TEXTUAL_API_KEY. @@ -48,7 +48,7 @@ class TextualParse: """ def __init__( - self, base_url: str, api_key: Optional[str] = None, verify: bool = True + self, base_url: str = "https://textual.tonic.ai", api_key: Optional[str] = None, verify: bool = True ): if api_key is None: api_key = os.environ.get("TONIC_TEXTUAL_API_KEY") @@ -58,6 +58,7 @@ def __init__( "key as the value of the TEXTUAL_API_KEY environment " "variable." ) + self.api_key = api_key self.client = HttpClient(base_url, self.api_key, verify) self.verify = verify diff --git a/tonic_textual/redact_api.py b/tonic_textual/redact_api.py index e3fbe85..dcc754c 100644 --- a/tonic_textual/redact_api.py +++ b/tonic_textual/redact_api.py @@ -36,7 +36,7 @@ class TextualNer: Parameters ---------- base_url : str - The URL to your Tonic Textual instance. Do not include trailing backslashes. + The URL to your Tonic Textual instance. Do not include trailing backslashes. The default value is https://textual.tonic.ai. api_key : str Your API token. This argument is optional. Instead of providing the API token here, it is recommended that you set the API key in your environment as the @@ -51,7 +51,7 @@ class TextualNer: """ def __init__( - self, base_url: str, api_key: Optional[str] = None, verify: bool = True + self, base_url: str = "https://textual.tonic.ai", api_key: Optional[str] = None, verify: bool = True ): if api_key is None: api_key = os.environ.get("TONIC_TEXTUAL_API_KEY") @@ -61,6 +61,8 @@ def __init__( "key as the value of the TONIC_TEXTUAL_API_KEY environment " "variable." ) + + self.api_key = api_key self.client = HttpClient(base_url, self.api_key, verify) self.dataset_service = DatasetService(self.client)