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.4-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08c9411986fb359c5a9e664f16e9e2a71ea9d1306138966a809c86ae9f4b8d6d |
|
MD5 | 564907f7986a94e0a8ad8bd9db939093 |
|
BLAKE2b-256 | db9fe4c0849ea3d5b6fe1adbf141cb2dcc93f6af0bd947b9c63fc70df00812ed |
Hashes for pytomlpp-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e4bb6459b69f8a1f0ac8f952a0f8ec8c4add3011ae0b37bf75e4e8f1bfdd4ef |
|
MD5 | 842d598d4ab672404561e9d2e916213e |
|
BLAKE2b-256 | b07270bc14ee320f7ed8212d5700c605398d4ccff984addc186cf4dfb766b5c2 |
Hashes for pytomlpp-1.0.4-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c52760903cf18e0a391cd8c619ec5e26c0d81a28091ee1cd406abfacf2b9bfd4 |
|
MD5 | 924028369dbb56736f6318a9a4b1a331 |
|
BLAKE2b-256 | 3343956615682c3d5656c175cec05cfeb8af66204051b7f2b703045bfdf9403a |
Hashes for pytomlpp-1.0.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cd53051ac5fb57cbe8654b81d2cce003a277bc443a3637c50c3fe567ea21116 |
|
MD5 | e6346d8bb006717fe2a67f972283d723 |
|
BLAKE2b-256 | e8ac1c2ba63356c1d75b56294818c787ae2c79f087a6912ee3a7edb4324692ee |
Hashes for pytomlpp-1.0.4-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8048e603621cae8dbd0782f5c5c6f2d7660b72487ea0aec233eca1d0a050f19f |
|
MD5 | aa37f457b0c9880deb077e5727454ad2 |
|
BLAKE2b-256 | 73674f87dbe33aefd4f00ce97a63a88e1c33d3580766d3122a6d07d486e66f25 |
Hashes for pytomlpp-1.0.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 844f1ffbc271107e95133eca7e53fc1a0dcf905f6d8e9c950c8442184da34d8a |
|
MD5 | e9a7d42a73fd9063ca0db9d804bde9a2 |
|
BLAKE2b-256 | 47b61e429b1bf03a9a0bb72b1d0328f8fa9d3d24bf1c4538a3e06e8f6a6a9eec |
Hashes for pytomlpp-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be072432202b528a0364fed500268e3599adc0204266cddf15fb511ea51dfdd9 |
|
MD5 | d0869c5410b8d954b867eebf3657d0a3 |
|
BLAKE2b-256 | f33e5a7c337e4915c31da45b2b5338fcf8d440f240d29d1f0b3671f55e18a89f |
Hashes for pytomlpp-1.0.4-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4e4e2b81377e3cf47408b10803ebf4add6d5ca33dd89e1e0b5712e9b49fd27d |
|
MD5 | 385cea555aec6ccbda4de71992f819f3 |
|
BLAKE2b-256 | ea8cca0617873a2f9c7b3e80359422a6fd7e8e1777cbad01f0c86fb7196d65dd |
Hashes for pytomlpp-1.0.4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab793ac6609f02bb78ba846692b693201a838ee6e564075a2f24c53b77bcfed7 |
|
MD5 | 0232f3e9b3818c7f2dc0b8c266992c1a |
|
BLAKE2b-256 | befd9f35a2e2cd82f324de5eaa7c8c99e31602ef3b23697db80d3c39d996abff |
Hashes for pytomlpp-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 516ae4df2901cb9a702bd95c7f7ddc7053747bb2b4cdba9b00475496f4c97b1e |
|
MD5 | effcff2031d41b2ad4ff4fa1c183a1db |
|
BLAKE2b-256 | 1409dd7c56894ac57ff32b97aa5c44b927483c09026c84564d25d556e71f68ed |
Hashes for pytomlpp-1.0.4-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f547d6fa93d818fcbf04538230f7a2b2ef5f9a5c85eef57d58ec5b3bd117b2a3 |
|
MD5 | 72c7b5141af22cbbf2c333d8812abe7b |
|
BLAKE2b-256 | a4ba0c475ff183ce14dc0ea15d072d8a66f9edef449723af2b2d07527d8fc12a |
Hashes for pytomlpp-1.0.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 913f46455e09d967151c820cad964a12c06be0a3ed7cff35efde1df15362c91c |
|
MD5 | 0eb61359606081e5bb255277924cd634 |
|
BLAKE2b-256 | 2039250e90e4aa21447fce1b0e928fcf661adea80c56b3f871d8a009ceb2160b |
Hashes for pytomlpp-1.0.4-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9bf4e8c3df9c9d9bd89e26d2f04c209b235113185839ad0b8d02227852fb7bb |
|
MD5 | 81a04068bb57ccec3c05b640abb6c916 |
|
BLAKE2b-256 | 177069518b1b3f827defd10abfdf28451294b09538811f7abefdd91080e19651 |
Hashes for pytomlpp-1.0.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c6464e8dfaa8844d7733b94c0bb5db3b94d486c9f2fb3799c2d370513fcee20 |
|
MD5 | eb508826066d47e29917dc6791dfa983 |
|
BLAKE2b-256 | a9ba15de9738539e3f4d311f9acee60863aa264b4ec7a0210987912cb334881c |
Hashes for pytomlpp-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a8cbd00037340441eb7eb1605cc7e495202e766b15f1d2f21d33d552b759dc1 |
|
MD5 | 1a525aaa7e07e8dc8b5f5210a2c838f1 |
|
BLAKE2b-256 | 2f53ddd7d35616b92df2ef63398441a3fcfa96d208c15291c6e6afe32c36eaa4 |
Hashes for pytomlpp-1.0.4-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a7a4ef9f2dab453d1665e059db3d0b0b094904ee33f4898f54fbfc8af0be012 |
|
MD5 | 4f8b95effdf80214da7b10a0f97c99c1 |
|
BLAKE2b-256 | 33fc42318ae2e1c04bc0514362b723ad8e8417a52e3df77e38a834d30b2c20a6 |
Hashes for pytomlpp-1.0.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9066821fe6b9e5b62d606b79e5ea84af34249149beeeca74254c532a2591ea16 |
|
MD5 | 1564cebb53b7d843ae2b8a8e546f627c |
|
BLAKE2b-256 | 7ea80b626a09b31acdb48b932bed47a5deda2c95070cbfe9de0f28346120f4ed |
Hashes for pytomlpp-1.0.4-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f46f5ff252b93f52d3af86cc9887e917540d14e90bd67e5c37920fbf5a5c427 |
|
MD5 | 649638f7b14be6de3bad4be8d41fd4a1 |
|
BLAKE2b-256 | ea8dd14adf279aa0c470265221dec660079b0b7ae84bd03af980844b5ded6501 |
Hashes for pytomlpp-1.0.4-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ab7ad704c25291735ed435f35058dea2080a5e8c018667bb8c503073381d388 |
|
MD5 | b88f370a0ef29e3dcb588c58cb798ca6 |
|
BLAKE2b-256 | 2ec0ac6bac2d96e3be40d523ef463dd653ae47f3b188e5c2d2e133075c384d66 |
Hashes for pytomlpp-1.0.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f59ecf86767622103e3a71de81ef3f6a90b62d83541ddd4e21cdfd6cfe6fcb6 |
|
MD5 | 026b39fc1946f7ef0338072cf438c9f2 |
|
BLAKE2b-256 | 5e1902adbcf9cd7fea0e5849ead2b260b5b3a51493d0f415952b034e695a3bc5 |
Hashes for pytomlpp-1.0.4-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b97e6b916acb8ecdd3d44b19b3758ae83acab5f399ee70affeaa5e49c538e808 |
|
MD5 | 54c22671beb1fbe9bf8cd96c9d982bf8 |
|
BLAKE2b-256 | 02ca5fce13a4abfb82ca6aa8470e66397e3ce4320d91baa29e8e6e47f145e1ac |
Hashes for pytomlpp-1.0.4-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c720429740dddc2da3fcb3eab38b3f8c3f549805b8dae0a0f69f72b96d7f3362 |
|
MD5 | 75395107040b5b9be8c8dc97f59e31e9 |
|
BLAKE2b-256 | 6ae140f811375bc9ed3ec331fd4aa3228659c3858f2cd888b94aea214b3d6d59 |
Hashes for pytomlpp-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fe9bcd66f18793fd45ed21ef997aa44ef809a0590c30f729218a7b0385035ec |
|
MD5 | 89b26c6bacf371fbe673f112a69308f6 |
|
BLAKE2b-256 | 1a71d7294b83630c7e483ce585523363dd86ffee565e3b72b6d0f07a5f42b036 |
Hashes for pytomlpp-1.0.4-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 899871a2164345455144f49e1562eb2b497854e65ac5197f5a08b0a428c92b58 |
|
MD5 | de51773bc18199f177bf6239fdefa3a5 |
|
BLAKE2b-256 | 2d304340d177e78acfd35735d0b8c47736577cde1ef81df41697820a8dc6ed70 |
Hashes for pytomlpp-1.0.4-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfde7d0e1b2d6bc68ba36b82f9db21197ce0e4fd3e885de2f1293d9ebe842495 |
|
MD5 | cb7b7ce6a0ba95e05076fcc352fa89c5 |
|
BLAKE2b-256 | 3fe479fb0ebda77b07769106825b72afe630c9938da99a0077e434bf9df60077 |
Hashes for pytomlpp-1.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 752614d827c7fa169fd720aa55f8df89b6e64584cb0bbe214c2648a8991dd773 |
|
MD5 | bf6c49228e37eaa45aed3f4627aaaa39 |
|
BLAKE2b-256 | 76b48c9e004ec7074ef76d3aafe86a0f4621487fcb8005dd70b0318f1b0024bb |
Hashes for pytomlpp-1.0.4-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e1958f4bf150596e2a1ead6c2ae3dba109ac55707ea2ae15976153de55fbc84 |
|
MD5 | 9b4842efc5a3c8ca3ae0a15edd30aaea |
|
BLAKE2b-256 | 4c0e2b8e140efb6462d1af1da01b82c0cf2a751a644b360c39fa760dd85bd877 |
Hashes for pytomlpp-1.0.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5018c1f8c3b6c33eb94ddb56850a5c0c044be910d14b68790ba4d0186827cd2 |
|
MD5 | bec06a4a806c8961e0ec430ad7bb2f0a |
|
BLAKE2b-256 | 3c469f06798eebb9a766e466480b7a7cb72998f860cb7f63358705198c96ebbe |
Hashes for pytomlpp-1.0.4-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22db8375aa84eef6674a436a6e74160c0befbbf14ba07b23a9d76a57413f1f4e |
|
MD5 | 18f9137e352de1d88acf18225a865286 |
|
BLAKE2b-256 | 598f4b91972b5949ed4dbf3aa50cf5faa759e565f86183f6eb6c80626d2253f0 |
Hashes for pytomlpp-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d3700ca0810231d0e9fd48be9e2b82ee9485ec197b1d5aeaf3b628901e69994 |
|
MD5 | 0331e32a8981948dd5d6b3d7ee37f2c8 |
|
BLAKE2b-256 | c3ab1a72daa451b00febcd5a673a39dd0cf798d47681cab5ed93bc46898fe1fa |
Hashes for pytomlpp-1.0.4-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c229c1238ec1bc2032d206705d85c6dd0805e8384a10636cc552eead341a72c2 |
|
MD5 | 00bdead072afabef65ad3e3d87366e80 |
|
BLAKE2b-256 | 1a889a4a3f0a69f2ea25032b02b9ee49faa8baf653fdd9b63456b81997f5b05e |
Hashes for pytomlpp-1.0.4-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f6074077cec4f73c69c2aefe1749e0ca6aa0a470cec10363e55fc092a400269 |
|
MD5 | 99e8f561bada9decf6c6848aa5261521 |
|
BLAKE2b-256 | f5f9a740ee73a4968b550a9857626f141aedd947cce7255a6981429387dabc99 |
Hashes for pytomlpp-1.0.4-cp36-cp36m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b9b5fd21c69c05b297494aa5a03f8d31c9e4e2591a4bac5110f25e359fe58d1 |
|
MD5 | a8f06c640e300c468b224095d74c4e04 |
|
BLAKE2b-256 | 669d48b77106b3bc28cca65fe102ef6f02a9f8f1c7451bdfc21cc3e2052ca36e |
Hashes for pytomlpp-1.0.4-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7924752a1862e3b1d224452333df2e4094bf4072b84d2631d934dd2ab8b3f77b |
|
MD5 | 7f0e537785cbb2164359834b1cbceadd |
|
BLAKE2b-256 | 6dd6a1368c38a832917cfda0cfaae6ced6d522aeee22cd06c780ca85acb56cc0 |
Hashes for pytomlpp-1.0.4-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62dfc4c27993f17d651576d96e892492fa31281ad582d1f659d71a65460c72e1 |
|
MD5 | c7aa0cd3f58474a5afd38f6a410faeff |
|
BLAKE2b-256 | b135c3312b42c0bf9d0ea93ca246e0fff38b4d5ddb49adfce7b72e07f9339d32 |
Hashes for pytomlpp-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec4d988e84f06b40f36d07e8effdb31fdfe2e92b66d9e3a61ac3c62c2e289d07 |
|
MD5 | 40e1e1fd20d3af1463f2191c70ccbb3d |
|
BLAKE2b-256 | d5ca0874a97ccc6dc811f20bfe757fe03d375ad61de0ea0eacfee94d7c3afab5 |