diff --git a/.gitignore b/.gitignore index f6a36ee..fd06c94 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,9 @@ __pycache__/ .vscode/* +# UV Build +dist/* + + # Test Artifacts -token_data.json \ No newline at end of file +token_data.json diff --git a/README.md b/README.md index 8871257..2c9ec10 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ # Trustcafe API Wrapper +Intended use (not working yet but testing.py does) +''' +import trustcafeapi +import os, simplejson as json + + +API = trustcafeapi.APIClient( + client_id=os.getenv("client_id"), + client_secret=os.getenv("client_secret"), + debug=True +) + +''' \ No newline at end of file diff --git a/apiclient.py b/apiclient.py index 1208ef0..22e6bce 100644 --- a/apiclient.py +++ b/apiclient.py @@ -41,7 +41,7 @@ class APIClient(BaseModel): if authenticate: token = self._access_token headers["Authorization"] = f"Bearer {token}" - + if self.debug: print({ "method": method.upper(), @@ -129,4 +129,5 @@ class APIClient(BaseModel): else: job_func = job_function - return job_func(self, *args, **kwargs) \ No newline at end of file + return job_func(self, *args, **kwargs) + diff --git a/pyproject.toml b/pyproject.toml index 61376ae..4bb9ad6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "trustcafe-api-wrapper" +name = "trustcafeapiwrapper" version = "0.1.0" description = "Add your description here" readme = "README.md" diff --git a/uv.lock b/uv.lock index f5a470e..a1bd361 100644 --- a/uv.lock +++ b/uv.lock @@ -212,7 +212,7 @@ wheels = [ ] [[package]] -name = "trustcafe-api-wrapper" +name = "trustcafeapiwrapper" version = "0.1.0" source = { virtual = "." } dependencies = [