
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
dictns
.. image:: https://travis-ci.org/tardyp/dictns.png?branch=master :target: https://travis-ci.org/tardyp/dictns
simple python class that merges dictionary and object APIs
Those Namespace objects work in a similar way as javascript objects. intended to help deadling with deep json objects, and save you a lot of [''] in your code
.. code-block:: python
from dictns import Namespace
n = Namespace(dict(a=1, b=3, c=dict(d=4)))
assert(n['a'] == n.a)
assert(n['c']['d'] == n.c.d)
you can wrap dicts and lists inside Namespace
.. code-block:: python
n = Namespace([dict(a=1, b=3, c=[dict(d=4)])])
assert(n[0]['a'] == n[0].a)
assert(n[0]['c'][0]['d'] == n[0].c[0].d)
you can also wrap dict subclasses like OrderedDict, but the resulting Namespace does not inherit original object characteristics (i.e. order in OrderedDict)
see unit tests for more usage examples
ChangeLog:
1.0: Initial version
1.1: Added Namespace comparaison tools
1.2: Namespace now support dict and list subclasses as input
1.3:
1.4: Allow Namespace objects to be weak referenced
1.5:
Launch unit tests:
python test/test_namespace.py
FAQs
simple class that merge dictionary and object API
We found that dictns 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.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.