Skip to content

Commit c1a0569

Browse files
pangea-sdk: add base_url_template
This allows for greater control over the complete API URL. Co-authored-by: "H. Andres Tournour" <andres.tournour@pangea.cloud>
1 parent fa0e22f commit c1a0569

File tree

17 files changed

+182
-172
lines changed

17 files changed

+182
-172
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- AI Guard: detector overrides.
1414
- AI Guard: topic detector.
1515
- AI Guard: `ignore_recipe` in detector overrides.
16+
- `base_url_template` has been added to `PangeaConfig` to allow for greater
17+
control over the complete API URL. This option may be a full URL with the
18+
optional `{SERVICE_NAME}` placeholder, which will be replaced by the slug of
19+
the respective service name. This supersedes `environment` and `insecure`.
1620

1721
### Changed
1822

examples/asyncio/sanitize/sanitize_examples/sanitize_and_share.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ async def main() -> None:
1919
domain = os.getenv("PANGEA_DOMAIN")
2020
assert domain
2121

22-
config = PangeaConfig(domain)
23-
# Create Sanitize client with its token and its config
22+
config = PangeaConfig(domain=domain)
2423

24+
# Create Sanitize client with its token and its config
2525
client = SanitizeAsync(token, config)
2626
try:
2727
# Create Sanitize file information

examples/asyncio/sanitize/sanitize_examples/sanitize_multipart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ async def main() -> None:
1919
domain = os.getenv("PANGEA_DOMAIN")
2020
assert domain
2121

22-
config = PangeaConfig(domain)
23-
# Create Sanitize client with its token and its config
22+
config = PangeaConfig(domain=domain)
2423

24+
# Create Sanitize client with its token and its config
2525
client = SanitizeAsync(token, config)
2626
try:
2727
# Create Sanitize file information

examples/asyncio/sanitize/sanitize_examples/sanitize_no_share.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ async def main() -> None:
1919
domain = os.getenv("PANGEA_DOMAIN")
2020
assert domain
2121

22-
config = PangeaConfig(domain)
23-
# Create Sanitize client with its token and its config
22+
config = PangeaConfig(domain=domain)
2423

24+
# Create Sanitize client with its token and its config
2525
client = SanitizeAsync(token, config)
2626
try:
2727
# Create Sanitize file information

examples/asyncio/sanitize/sanitize_examples/sanitize_split_upload_post_url.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ async def main() -> None:
2626
domain = os.getenv("PANGEA_DOMAIN")
2727
assert domain
2828

29-
config = PangeaConfig(domain)
30-
# Create Sanitize client with its token and its config
29+
config = PangeaConfig(domain=domain)
3130

31+
# Create Sanitize client with its token and its config
3232
client = SanitizeAsync(token, config)
3333
try:
3434
# Create Sanitize file information

examples/asyncio/sanitize/sanitize_examples/sanitize_split_upload_put_url.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ async def main() -> None:
2525
domain = os.getenv("PANGEA_DOMAIN")
2626
assert domain
2727

28-
config = PangeaConfig(domain)
29-
# Create Sanitize client with its token and its config
28+
config = PangeaConfig(domain=domain)
3029

30+
# Create Sanitize client with its token and its config
3131
client = SanitizeAsync(token, config)
3232
try:
3333
# Create Sanitize file information

examples/sanitize/sanitize_examples/sanitize_and_share.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ def main() -> None:
1818
domain = os.getenv("PANGEA_DOMAIN")
1919
assert domain
2020

21-
config = PangeaConfig(domain)
22-
# Create Sanitize client with its token and its config
21+
config = PangeaConfig(domain=domain)
2322

23+
# Create Sanitize client with its token and its config
2424
client = Sanitize(token, config)
2525
try:
2626
# Create Sanitize file information

examples/sanitize/sanitize_examples/sanitize_multipart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ def main() -> None:
1818
domain = os.getenv("PANGEA_DOMAIN")
1919
assert domain
2020

21-
config = PangeaConfig(domain)
22-
# Create Sanitize client with its token and its config
21+
config = PangeaConfig(domain=domain)
2322

23+
# Create Sanitize client with its token and its config
2424
client = Sanitize(token, config)
2525
try:
2626
# Create Sanitize file information

examples/sanitize/sanitize_examples/sanitize_no_share.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ def main() -> None:
1818
domain = os.getenv("PANGEA_DOMAIN")
1919
assert domain
2020

21-
config = PangeaConfig(domain)
22-
# Create Sanitize client with its token and its config
21+
config = PangeaConfig(domain=domain)
2322

23+
# Create Sanitize client with its token and its config
2424
client = Sanitize(token, config)
2525
try:
2626
# Create Sanitize file information

examples/sanitize/sanitize_examples/sanitize_split_upload_post_url.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ def main() -> None:
2626
domain = os.getenv("PANGEA_DOMAIN")
2727
assert domain
2828

29-
config = PangeaConfig(domain)
30-
# Create Sanitize client with its token and its config
29+
config = PangeaConfig(domain=domain)
3130

31+
# Create Sanitize client with its token and its config
3232
client = Sanitize(token, config)
3333
try:
3434
# Create Sanitize file information

0 commit comments

Comments
 (0)