iaptoolkit 0.0.2__tar.gz → 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iaptoolkit
3
- Version: 0.0.2
3
+ Version: 0.0.3
4
4
  Summary: Library of common utils for interacting with Identity-Aware Proxies
5
5
  Author: Rob Voigt
6
6
  Author-email: code@ravoigt.com
@@ -9,7 +9,7 @@ Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Programming Language :: Python :: 3.11
10
10
  Classifier: Programming Language :: Python :: 3.12
11
11
  Requires-Dist: google-auth (>=2.26.2,<3.0.0)
12
- Requires-Dist: kvcommon (>=0.0.6,<0.0.7)
12
+ Requires-Dist: kvcommon (>=0.0.7.1,<0.0.8.0)
13
13
  Requires-Dist: pytest (>=7.4.4,<8.0.0)
14
14
  Requires-Dist: requests (>=2.31.0,<3.0.0)
15
15
  Requires-Dist: toml (>=0.10.2,<0.11.0)
@@ -1,18 +1,34 @@
1
1
  [tool.poetry]
2
2
  name = "iaptoolkit"
3
- version = "0.0.2"
3
+ version = "0.0.3"
4
4
  description = "Library of common utils for interacting with Identity-Aware Proxies"
5
5
  authors = ["Rob Voigt <code@ravoigt.com>"]
6
6
  readme = "README.md"
7
7
 
8
+ [build-system]
9
+ requires = ["poetry-core>=1.0.0"]
10
+ build-backend = "poetry.core.masonry.api"
11
+
12
+ [project.urls]
13
+ Homepage = "https://github.com/RAVoigt/iaptoolkit"
14
+ Repository = "https://github.com/RAVoigt/iaptoolkit"
15
+
16
+ # ================================
17
+ # Tools etc.
18
+ [tool.black]
19
+ line-length = 100
20
+ target-version = ['py311']
21
+ include = '\.pyi?$'
22
+
23
+ # ================================
24
+ # Dependencies
8
25
  [tool.poetry.dependencies]
9
26
  python = "^3.11"
10
27
  google-auth = "^2.26.2"
11
28
  requests = "^2.31.0"
12
29
  pytest = "^7.4.4"
13
30
  toml = "^0.10.2"
14
- kvcommon = "^0.0.6"
15
-
31
+ kvcommon = "^0.0.7.1"
16
32
 
17
33
  [tool.poetry.dev-dependencies]
18
34
  black = "*"
@@ -25,12 +41,6 @@ pytest-cov = "*"
25
41
  pytest-socket = "*"
26
42
  pyfakefs = "^5.3.2"
27
43
 
28
-
29
- [tool.black]
30
- line-length = 100
31
- target-version = ['py311']
32
- include = '\.pyi?$'
33
-
34
- [build-system]
35
- requires = ["poetry-core>=1.0.0"]
36
- build-backend = "poetry.core.masonry.api"
44
+ # [tool.poetry.extras]
45
+ # flask = ["flask"]
46
+ # k8s = ["kubernetes"]
@@ -49,3 +49,7 @@ class ServiceAccountNoDefaultCredentials(ServiceAccountTokenException):
49
49
 
50
50
  class ServiceAccountTokenFailedRefresh(ServiceAccountTokenException):
51
51
  pass
52
+
53
+
54
+ class InvalidDomain(IAPToolkitBaseException):
55
+ pass
@@ -10,7 +10,7 @@ from iaptoolkit.utils.urls import is_url_safe_for_token
10
10
  from iaptoolkit.vars import IAPTOOLKIT_USE_AUTH_HEADER
11
11
 
12
12
 
13
- LOG = logger.get_logger("iaptoolkit")
13
+ LOG = logger.get_logger("iaptk")
14
14
 
15
15
 
16
16
  def _sanitize_request_header(headers_dict: dict, header_key: str):
@@ -13,7 +13,7 @@ from .structs import TokenRefreshStruct
13
13
  # from .service_account import ServiceAccount
14
14
  from .service_account import GoogleServiceAccount
15
15
 
16
- LOG = logger.get_logger("iaptoolkit")
16
+ LOG = logger.get_logger("iaptk")
17
17
 
18
18
  google_sa_token_client = GoogleServiceAccount(GOOGLE_IAP_CLIENT_ID)
19
19
 
@@ -24,7 +24,7 @@ from .structs import TokenStruct
24
24
  from .structs import TokenRefreshStruct
25
25
 
26
26
 
27
- LOG = logger.get_logger("iaptoolkit")
27
+ LOG = logger.get_logger("iaptk")
28
28
  MAX_RECURSE = 3
29
29
 
30
30
 
@@ -5,7 +5,7 @@ import typing as t
5
5
  from kvcommon import logger
6
6
 
7
7
 
8
- LOG = logger.get_logger("iaptoolkit")
8
+ LOG = logger.get_logger("iaptk")
9
9
 
10
10
 
11
11
  @dataclass(kw_only=True)
@@ -13,7 +13,7 @@ from iaptoolkit.vars import PERSISTENT_DATASTORE_PATH
13
13
  from iaptoolkit.vars import PERSISTENT_DATASTORE_USERNAME
14
14
 
15
15
 
16
- LOG = logger.get_logger("iaptoolkit-datastore")
16
+ LOG = logger.get_logger("iaptk-ds")
17
17
 
18
18
 
19
19
  class TokenDatastore(VersionedDatastore):
@@ -4,13 +4,9 @@ from urllib.parse import ParseResult
4
4
  from kvcommon import logger
5
5
  from kvcommon.urls import get_netloc_without_port_from_url_parts
6
6
 
7
- from iaptoolkit.exceptions import IAPToolkitBaseException
7
+ from iaptoolkit.exceptions import InvalidDomain
8
8
 
9
- LOG = logger.get_logger("iaptoolkit")
10
-
11
-
12
- class InvalidDomain(IAPToolkitBaseException):
13
- pass
9
+ LOG = logger.get_logger("iaptk")
14
10
 
15
11
 
16
12
  def is_url_safe_for_token(
File without changes
File without changes