A python wrapper for toml++
Project description
pytomlpp
This is an python wrapper for toml++
(https://marzer.github.io/tomlplusplus/).
Some points you may want to know before use:
- Using
toml++
means that this module is fully compatible with TOML v1.0.0. - We convert toml structure to native python data structures (dict/list etc.) when parsing, this is more inline with what
json
module does. - The binding is using pybind11.
- The project is tested using toml-test and pytest.
Example
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"'
Why bother?
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 5000 times:
pytomlpp: 0.846 s
tomli: 3.317 s (3.9x slower)
toml: 5.697 s (6.7x slower)
qtoml: 8.473 s (10.0x slower)
tomlkit: 43.250 s (51.0x slower)
Test it for yourself using the benchmark script.
Installing
We recommand you to use pip
to install this package:
pip install pytomlpp
You can also use conda
to install this package, Note we only support linux 64 python 3.8 for now, I would love to provide this package on more python versions and platforms via conda but I have not found a way yet to automate this in the CI, if you know how to do this please contribute!
conda install -c dorafmon 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 .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pytomlpp-1.0.5-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01a1d79ab954d655dda33c2031c1e3193ba37a7311909a46fbba2d2cd6b5ce47 |
|
MD5 | ef975bce8e93363095d97013d7d19742 |
|
BLAKE2b-256 | e60244de575e5a62d9e8481de2a83a5e57d147ea7978486143096eda00115683 |
Hashes for pytomlpp-1.0.5-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3c8903f424446cfbf13ca624eb5ff7b25752648c6323211982c67e8c2de5bc5 |
|
MD5 | ef262155163a0cc08fc2dcbe78b7ee8d |
|
BLAKE2b-256 | d97f3627185f4647fa622225d27cdbdf443b1ac75ec348498f9e190b2bd2f6d4 |
Hashes for pytomlpp-1.0.5-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1542d266f7210afb4f0286e6d3bf4427c6853ab0ba2022e58b3a0ba55dbf4495 |
|
MD5 | 4d9496d69c606914b76230b443515316 |
|
BLAKE2b-256 | 3f97a8b30b9d25731130178a6325d126456dc773a1fb0afe9fc4c9279908f1c2 |
Hashes for pytomlpp-1.0.5-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d082b7cfaeb578794e0099ae33d347fa35f0590984de9afb627348b1dfdfd98 |
|
MD5 | f876185731bcacc2a4b48c35055fa9ee |
|
BLAKE2b-256 | 295d9badea2e35459c469ca74d8409d2af8f3f794b4ef292b87ef4ad943d6bc5 |
Hashes for pytomlpp-1.0.5-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9ae60ee525ac8b709a89b01a89dbfac7928b0f647072301515da904ffc1fc32 |
|
MD5 | 79ace468eb5fa2e5d0f8e5fdad1f22b9 |
|
BLAKE2b-256 | afbb898ebeec8d5225710b42ca4f2799170ec2ef1119d39730e8b3f9b4c22582 |
Hashes for pytomlpp-1.0.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47776f4e5a4abd406ca3671b8a06363f5c37472e395c34d7e723de32d73c8819 |
|
MD5 | 38364e349e17638302070595317548a9 |
|
BLAKE2b-256 | 33731b139011a6f049365aa47eb9e607733a4386a53dd96486ed477773b36ed2 |
Hashes for pytomlpp-1.0.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5914a132caabc51b00f345e3e9240a787c81420d5fdac88ee0f2f3d536fc1f40 |
|
MD5 | 4142f9ac303118c5fcc566b22ed4e5dd |
|
BLAKE2b-256 | 31e8b2fd67581555f1500742747d48a138fee04027c5a307d0ded1e61ef58dda |
Hashes for pytomlpp-1.0.5-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52b229b2abfe2e9e3486ea7f3c367efcd26c6d7e5e90094410ed0af7310de104 |
|
MD5 | bec12acc49108f35baa618791485dea0 |
|
BLAKE2b-256 | 884eb6e04c7fd9f3bf00ee18d5d461e6044f5ab1e5303eadf5bfbf55708a5bcb |
Hashes for pytomlpp-1.0.5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5fbbd459102f1bc1307e48f185c9986a9c4e99c6f8cd4fe117328cba83c77ea |
|
MD5 | 6d1a32826bfdc6a09e18c3c7ec80d8d5 |
|
BLAKE2b-256 | 52be432482cf4ca876891c858e9a99bcbf7776a456890fd616ddb8e70364748e |
Hashes for pytomlpp-1.0.5-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1f18a731935dcc925bea2bfd16578d1c53e0c50e4516eaf74f01c63f3e205e2 |
|
MD5 | e2b1c3731a81282c3a8e89f35be18189 |
|
BLAKE2b-256 | 2b102b0ba0597e9885ba0835951d53953b93b150574a9072ea05ac742a504910 |
Hashes for pytomlpp-1.0.5-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89ea37add9e0a5f283b3d7bdacd70e35cf61ec1dee09e6e444342a162db105f1 |
|
MD5 | 0adea4dba0ab51327cb7ed7b683a4390 |
|
BLAKE2b-256 | 5aac4481c22e1722e6668fe202928be3648a2bad936af51013cd9d8747df9db2 |
Hashes for pytomlpp-1.0.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0ca8e2d02ac28ff90d54dd47d75425113c558c337345eec95d9297373424b3f |
|
MD5 | c534257a0d00de3df648c127e654c883 |
|
BLAKE2b-256 | 0e53fc8b57b0974b88c5e418fcd5eaf1a5bc82fede31327cc1efbd504243d84c |
Hashes for pytomlpp-1.0.5-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f4e4c200eb1cfb8861ca3022cb9f270c20957350a15c97c950e7218eed3f7f0 |
|
MD5 | c77e8848526233d22922799c87eb35de |
|
BLAKE2b-256 | 7edbfb896c1c4c4d1cb6b7a46257ef84ba3a5f61b4fab7818ab7bcf6b0d4ee25 |
Hashes for pytomlpp-1.0.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3ebadedfe462054f1402523405d78ec93b6007feca66324eaf938b7a0c20338 |
|
MD5 | 3b5cab9585d95310b7f58aedd41f841c |
|
BLAKE2b-256 | c2ecc124eada244ac1ca31ebafa5777da4c5421a6cebe9cbd90d438a680305ba |
Hashes for pytomlpp-1.0.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 956021f5996cc3ef415440127914147899ee57bb512e0aeda57d179041c2c0b5 |
|
MD5 | e86f035adc4e87437bfccbd4d22fbd85 |
|
BLAKE2b-256 | bb1248efa0ff6395413fb557ce9face01a5805637cabc5e3c8ddc7c5fb4630da |
Hashes for pytomlpp-1.0.5-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96879f06e5bb1cb9a87b55f92b61d734dd46466ad58f499a9078a4b4f67c9277 |
|
MD5 | 3faa36f40aeb548a06414d429b8a1194 |
|
BLAKE2b-256 | feed0122e6ebac8fbedb8d9f2d71d7fc3e83d57f5ffc247b94d4c22ed1764802 |
Hashes for pytomlpp-1.0.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ef9121f217ad472106ceae7133d25fdf5596ca7eccebafd30d48910ac511664 |
|
MD5 | 4e345519bd2b7af754b7e3eaa35e64d4 |
|
BLAKE2b-256 | 6f6ae1a1418127997567413ae783bda664d924f4a523813433a998cb30425689 |
Hashes for pytomlpp-1.0.5-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17fd053883f36cb439f7e58b4583364b72f9174f5ce7fcef354f65663404b828 |
|
MD5 | 05f9be28a70e5dfd204880aa58566aea |
|
BLAKE2b-256 | 17ae39b86d84ccc92317071c97e70e999c55a7487a66b9fadfa0a0ec9286cc08 |
Hashes for pytomlpp-1.0.5-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afe5831e6d0498ab4563ec6661dc586e20358004f6689b77ac71d1048a3ff7ab |
|
MD5 | 478073da195b45ceb557b50c5c1e09c8 |
|
BLAKE2b-256 | 3a91a3bcd86128484265e6ab37b847de80d54bb7953acc8d9589682ab4845401 |
Hashes for pytomlpp-1.0.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1a07ff397b9a316a66101a934e4ec15c0d5791b51ebd1b61d35dda5fc55abcf |
|
MD5 | 2c43d60543a19077f23274ef8ccb1e88 |
|
BLAKE2b-256 | 20664ea616e46728093b86d2cefe617f08284444b2080858172cbc685a8db1a0 |
Hashes for pytomlpp-1.0.5-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc726a8409369ef07ef228e4202fd880f2c75ed96407726cd59542d76883fc74 |
|
MD5 | 4228a9dbf74c0c663de5cde5b27a33ea |
|
BLAKE2b-256 | 9679a2b0293b6ed8339ba30106d9abaf1070b7e41fa818e55ea6bfcd2a73bf0f |
Hashes for pytomlpp-1.0.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcaac6647b66311fba9d659e718928480ba0a83f33f602d66762114e67802f9e |
|
MD5 | 082500fdac31eb4c0900e0a74af73199 |
|
BLAKE2b-256 | c33faa119909ef0b83812cf6233ceb6db99223c9f57477bb5cc8321c25a65acb |
Hashes for pytomlpp-1.0.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7339d1fa6ac9f80c4c5a798af6639cc082162bb87d5a0ec96445f44eed12752 |
|
MD5 | 837b42fb48fb09b4282719958de3afc6 |
|
BLAKE2b-256 | c51452dc85b416eb6916c2cc23fb22ed5b78197a6488d7ab59b1f42b06ac20b6 |
Hashes for pytomlpp-1.0.5-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 023d83a479ac4093171e496750959d93f62a3833af628e86f5e3a8ef280662c3 |
|
MD5 | b7f1686fbabdd1283eb60e3b8ace2b17 |
|
BLAKE2b-256 | 86b8246d4d835d5e18702a4143e725c1a154df5ec0b1ec181b704f6b0022de2b |
Hashes for pytomlpp-1.0.5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 800f8ebecb59bc7e83c8e5c20fa22a5926691a1201f2fc6efba13fc17bbfea4a |
|
MD5 | 1ca82ac840ab6881f4eafe6366d6b357 |
|
BLAKE2b-256 | 8cc12cd8bafa2f56980bef1d33064aa83702519c17f93c75476e80ea814bacfe |
Hashes for pytomlpp-1.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c80e52942269bd0e38cd247c65ca813d3f5d01b2541dea046c1f54617d097afc |
|
MD5 | 380b1260918bb9ff0e417ee9df746e6a |
|
BLAKE2b-256 | 07b1f4c76a7347ab374d68be64bbbae3e9dbff5e815eac78e09c05074481ddae |
Hashes for pytomlpp-1.0.5-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46bad752f8230d1aec4ea3aec63d6e100c2e40f830560cf1d1603cc333a2b7c3 |
|
MD5 | 3c4bdc646791184179a0df6b2fda4c52 |
|
BLAKE2b-256 | 889dbb145f4ecde126a7885585a5c9cfa744da21b6efdfc0cc19235925a4bf77 |
Hashes for pytomlpp-1.0.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1754e881c3065ee5086b30b8b4fad0c051f6bdfc8e6ca0ca51f82606c12bd9f3 |
|
MD5 | 16c0a0da25f96b56c8321f5d6df02d9b |
|
BLAKE2b-256 | b5952793faab905c37b17ede0df126b66513ae01acfdf351e1c89dea9aecdb25 |
Hashes for pytomlpp-1.0.5-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81497420d329a2e99f49f6a644bcc38f902bcc132354a9dae4c5d389fce9975a |
|
MD5 | 627dafc5e3fd956bbbeb2e9b2e38cfad |
|
BLAKE2b-256 | 8f704962a2a72181d6ff9456b4bbd96b506c4c0818685da8cc3db9e4fc906fe6 |
Hashes for pytomlpp-1.0.5-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5f146cdc8bb041772e30b71aa5344ab3b9d4846d787e9b4068dcc76e6031593 |
|
MD5 | bc2e9677d175d2b816dfac62e2b7c042 |
|
BLAKE2b-256 | 550144c254ab29834c94389e8c9d4767a0b6c789d71b8f41676c07465272084a |
Hashes for pytomlpp-1.0.5-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9493d33d09dfcd354e18f463bb4842988d32c266d8c0523fe40de5c1177c1ba7 |
|
MD5 | 8adf3049da4f7d011681da9453dd9ef5 |
|
BLAKE2b-256 | 06f9287e8f48c69f4af350a353101d93b94cdf5f4e98394ae15c2371c21a87b6 |
Hashes for pytomlpp-1.0.5-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39e1efce4849f832d278ad609d5d36048e7b697dc9ca30e8c886e7ef2891f38a |
|
MD5 | 950f9744a95559919767d9863aec88fd |
|
BLAKE2b-256 | 90b4528f6064bd9a44d697b267dd8932dec3015f94f7b70562fd84261d39ac61 |
Hashes for pytomlpp-1.0.5-cp36-cp36m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03c7f3edff7ce45a6fcb071d7519fb1bedfc4f9ed57dea907a2eeff971126f53 |
|
MD5 | b2249c35caa09ef869fa2fafa4f3aa68 |
|
BLAKE2b-256 | 2b2013b06974589b5ba29b5f7d9593503903c565645d3861142a2a68c5fcba92 |
Hashes for pytomlpp-1.0.5-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9576d315793f118ad1216428c47aeddee004cbe03e4de4e15656765eb44e77f4 |
|
MD5 | f68d9c3cee49f8ccae2958b569058b82 |
|
BLAKE2b-256 | 636fa8815d483ae73608b726d9fca5eb7885b793247370ed0da0d716db1de0c6 |
Hashes for pytomlpp-1.0.5-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b66cde03766505a34068aa0f5bfaa619399081e171f497b27f3ac05caffed072 |
|
MD5 | 5268bfee04c31b93564fcabeeb1cd801 |
|
BLAKE2b-256 | 1a5eb6f90b306fbc7c7858798740c6158f956fb666007689e7af7c61fc6164d9 |
Hashes for pytomlpp-1.0.5-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0d3f80fcad7f2e92cd60bb5472204bdc182f3c9fc6171c962b3bacc0f1b45dc |
|
MD5 | 74c9dedafdbe21e02af8cb211de7d795 |
|
BLAKE2b-256 | 9a3e61b69e1e81501407e416dc60b64859e77d5e4e0f6a6eac384989da016542 |