No project description provided
Project description
fastomit
Fast k-v omission
Table of Contents
Installation
pip install fastomit
Usage
Trust Omitter
from fastomit.omit import Omitter, always_omit, globally_hidden, hide, reset_omissions
# always omit keys abc and pw
om = Omitter(["abc", "pw"])
my_dict = {"abc": "val", "pw": "val2", "ok": True, "val": "v2"}
assert om.omit(my_dict) == {"abc": "***", "pw": "****", "ok": True, "val": "v2"}
# always omit keys abc and def
always_omit(["abc", "def"])
om = Omitter()
my_dict = {"abc": "v1", "def": "value", "deg": "nohide"}
assert om.omit(my_dict) == {"abc": "**", "def": "*****", "deg": "nohide"}
# no global omissions
reset_omissions()
om = Omitter()
assert om.omit(my_dict) == my_dict
No-Trust Omitter
from fastomit.omit import NoTrustOmitter, always_trust, globally_trusted, reset_trusted
# omits anything but these keys
om = NoTrustOmitter(["abc", "pw"])
my_dict = {"abc": "val", "pw": "val2", "ok": True, "val": "v2"}
assert om.omit(my_dict) == {"abc": "val", "pw": "val2", "val": "**"}
# trust keys abc and def
always_trust(["abc", "def"])
om = NoTrustOmitter([])
my_dict = {"abc": "v1", "def": "value", "deg": "hide"}
assert om.omit(my_dict) == {"abc": "v1", "def": "value", "deg": "****"}
# trust nothing
reset_trusted()
om = NoTrustOmitter()
assert om.omit(my_dict) == {"abc": "**", "def": "*****", "deg": "****"}
assert globally_trusted() == []
License
fastomit
is distributed under the terms of the MIT license.
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
fastomit-0.1.1.tar.gz
(7.8 kB
view hashes)
Built Distributions
fastomit-0.1.1-cp311-cp311-win32.whl
(251.1 kB
view hashes)
fastomit-0.1.1-cp310-cp310-win32.whl
(251.2 kB
view hashes)
fastomit-0.1.1-cp39-cp39-win32.whl
(251.7 kB
view hashes)
fastomit-0.1.1-cp38-cp38-win32.whl
(251.8 kB
view hashes)
Close
Hashes for fastomit-0.1.1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fc1dcf4077b902a23ac4cadea42d5cb14df4996874327d814aca26144900429 |
|
MD5 | f466214132fbbf0f9d966243c9585425 |
|
BLAKE2b-256 | 822af4e9b7f7f8cd386485c929ac079c578ae38d6d9ca6b063f82f1913919ef7 |
Close
Hashes for fastomit-0.1.1-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b7fbf56807a2e4ffd4e3ba8477d1a73fa3b9e078c26dbc25c912c09103cddbb |
|
MD5 | cf4cf5da09bfdd75a5b8c074a8ac8f39 |
|
BLAKE2b-256 | 722d5e25467d22aa6195d680edbddb21ff356cfff26ffe1d42514dd638c39649 |
Close
Hashes for fastomit-0.1.1-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be4932cc388ac2c6cac4d1be884d55338d91a5cbdc02f57a04b6cc0bafd1db88 |
|
MD5 | 75becb04f0cb069812b4bd43324d8c65 |
|
BLAKE2b-256 | 052149249f1e1f7425ff9c201efffc451f1a84ec010fae63806ffb937abb2667 |
Close
Hashes for fastomit-0.1.1-cp311-cp311-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd73bf7483a420bed675e8b28ac5e15519034bab6201a815f18b1fc155dd0baf |
|
MD5 | 6e312b10079fe873b600f70c22bf66df |
|
BLAKE2b-256 | 498b0ad9f1f642354f3fc80b6ebfae1ed936f092d7d9c30c5dad5b105b5ff9d7 |
Close
Hashes for fastomit-0.1.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a8250285a3ccf6ace1fe5a2f1ea28fecb2758fd1e124d375649743162c82da4 |
|
MD5 | c76a056162084ddee72e6f7d897fe1b9 |
|
BLAKE2b-256 | d76c806b092023365081fe5c70c1a90e1cb8d1cf69f584f8364c36829df8bced |
Close
Hashes for fastomit-0.1.1-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de87ed3e45a1031244c1d040eeaa3de091c0974575ab5c561a2564e24975dcc4 |
|
MD5 | 43cb232a9dbdb0cfe182fdb95588f38d |
|
BLAKE2b-256 | 9f5c40d76a3b0aa429a9699e78b0abe38414a39d20137e71f38e54818c166009 |
Close
Hashes for fastomit-0.1.1-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 663076276c4bffa8a480d87d888323b9d6665c052c956356fa3bcb52f6617a22 |
|
MD5 | e8e9faa9757360262e520cc2d05f9497 |
|
BLAKE2b-256 | beaf340ce0d1ca57af58c78efc63f3a498c603d50b2b0b3aac51ccb541c17998 |
Close
Hashes for fastomit-0.1.1-cp310-cp310-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4357c626c5d3d6947abd4a658654a1932f2457bfb05c44b1f1e0ecca18264b08 |
|
MD5 | b4264345709fbf351815ef2910a14c75 |
|
BLAKE2b-256 | 5ab2286cb56ad030158bbd6e43d10c307a648f6e1bfb324c0a92b4ac76cd8783 |
Close
Hashes for fastomit-0.1.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bd2df418288173255fa8a318364bc0ca5f4830a2344062dfeb69a500073014a |
|
MD5 | f8d95ef9a35969a160cdd35de5df86d4 |
|
BLAKE2b-256 | 09dd374fbca2d331060f46464a8567f36b27e2c150ef04375d16daa9c086b18f |
Close
Hashes for fastomit-0.1.1-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ebd2e67b104be5c00b2592ea051eb08b9c3fc126da2f5eff6226f1974fcecee |
|
MD5 | 259351445c7081a67e91dd97bdf065a7 |
|
BLAKE2b-256 | 8368463f8eea1ff80e485407385d7469a54b82ae84aef12fac2dd908dd099775 |
Close
Hashes for fastomit-0.1.1-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 381f5b81505e44b4404e17f768deba5470e2bb095c6f511c07a338ccc7392c4e |
|
MD5 | 26d8f26eed411863993eac24ce8ca29c |
|
BLAKE2b-256 | 6272f640f648b3b273068db1cedf055431340072dba9046188631b601798e9a9 |
Close
Hashes for fastomit-0.1.1-cp39-cp39-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7423bb5e9703bf417ae66680f21dd40c4cbc7dc984a9eb47f9d7ebbc9cfcbec |
|
MD5 | 2d317c7eedae7039a937e0ac909bc214 |
|
BLAKE2b-256 | 57d5086d70ec27201554c50e7390ffc68349957eab0c88d8463618d7c2778f30 |
Close
Hashes for fastomit-0.1.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f765956424957461698dce9c7a233b931ca25173af74191303b435a23e53491f |
|
MD5 | 49af3eb32d30bb4df8089fd2bb90a57b |
|
BLAKE2b-256 | 1f9b2b5d0a37cff79c96c7b38eead6d50e9980dde3805ac876b9c192743d07da |
Close
Hashes for fastomit-0.1.1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 306405171a99f2b4517f52833554e53be4eead7cba82525d35210a8530806aae |
|
MD5 | d013cb10678e9d4543f8c402f5022753 |
|
BLAKE2b-256 | fd7c69d27a263cc970ab302b8bdbe8ecde16577e65d762418418a8614ac33175 |
Close
Hashes for fastomit-0.1.1-cp38-cp38-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dae5300afb3810d9ecdf5d4d1a4ee682e6a6f264b1ac9f380d32649809d5e999 |
|
MD5 | 354f931623f84d29463e65afc96b67bd |
|
BLAKE2b-256 | 2dc852d52fa71dbab457fb7c6b1b491f2d9ef8512bedce4b2c6210006d0a77bc |
Close
Hashes for fastomit-0.1.1-cp38-cp38-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a13d044b6a0444ab867a59f34f41aa785452a09b5557fbfbbad76b18048a259 |
|
MD5 | 93dcfc244ab4457309cb5938489934ba |
|
BLAKE2b-256 | efe85495facd932795ce3245e0954f74a067e880b30d96dbbcac90f85f352fd6 |