![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
dataclass-map-and-log
Advanced tools
Map dictionaries to pydantic dataclasses, log any extra attributes.
from dataclass_map_and_log.mapper import DataclassMapper
@dataclass
class Child:
name: str
surname: str
@dataclass
class SingleChild:
name: str
@dataclass
class Parent:
name: str
surname: str
children: List[Child]
single_child: SingleChild
data = {
"name": "parent_name",
"surname": "parent_surname",
"extra": "parent_extra_data",
"children": [
{
"name": "child1_name",
"surname": "child1_surname",
"extra": "child_extra_data",
},
{
"name": "child2_name",
"surname": "child2_surname",
},
],
"single_child": {"name": "test"},
}
definition = DataclassMapper.map(Parent, data)
You can then access the dataclass instance like:
definition.single_child.name
And you would have gotten the following warning log messages:
"Unexpected attribute extra on class <class 'tests.test_dataclass_map_and_log.Parent'> with value parent_extra_data",
"Unexpected attribute extra on class <class 'tests.test_dataclass_map_and_log.Child'> with value child_extra_data",
FAQs
Map objects to dataclasses and log differencies
We found that dataclass-map-and-log demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.