humps 您所在的位置:网站首页 hump什么意思 humps

humps

2024-07-05 07:23| 来源: 网络整理| 查看: 265

humps露

Release v3.8.0. (Installation)

Pypi Build status Documentation Status Coverage Python Versions

humps 馃惈 Convert strings (and dictionary keys) between snake case, camel case and pascal case in Python. Inspired by Humps for Node

Introducing Humps for Python! Let鈥檚 see it in action:

>>> import humps >>> humps.decamelize('illWearYourGranddadsClothes') # 'ill_wear_your_granddads_clothes' >>> humps.camelize('i_look_incredible') # 'iLookIncredible' >>> humps.kebabize('i_look_incredible') # 'i-look-incredible' >>> humps.pascalize('im_in_this_big_ass_coat') # 'ImInThisBigAssCoat' >>> humps.decamelize('FROMThatThriftShop') # 'from_that_thrift_shop' >>> humps.decamelize([{'downTheRoad': True}]) # [{'down_the_road': True}] >>> humps.dekebabize('FROM-That-Thrift-Shop') # 'FROM_That_Thrift_Shop' Features露 Convert from snake_case to camelCase and PascalCase and kebab-case Convert from camelCase to snake_case and PascalCase Convert from PascalCase to snake_case and camelCase Convert from kebab-case to snake_case Supports recursively converting dict keys Supports recursively converting lists of dictionaries Gracefully handles abbrevations, acronyms, and initialisms Extensively documented source code No third-party dependencies Installation露

To install humps, simply use pipenv (or pip, of course):

$ pipenv install pyhumps The API Documentation / Guide露

If you are looking for information on a specific function, this part of the documentation is for you.

API Main


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有