Package: zenutils
zenutilsCollection of simple utils.Installpip install zenutilsExtra packages requiresFor python3.2 and python2.x, requires extra package: inspect2~=0.1.2For user who is using xxhash methods with hashutils, requires extra package: xxhashFor user who is using sm3 methods with hashutils, requires extra package: sm3utils.If your python installation's hashlib already support sm3 hash method, you don't have to install sm3utils.xxhash and sm3utils are not put into this package's requirements, you need to install them by your self.NoticeThe hashutils' hash methods are different on different python installations. The list below is based on Python 3.10.6 x86_64 on windows. Mostly md5, sha1, sha224, sha256, sha384, sha512 methods are supported.The hashutils' DEFAULT_HASH_METHOD is sm3 and DEFAULT_PASSWORD_HASH_METHOD is ssm3, so if your python installation is not support sm3 hash method, you need to install sm3utils by yourself.Utilszenutils.base64utilsa85decodea85encodeb16decodeb16encodeb32decodeb32encodeb32hexdecodeb32hexencodeb64decodeb64encodeb85decodeb85encodedecodedecodebytesencodeencodebytesstandard_b64decodestandard_b64encodeurlsafe_b64decodeurlsafe_b64encodezenutils.baseutilsNullzenutils.cacheutilsReqIdCachecacheget_cached_valuesimple_cachezenutils.cipherutilsBase64EncoderCipherBaseDecryptFailedEncoderBaseHexlifyEncoderIvCipherIvfCipherMappingCipherRawDataEncoderS12CipherS1CipherS2CipherSafeBase64EncoderUtf8Encoderzenutils.dateutilsget_daysget_monthsget_yearszenutils.dictutilsHttpHeadersDictObjectattrgetorsetattrsetchangechangesdeep_mergedifffix_objectignore_none_itemprefix_keyselectto_objecttouchupdatezenutils.errorutilsAccessDeniedAccountDisabledErrorAccountLockedErrorAccountRemovedErrorAccountStatusErrorAccountTemporaryLockedErrorAnotherServiceErrorAppAuthFailedAuthErrorBadParameterBadParameterTypeBadResponseContentBadUserTokenBizErrorBizErrorBaseCacheErrorCaptchaOnlyAllowedOnceCaptchaRequiredCaptchaValidateFailedCastFailedErrorCastToBooleanFailedCastToFloatFailedCastToIntegerFailedCastToNumbericFailedCastToStringFailedClientLostErrorConfigErrorDataErrorDatabaseErrorEventNotRegisteredFormErrorHttpErrorInformalRequestErrorInformalResultPackageInformalResultPackageLogicErrorLoginRequiredMessageQueueErrorMissingConfigItemMissingFieldMissingParameterNetworkErrorNoAccessPermissionErrorNoDeletePermissionErrorNoMatchingRouteFoundNoPermissionErrorNoPermissionToCleanCacheErrorNoReadPermissionErrorNoUpstreamServerAvailabeNoWritePermissionErrorNotSupportedHttpMethodNotSupportedTypeToCastOKParamErrorParseJsonErrorPermissionErrorRepeatedlySubmitFormReqeustForbiddenReqidDuplicateErrorRequestExpiredSYSTEM_ERROR_CODE_MAPPINGServiceErrorStringTooLongStringTooShortSysErrorTargetNotFoundTooLargeRequestErrorTsExpiredErrorTypeErrorUndefinedErrorUserDoesNotExistUserPasswordErrorValueExceedsMaxLimitValueLessThanMinLimitWrongFieldTypeWrongParameterTypeclean_language_nameget_error_infoget_languageset_error_infoset_languagezenutils.fsutilsTemporaryFilecopyexpandfile_content_replacefilecopyfirst_exists_fileget_application_config_filepathget_application_config_pathsget_safe_filenameget_size_deviationget_size_displayget_swap_filenameget_temp_workspaceget_unit_sizeinfomkdirmovepathjoinreadfilerenamermsafe_writesize_unit_namessize_unit_upper_limittouchtreecopywritezenutils.funcutilsBunchCallableChainableProxycall_with_injectchainclasspropertyget_all_builtin_exceptionsget_builtins_dictget_class_nameget_default_valuesget_inject_paramsget_method_helpget_method_signatureinspectis_a_classisclassmcall_with_injectsignaturetry_again_on_errorzenutils.hashutilsBase64ResultEncoderBlake2BHexlifyPasswordHashBlake2BPbkdf2PasswordHashBlake2BPbkdf2PasswordHashColonBlake2BSimplePasswordHashBlake2BSimpleSaltPasswordHashBlake2SHexlifyPasswordHashBlake2SPbkdf2PasswordHashBlake2SPbkdf2PasswordHashColonBlake2SSimplePasswordHashBlake2SSimpleSaltPasswordHashDigestResultEncoderHexlifyPasswordHashBaseHexlifyResultEncoderMd5HexlifyPasswordHashMd5Pbkdf2PasswordHashMd5Pbkdf2PasswordHashColonMd5SimplePasswordHashMd5SimpleSaltPasswordHashPasswordHashMethodBasePasswordHashMethodNotSupportErrorPbkdf2PasswordHashBaseResultEncoderBaseSha1HexlifyPasswordHashSha1Pbkdf2PasswordHashSha1Pbkdf2PasswordHashColonSha1SimplePasswordHashSha1SimpleSaltPasswordHashSha224HexlifyPasswordHashSha224Pbkdf2PasswordHashSha224Pbkdf2PasswordHashColonSha224SimplePasswordHashSha224SimpleSaltPasswordHashSha256HexlifyPasswordHashSha256Pbkdf2PasswordHashSha256Pbkdf2PasswordHashColonSha256SimplePasswordHashSha256SimpleSaltPasswordHashSha384HexlifyPasswordHashSha384Pbkdf2PasswordHashSha384Pbkdf2PasswordHashColonSha384SimplePasswordHashSha384SimpleSaltPasswordHashSha3_224HexlifyPasswordHashSha3_224Pbkdf2PasswordHashSha3_224Pbkdf2PasswordHashColonSha3_224SimplePasswordHashSha3_224SimpleSaltPasswordHashSha3_256HexlifyPasswordHashSha3_256Pbkdf2PasswordHashSha3_256Pbkdf2PasswordHashColonSha3_256SimplePasswordHashSha3_256SimpleSaltPasswordHashSha3_384HexlifyPasswordHashSha3_384Pbkdf2PasswordHashSha3_384Pbkdf2PasswordHashColonSha3_384SimplePasswordHashSha3_384SimpleSaltPasswordHashSha3_512HexlifyPasswordHashSha3_512Pbkdf2PasswordHashSha3_512Pbkdf2PasswordHashColonSha3_512SimplePasswordHashSha3_512SimpleSaltPasswordHashSha512HexlifyPasswordHashSha512Pbkdf2PasswordHashSha512Pbkdf2PasswordHashColonSha512SimplePasswordHashSha512SimpleSaltPasswordHashShaHexlifyPasswordHashShaPbkdf2PasswordHashShaPbkdf2PasswordHashColonShaSimplePasswordHashShaSimpleSaltPasswordHashSimplePasswordHashBaseSimpleSaltPasswordHashBaseSm3HexlifyPasswordHashSm3Pbkdf2PasswordHashSm3Pbkdf2PasswordHashColonSm3SimplePasswordHashSm3SimpleSaltPasswordHashXxh128HexlifyPasswordHashXxh128Pbkdf2PasswordHashXxh128Pbkdf2PasswordHashColonXxh128SimplePasswordHashXxh128SimpleSaltPasswordHashXxh32HexlifyPasswordHashXxh32Pbkdf2PasswordHashXxh32Pbkdf2PasswordHashColonXxh32SimplePasswordHashXxh32SimpleSaltPasswordHashXxh64HexlifyPasswordHashXxh64Pbkdf2PasswordHashXxh64Pbkdf2PasswordHashColonXxh64SimplePasswordHashXxh64SimpleSaltPasswordHashalgorithms_availableget_blake2bget_blake2b_base64get_blake2b_digestget_blake2b_hexdigestget_blake2sget_blake2s_base64get_blake2s_digestget_blake2s_hexdigestget_file_blake2bget_file_blake2b_base64get_file_blake2b_digestget_file_blake2b_hexdigestget_file_blake2sget_file_blake2s_base64get_file_blake2s_digestget_file_blake2s_hexdigestget_file_hashget_file_hash_base64get_file_hash_hexdigestget_file_hash_resultget_file_md5get_file_md5_base64get_file_md5_digestget_file_md5_hexdigestget_file_shaget_file_sha1get_file_sha1_base64get_file_sha1_digestget_file_sha1_hexdigestget_file_sha224get_file_sha224_base64get_file_sha224_digestget_file_sha224_hexdigestget_file_sha256get_file_sha256_base64get_file_sha256_digestget_file_sha256_hexdigestget_file_sha384get_file_sha384_base64get_file_sha384_digestget_file_sha384_hexdigestget_file_sha3_224get_file_sha3_224_base64get_file_sha3_224_digestget_file_sha3_224_hexdigestget_file_sha3_256get_file_sha3_256_base64get_file_sha3_256_digestget_file_sha3_256_hexdigestget_file_sha3_384get_file_sha3_384_base64get_file_sha3_384_digestget_file_sha3_384_hexdigestget_file_sha3_512get_file_sha3_512_base64get_file_sha3_512_digestget_file_sha3_512_hexdigestget_file_sha512get_file_sha512_base64get_file_sha512_digestget_file_sha512_hexdigestget_file_sha_base64get_file_sha_digestget_file_sha_hexdigestget_file_sm3get_file_sm3_base64get_file_sm3_digestget_file_sm3_hexdigestget_file_xxh128get_file_xxh128_base64get_file_xxh128_digestget_file_xxh128_hexdigestget_file_xxh32get_file_xxh32_base64get_file_xxh32_digestget_file_xxh32_hexdigestget_file_xxh64get_file_xxh64_base64get_file_xxh64_digestget_file_xxh64_hexdigestget_hashget_hash_base64get_hash_digestget_hash_hexdigestget_hash_resultget_md5get_md5_base64get_md5_digestget_md5_hexdigestget_password_hashget_password_hash_methodsget_pbkdf2_blake2bget_pbkdf2_blake2sget_pbkdf2_hmacget_pbkdf2_md5get_pbkdf2_shaget_pbkdf2_sha1get_pbkdf2_sha224get_pbkdf2_sha256get_pbkdf2_sha384get_pbkdf2_sha3_224get_pbkdf2_sha3_256get_pbkdf2_sha3_384get_pbkdf2_sha3_512get_pbkdf2_sha512get_pbkdf2_sm3get_pbkdf2_xxh128get_pbkdf2_xxh32get_pbkdf2_xxh64get_salted_hash_base64get_shaget_sha1get_sha1_base64get_sha1_digestget_sha1_hexdigestget_sha224get_sha224_base64get_sha224_digestget_sha224_hexdigestget_sha256get_sha256_base64get_sha256_digestget_sha256_hexdigestget_sha384get_sha384_base64get_sha384_digestget_sha384_hexdigestget_sha3_224get_sha3_224_base64get_sha3_224_digestget_sha3_224_hexdigestget_sha3_256get_sha3_256_base64get_sha3_256_digestget_sha3_256_hexdigestget_sha3_384get_sha3_384_base64get_sha3_384_digestget_sha3_384_hexdigestget_sha3_512get_sha3_512_base64get_sha3_512_digestget_sha3_512_hexdigestget_sha512get_sha512_base64get_sha512_digestget_sha512_hexdigestget_sha_base64get_sha_digestget_sha_hexdigestget_sm3get_sm3_base64get_sm3_digestget_sm3_hexdigestget_xxh128get_xxh128_base64get_xxh128_digestget_xxh128_hexdigestget_xxh32get_xxh32_base64get_xxh32_digestget_xxh32_hexdigestget_xxh64get_xxh64_base64get_xxh64_digestget_xxh64_hexdigestis_the_same_hash_methodmethod_loadnewpbkdf2_hmacregister_hexlify_password_hashregister_password_hash_methodregister_pbkdf2_password_hashregister_simple_password_hashregister_simple_salt_password_hashsetup_hash_method_loadervalidate_password_hashvalidate_pbkdf2_blake2bvalidate_pbkdf2_blake2svalidate_pbkdf2_hmacvalidate_pbkdf2_md5validate_pbkdf2_shavalidate_pbkdf2_sha1validate_pbkdf2_sha224validate_pbkdf2_sha256validate_pbkdf2_sha384validate_pbkdf2_sha3_224validate_pbkdf2_sha3_256validate_pbkdf2_sha3_384validate_pbkdf2_sha3_512validate_pbkdf2_sha512validate_pbkdf2_sm3validate_pbkdf2_xxh128validate_pbkdf2_xxh32validate_pbkdf2_xxh64zenutils.httputilsdownloadget_sitenameget_url_filenameget_url_save_pathget_urlinfourlparsezenutils.importutilsget_caller_globalsget_caller_localsimport_from_stringimport_modulezenutils.jsonutilsSimpleJsonEncodermake_simple_json_encoderregister_global_encodersimple_json_dumpszenutils.listutilsappend_newchunkclean_nonecomparecompare_executefirstgroupignore_none_elementint_list_to_bytesis_orderedlist2dictpadreplacetopological_sorttopological_testuniquezenutils.logutilsget_console_handlerget_file_handlerget_simple_configsetupzenutils.nameutilsget_last_namesget_random_nameget_suggest_first_namesguess_lastnameguess_surnamezenutils.numericutils_infinitybinary_decomposebytes2intsdecimal_change_basefloat_splitfrom_bytesget_float_partinfinityint2bytesints2bytesis_infinityninfinitypinfinityzenutils.packutilsAbstractResultPackerRcmPackerzenutils.perfutilstimeitzenutils.randomutilsLcg31RandomRandomUuidGeneratorchoicesget_password_seed32uuid1uuid3uuid4uuid5zenutils.serviceutilsDebugServiceServiceBasezenutils.sixutilsBASESTRING_TYPESBYTESBYTES_TYPEINT_TO_BYTESNUMERIC_TYPESPY2PY3STR_TYPETEXTbcharbstr_to_arraybytes_to_arraycreate_new_classdefault_encodingdefault_encodingsforce_bytesforce_textunicodezenutils.socketserverutilsNStreamExchangeProtocolBaseServerEngineBaseServerHandlezenutils.strutilsBAIBASE64_CHARSHEXLIFY_CHARSQIANSHIStrUtilsURLSAFEB64_CHARSWANYIbinarifybytes2intscamelcaptital_numberchar_force_to_intchunkcleancombinationscombinations2decodabledefault_cn_digitsdefault_cn_float_placesdefault_cn_negativedefault_cn_placesdefault_cn_yuandefault_encodingdefault_encodingsdefault_quotesdefault_random_string_choicesdo_cleanencodableforce_floatforce_intforce_numbericforce_type_toformat_with_mappingget_all_substringsget_base64imageget_image_byteshtml_element_css_appendint2bytesints2bytesis_base64_decodableis_chinese_characteris_hex_digitsis_str_composed_by_the_choicesis_unhexlifiableis_urlsafeb64_decodableis_uuidjoin_linesno_mappingnone_to_empty_stringparse_base64imagerandom_stringremove_prefixremove_suffixreversesimple_cn_yuansimplesplitsmart_get_binary_datasplitsplit2str_composed_bystringlist_appendstrip_stringsubstringstext_display_lengthtext_display_shortenunbinarifyunquotewholestripzenutils.sysutilsdefault_timeout_killexecute_scriptget_current_thread_idget_node_ipget_random_script_nameget_worker_idpsutil_timeout_killzenutils.threadutilsConcurrentLimitJobQueueCounterFutureJobExecuteTimeoutJobQueueJobResultNotSetLoopIdleServiceServiceStopServiceTerminateSimpleConsumerSimpleProducerSimpleProducerConsumerServerSimpleServerStartOnTerminatedServicezenutils.treeutilsSimpleRouterTreebuild_treeprint_treeprint_tree_callbacktree_walkzenutils.typingutilsNumberSTRING_ENCODINGSregister_global_castersmart_castzenutils.xmlrpcutilsSimpleAuthMixinSimpleAuthSafeTransportSimpleAuthTransportCompatibilityTest passed with python versions:Python 2.7 passedPython 3.2 passedPython 3.3 passedPython 3.4 passedPython 3.5 passedPython 3.7 passedPython 3.8 passedPython 3.9 passedPython 3.10 passedPython 3.11 passedReleasev0.1.0First release.v0.2.0Add treeutils.SimpleRouterTree.Add randomutils.HashPrng.Add hashutils.get_password_hash and hashutils.validate_password_hash.Add dictutils.HttpHeadersDict.Add sysutils.get_node_ip.v0.3.1Add funcutils.retry.Fix hashutils.validate_password_hash problem.v0.3.2Add sm3 hash support in hashutils.Add xxhash hash support in hashutils.Export hashutils.pbkdf2_hmac to work with your self defined hash methods.Fix problem in sysutils.get_random_script_name on windows.Fix path string problem in tests.test_httputils on windows.v0.3.3Fix funcutils.isclass can not detect classes with metaclass. Use inspect.isclass instead.Add cacheutils.cache.v0.3.5Change default log file path frompwd/app.log topwd/logs/app.log.Add fsutils.get_swap_filename.Add fsutils.safe_write.Add fsutils.get_safe_filename.v0.3.6Add sixutils.create_new_class.Fix hashutils problem in python3.3 and below.Extend numericutils.int2bytes as int.to_bytes.V0.3.7Add randomutils.Lcg31Random.Add randomutils.get_password_seed32.v0.3.8Fix force_text in handling NON-STR type data.v0.3.9Add delete_script parameter in fsutils.execute_script.v0.3.12dictutils.Object add select method.Add errorutils.Add packutils.Add perfutils.Add serviceutils.v0.3.15Add serviceutils.ServerEngineBase.v0.3.16Rename serviceutils.ServerEngineBase to socketserverutils.ServerEngineBase.Add socketserverutils.NStreamExchangeProtocolBase.Add ServerHandle.v0.3.19Fix NStreamExchangeProtocolBase makefile buffering problem for py2.7.Fix log format problem in old version python.Add more exception classes in errorutils.Add dateutils.Add errorutils.AuthenticationRequired.v0.3.23Fix logger.error missing msg problem.Add threadutils.ConcurrentLimitJobQueue.v0.4.8Fix *args problem in call_with_inject.Change serviceutils.ServiceBase.register_to.Add cacheutils.ReqIdCache.Add xmlrpcutils.SimpleAuthTransport.Add xmlrpcutils.SimpleAuthSafeTransport.Add threadutils.JobQueue.Add threadutils.Future.Add funcutils.get_method_help.Add funcutils.get_method_signature.v0.4.9Add cacheutils.simple_cache.v0.4.10Fix readme document.Fix pylint warnings.Unit test problems fix.v0.5.0Add sixutils.unicode.v0.5.1Fix logutils default format missing space between thread and module fields.v0.5.2Add hashutils.get_hash_digest.Add log_to_console and log_to_file option in logutils.get_simple_config.