Registry / alibabacloud-darabonba-map

alibabacloud-darabonba-map

JSON →
library0.0.1pypypiunverified

The `alibabacloud-darabonba-map` library provides the `Map` data structure for Python, which extends the built-in `dict` type with additional methods common in Alibaba Cloud's Darabonba SDK ecosystem. It is primarily used to represent request and response bodies, often generated by Darabonba's code generation tools. The current version is `0.0.1`, indicating it's in a very early development phase with potential for frequent updates.

pip install alibabacloud-darabonba-map
Install & Compatibility
Where this runs
tested against v0.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.4s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Map
from alibabacloud_darabonba_map import Map
from alibabacloud_darabonba_map import Map

Demonstrates how to import the `Map` class, create an instance, access elements, and use the `from_map` class method to convert a standard dictionary. The `Map` object inherits from `dict` and supports standard dictionary operations.

from alibabacloud_darabonba_map.map import Map # Create a Map object, similar to a dictionary my_map = Map({ 'serviceName': 'ecs', 'action': 'DescribeInstances', 'parameters': { 'RegionId': 'cn-hangzhou', 'InstanceIds': ['i-bp1abcdefg123456789'], } }) print(f"Created Map: {my_map}") print(f"Accessing 'serviceName': {my_map.get('serviceName')}") # Convert a standard dictionary to a Map object another_dict = {'status': 'success', 'code': 200} new_map = Map.from_map(another_dict) print(f"Map from dict: {new_map}") # Map objects behave like dictionaries my_map['new_key'] = 'new_value' print(f"Map after modification: {my_map}")
Debug
Known issues
breakingAs of version `0.0.1`, the library is in a very early stage. Future minor or patch versions may introduce breaking changes without strict adherence to semantic versioning until a stable `1.0.0` release. Always pin to an exact version or test thoroughly after updates.
fix
Pin your dependency to an exact version (e.g., `alibabacloud-darabonba-map==0.0.1`) and review changelogs for updates.
affects: 0.0.1-pre-1.0.0
gotchaThe `Map.from_map()` method performs a shallow copy of the input dictionary's contents. If your input dictionary contains nested dictionaries, these nested dictionaries will remain standard `dict` objects, not automatically converted to `Map` objects.
fix
If nested Darabonba `Map` functionality is required, you must explicitly convert nested dictionaries using `Map.from_map()` for each level or manually reconstruct the nested structure.
affects: 0.0.1
gotchaWhile `Map` inherits from `dict`, it is primarily intended for use within the Darabonba ecosystem for type consistency and schema validation, often in auto-generated SDK code. For generic dictionary operations where no specific Darabonba-related behavior is needed, using a standard Python `dict` might be simpler and more performant.
fix
Evaluate if the specific features of `alibabacloud_darabonba_map.map.Map` are truly required. If not, consider using a standard `dict` for general-purpose key-value storage.
affects: 0.0.1
Upgrade
Version history
0.0.1latest on PyPI
Audit
Dependencies
darabonba-envrequiredRequired for Darabonba environment utilities.
darabonba-corerequiredProvides core functionalities for Darabonba SDKs.
Agent activity
55 hits · last 30 days
node
4
claudebot
4
ahrefsbot
3
bytedance
2
amazonbot
1
Resources