capo-geo-maps 0.1.0__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.
- capo_geo_maps-0.1.0/LICENSE +21 -0
- capo_geo_maps-0.1.0/PKG-INFO +33 -0
- capo_geo_maps-0.1.0/README.md +7 -0
- capo_geo_maps-0.1.0/pyproject.toml +60 -0
- capo_geo_maps-0.1.0/setup.cfg +4 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/__init__.py +70 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_async.py +25 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_auth/_identity.py +16 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_auth/_providers.py +886 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_auth/_signers.py +88 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_auth/_sigv4.py +434 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_auth/_zapros_handler.py +80 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_iter.py +113 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_operations/maps_service/get_glyphs.py +145 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_operations/maps_service/get_sprites.py +152 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_operations/maps_service/get_static_map.py +206 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_operations/maps_service/get_style_descriptor.py +166 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_operations/maps_service/get_tile.py +178 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_pagination.py +21 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_protocol/__init__.py +1 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_protocol/errors.py +93 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_protocol/eventstream.py +238 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_protocol/serialize.py +47 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_protocol/xml.py +33 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_resources/maps_service/provider_resource.py +817 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_rule_engine/__init__.py +0 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_rule_engine/_aws_partition.py +160 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_rule_engine/_endpoint_rule_set.py +258 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_rule_engine/_endpoint_runtime.py +389 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_services/_aws_config.py +160 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_services/_pipeline.py +198 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_services/async_geo_maps.py +128 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/_services/geo_maps.py +126 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/errors/__init__.py +32 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/errors/_base.py +94 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/errors/access_denied_exception.py +47 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/errors/internal_server_exception.py +47 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/errors/resource_not_found_exception.py +47 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/errors/throttling_exception.py +45 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/errors/validation_exception.py +77 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/py.typed +0 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/_prelude/blob.py +12 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/_prelude/timestamp.py +17 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/api_key.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/buildings.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/color_scheme.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/compact_overlay.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/contour_density.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/country_code.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/distance_meters.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/geo_json_overlay.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/get_glyphs_request.py +21 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/get_glyphs_response.py +33 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/get_sprites_request.py +32 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/get_sprites_response.py +33 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/get_static_map_request.py +82 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/get_static_map_response.py +35 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/get_style_descriptor_request.py +48 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/get_style_descriptor_response.py +33 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/get_tile_request.py +39 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/get_tile_response.py +35 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/label_size.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/language_tag.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/map_feature_mode.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/map_style.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/position_list_string.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/position_string.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/scale_bar_unit.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/sensitive_float.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/sensitive_integer.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/sensitive_string.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/static_map_style.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/terrain.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/tile_additional_feature.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/tile_additional_feature_list.py +19 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/tileset.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/traffic.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/travel_mode.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/travel_mode_list.py +17 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/validation_exception_field.py +33 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/validation_exception_field_list.py +33 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/validation_exception_reason.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps/types/variant.py +5 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps.egg-info/PKG-INFO +33 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps.egg-info/SOURCES.txt +87 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps.egg-info/dependency_links.txt +1 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps.egg-info/requires.txt +6 -0
- capo_geo_maps-0.1.0/src/capo_geo_maps.egg-info/top_level.txt +1 -0
- capo_geo_maps-0.1.0/tests/test_sigv4.py +557 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Karen Petrosyan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: capo-geo-maps
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python SDK for Geo Maps.
|
|
5
|
+
Classifier: Development Status :: 4 - Beta
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: zapros>=0.13.0
|
|
21
|
+
Provides-Extra: sso
|
|
22
|
+
Requires-Dist: capo-sso>=0.2.0; extra == "sso"
|
|
23
|
+
Requires-Dist: capo-sso-oidc>=0.2.0; extra == "sso"
|
|
24
|
+
Requires-Dist: capo-sts>=0.3.0; extra == "sso"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# Getting Started
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
pip install capo-geo-maps
|
|
33
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "capo-geo-maps"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Python SDK for Geo Maps."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
classifiers = [
|
|
8
|
+
"Development Status :: 4 - Beta",
|
|
9
|
+
"Intended Audience :: Developers",
|
|
10
|
+
"License :: OSI Approved :: MIT License",
|
|
11
|
+
"Operating System :: OS Independent",
|
|
12
|
+
"Programming Language :: Python :: 3",
|
|
13
|
+
"Programming Language :: Python :: 3.10",
|
|
14
|
+
"Programming Language :: Python :: 3.11",
|
|
15
|
+
"Programming Language :: Python :: 3.12",
|
|
16
|
+
"Programming Language :: Python :: 3.13",
|
|
17
|
+
"Programming Language :: Python :: 3.14",
|
|
18
|
+
"Topic :: Software Development :: Code Generators",
|
|
19
|
+
"Typing :: Typed",
|
|
20
|
+
]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"zapros>=0.13.0",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.optional-dependencies]
|
|
26
|
+
# IAM Identity Center (SSO), assume-role and web-identity credentials providers
|
|
27
|
+
sso = [
|
|
28
|
+
"capo-sso>=0.2.0",
|
|
29
|
+
"capo-sso-oidc>=0.2.0",
|
|
30
|
+
"capo-sts>=0.3.0",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[tool.pytest.ini_options]
|
|
34
|
+
pythonpath = ["src"]
|
|
35
|
+
testpaths = ["tests"]
|
|
36
|
+
|
|
37
|
+
[tool.ty.environment]
|
|
38
|
+
python-version = "3.14"
|
|
39
|
+
root = ["./src"]
|
|
40
|
+
|
|
41
|
+
[tool.ty.src]
|
|
42
|
+
include = ["src", "tests"]
|
|
43
|
+
|
|
44
|
+
[tool.ty.rules]
|
|
45
|
+
missing-typed-dict-key = "ignore"
|
|
46
|
+
unused-type-ignore-comment = "ignore"
|
|
47
|
+
|
|
48
|
+
[tool.ruff.lint]
|
|
49
|
+
select = ["E", "F", "I"]
|
|
50
|
+
ignore = ["E501", "E741"]
|
|
51
|
+
|
|
52
|
+
[dependency-groups]
|
|
53
|
+
dev = [
|
|
54
|
+
"inline-snapshot>=0.33.0",
|
|
55
|
+
# TODO: fix for 0.0.69
|
|
56
|
+
"ty==0.0.68",
|
|
57
|
+
"pytest>=9.0.3",
|
|
58
|
+
"ruff>=0.15.14",
|
|
59
|
+
"trio",
|
|
60
|
+
]
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from . import _iter as _iter
|
|
4
|
+
from . import _protocol as _protocol
|
|
5
|
+
from ._auth._identity import Credentials as Credentials
|
|
6
|
+
from ._auth._identity import Identity as Identity
|
|
7
|
+
from ._auth._providers import (
|
|
8
|
+
AssumeRoleCredentialsProvider as AssumeRoleCredentialsProvider,
|
|
9
|
+
)
|
|
10
|
+
from ._auth._providers import (
|
|
11
|
+
AssumeRoleError as AssumeRoleError,
|
|
12
|
+
)
|
|
13
|
+
from ._auth._providers import (
|
|
14
|
+
CachedProvider as CachedProvider,
|
|
15
|
+
)
|
|
16
|
+
from ._auth._providers import (
|
|
17
|
+
ChainedProvider as ChainedProvider,
|
|
18
|
+
)
|
|
19
|
+
from ._auth._providers import (
|
|
20
|
+
CredentialsProvider as CredentialsProvider,
|
|
21
|
+
)
|
|
22
|
+
from ._auth._providers import (
|
|
23
|
+
EnvCredentialsProvider as EnvCredentialsProvider,
|
|
24
|
+
)
|
|
25
|
+
from ._auth._providers import (
|
|
26
|
+
IdentityNotFound as IdentityNotFound,
|
|
27
|
+
)
|
|
28
|
+
from ._auth._providers import (
|
|
29
|
+
IdentityProvider as IdentityProvider,
|
|
30
|
+
)
|
|
31
|
+
from ._auth._providers import (
|
|
32
|
+
MissingDependencyError as MissingDependencyError,
|
|
33
|
+
)
|
|
34
|
+
from ._auth._providers import (
|
|
35
|
+
ProfileCredentialsProvider as ProfileCredentialsProvider,
|
|
36
|
+
)
|
|
37
|
+
from ._auth._providers import (
|
|
38
|
+
SsoCredentialsProvider as SsoCredentialsProvider,
|
|
39
|
+
)
|
|
40
|
+
from ._auth._providers import (
|
|
41
|
+
SSOError as SSOError,
|
|
42
|
+
)
|
|
43
|
+
from ._auth._providers import (
|
|
44
|
+
StaticAwsCredentialsProvider as StaticAwsCredentialsProvider,
|
|
45
|
+
)
|
|
46
|
+
from ._auth._providers import (
|
|
47
|
+
WebIdentityCredentialsProvider as WebIdentityCredentialsProvider,
|
|
48
|
+
)
|
|
49
|
+
from ._auth._signers import Signer as Signer
|
|
50
|
+
from ._auth._signers import SigV4Signer as SigV4Signer
|
|
51
|
+
from ._services._pipeline import (
|
|
52
|
+
AsyncOperationOptions as AsyncOperationOptions,
|
|
53
|
+
)
|
|
54
|
+
from ._services._pipeline import (
|
|
55
|
+
AsyncOperationRequest as AsyncOperationRequest,
|
|
56
|
+
)
|
|
57
|
+
from ._services._pipeline import (
|
|
58
|
+
AsyncOperationResponse as AsyncOperationResponse,
|
|
59
|
+
)
|
|
60
|
+
from ._services._pipeline import (
|
|
61
|
+
OperationOptions as OperationOptions,
|
|
62
|
+
)
|
|
63
|
+
from ._services._pipeline import (
|
|
64
|
+
OperationRequest as OperationRequest,
|
|
65
|
+
)
|
|
66
|
+
from ._services._pipeline import (
|
|
67
|
+
OperationResponse as OperationResponse,
|
|
68
|
+
)
|
|
69
|
+
from ._services.async_geo_maps import AsyncGeoMapsClient as AsyncGeoMapsClient
|
|
70
|
+
from ._services.geo_maps import GeoMapsClient as GeoMapsClient
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
from typing import TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
import trio
|
|
8
|
+
else:
|
|
9
|
+
try:
|
|
10
|
+
import trio
|
|
11
|
+
except ImportError:
|
|
12
|
+
trio = None
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def in_trio_run() -> bool:
|
|
16
|
+
if trio is None:
|
|
17
|
+
return False
|
|
18
|
+
return trio.lowlevel.in_trio_run()
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
async def anysleep(delay: float) -> None:
|
|
22
|
+
if in_trio_run():
|
|
23
|
+
await trio.sleep(delay)
|
|
24
|
+
else:
|
|
25
|
+
await asyncio.sleep(delay)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from typing import TypedDict
|
|
5
|
+
|
|
6
|
+
from typing_extensions import NotRequired
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Identity(TypedDict):
|
|
10
|
+
expiration: NotRequired[datetime | None]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Credentials(Identity):
|
|
14
|
+
access_key: str
|
|
15
|
+
secret_key: str
|
|
16
|
+
session_token: NotRequired[str | None]
|