<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          BoraxPython 3 開發(fā)工具集合

          聯(lián)合創(chuàng)作 · 2023-09-28 11:30

          Borax 是一個(gè)Python3開發(fā)工具集合,包含了常用的數(shù)據(jù)結(jié)構(gòu)和設(shè)計(jì)模式。

           ____
          | __ )  ___  _ __ __ ___  __
          |  _ \ / _ \| '__/ _` \ \/ /
          | |_) | (_) | | | (_| |>  <
          |____/ \___/|_|  \__,_/_/\_\
          

          模塊

          包括了以下模塊:

          • 中國農(nóng)歷日期 borax.calendars.lunardate

          • 國際/國內(nèi)節(jié)日 borax.calendars.festivals

          • 樹形數(shù)據(jù)結(jié)構(gòu) borax.structures.tree

          • 單例模式 borax.patterns.singleton

          • 代理模式 borax.patterns.lazy

          • json序列化 borax.serialize.bjson / borax.serialize.cjson

          • 財(cái)務(wù)金額格式化 borax.finance

          • 別名字典、屬性字典 borax.dictionary

          • 列表常用函數(shù) borax.utils

          使用示例

          農(nóng)歷日期

          >>>from borax.calendars.lunardate import LunarDate, LCalendars
          >>>LunarDate(2018, 7, 1)
          LunarDate(2018, 7, 1, 0)
          >>>ld = LunarDate.from_solar_date(2018, 8, 11)
          >>>ld
          LunarDate(2018, 7, 1, 0)
          >>>LCalendars.ndays(2018)
          354
          >>>LCalendars.ndays(2018, 12)
          30
          >>>LCalendars.ndays(2017, 6, 1)
          30

          金額大寫

          >>> from borax.finance import financial_amount_capital
          >>> financial_amount_capital(100000000)
          '壹億元整'
          >>>financial_amount_capital(4578442.23)
          '肆佰伍拾柒萬捌仟肆佰肆拾貳元貳角叁分'
          >>>financial_amount_capital(107000.53)
          壹拾萬柒仟元伍角叁分

          字段選取

          from borax.fetch import fetch
          
          objects = [
              {'id': 282, 'name': 'Alice', 'age': 30},
              {'id': 217, 'name': 'Bob', 'age': 56},
              {'id': 328, 'name': 'Charlie', 'age': 56},
          ]
          
          names = fetch(objects, 'name')
          print(names)

          更多示例查看 https://kinegratii.github.io/borax

          瀏覽 17
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  91九色蝌蚪91成人 | 黄色视频网站日本 | 五月丁香亚洲婷婷 | 91大鸡吧 | 97在线图片视频小说 |