Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This is an python wrapper for toml++
(https://marzer.github.io/tomlplusplus/).
Some points you may want to know before use:
toml++
means that this module is fully compatible with TOML v1.0.0.json
module does.pip install
and we have a pre-compiled binaries ready. No need to play with clang
, cmake
or any C++ toolchains.In [1]: import pytomlpp
In [2]: toml_string = 'hello = "世界"'
In [3]: pytomlpp.loads(toml_string)
Out[3]: {'hello': '世界'}
In [4]: type(_)
Out[4]: dict
In [6]: pytomlpp.dumps({"你好": "world"})
Out[6]: '"你好" = "world"'
There are some existing python TOML parsers on the market but from my experience they are implemented purely in python which is a bit slow.
Parsing data.toml 1000 times:
pytomlpp: 0.914 s
rtoml: 1.148 s ( 1.25x)
tomli: 4.850 s ( 5.30x)
qtoml: 11.882 s (12.99x)
tomlkit: 72.140 s (78.89x)
toml: Parsing failed. Likely not TOML 1.0.0-compliant.
Test it for yourself using the benchmark script.
We recommend you to use pip
to install this package:
pip install pytomlpp
You can also use conda
to install this package, on all common platforms & python versions.
If you have an issue with a package from conda-forge, you can raise an issue on the feedstock
conda install -c conda-forge pytomlpp
You can also install from source:
git clone git@github.com:bobfang1992/pytomlpp.git --recurse-submodules=third_party/tomlplusplus --shallow-submodules
cd pytomlpp
pip install .
FAQs
A python wrapper for toml++
We found that pytomlpp 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.