l(ight)conf(iguration):用于动态配置的一种简单的人类可读数据序列化格式。

LCONF的Python项目详细描述


关于

l conf代表l(igh)conf(iguration)一种轻量级的、易于理解的动态数据序列化格式 配置。

重要

更换

  • 在许多情况下,lconfYAML
  • 的合适替代品。
  • lconf在许多情况下可用于替换JSON

注意

  • lconf python库比pyyaml 3.11快得多
  • lconf python库比python包含的json(c扩展)默认值发出快得多
  • lconf python库使用ordereddict的解析速度略快于python包含的json(c扩展)。
  • lconf python库解析仍然比python包含的json(c扩展)默认值慢得多

最新的文档可以在http://packages.python.org/LCONF在线找到。


___SECTION :: A short example with a number of features

# Comment-Line: `List-Of-Tuples`
- people_list |name|height_cm|weight_kg|
   Tim,  178,  86
   John, 166,  67

# Comment-Line: `Repeated-Block-Identifier`
* Persons_BLK
   person1
      first :: Tim
      last :: Doe
      age :: 39
      registered :: true
      salary :: 70000
      sex :: M
      # Comment-Line: `Key :: Value-List`
      - interests :: Reading,Mountain Biking,Hacking
      # Comment-Line: `Key-Value-List`
      - sports
         tennis
         football
         soccer
      # Comment-Line: `Key-Value-Mapping`
      . favorites
         food :: Spaghetti
         sport :: Soccer
         color :: Blue
   person2
      first :: John
      last :: Doe
      age :: 29
      registered :: true
      salary :: 45000
      sex :: M
      # Comment-Line: empty `Key :: Value-List`
      - interests ::
      # Comment-Line: empty `Key-Value-List`
      - sports
      # Comment-Line: `Key-Value-Mapping`
      . favorites
         food :: Pizza
         sport :: None
         color :: Orange
___END

要求

请参阅文档中的:所需软件或:

{SOURCE}/docs/RequiredSoftware.rst

安装

  1. 使用pip/pip3:从pypi安装

    $ pip3 install LCONF
    
  2. 从源安装:

    $ python3 setup.py install
    

建立文档

如果您希望生成自己的文档副本,则需要:

  1. 获取lconf源。

  2. 如果尚未安装-请安装PSphinxTheme

    $ pip3 install PSphinxTheme
    
  3. 如果尚未安装-请安装LconfPygmentsLexer

    $ pip3 install LconfPygmentsLexer
    
  4. lconf源目录中,运行python3 setup.py build_sphinx -E

  5. sphinx完成后,将Web浏览器指向文件:

    {SOURCE}/build/sphinx/html/index.html
    

在线资源

使用lconf的项目

利用:lconf的项目

  • PyNHEP
    pynhep:n(营养)和h(健康)e(ating)p(lanner)。


LCONF根据BSD 3条款许可的条款分发。 咨询许可证BSD-3-Clause

(c)2014年,peter1000https://github.com/peter1000 保留所有权利



欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
使用Java中的setter方法访问通过静态方法创建的实例的私有字段出错了,可以做什么?   javagui中的swing文档模型   java Spring JDBCTemplate+事务管理器内存泄漏   java不支持EntityManager。如果实体是@Cached/@Cacheable,getReference()是否重要?   java给定一个整数数组[x0-x1-x2],如何计算从[0-0]到[x0-x1-x2]的所有可能的置换?   java询问用户希望输入多少个名称,并将这些名称存储在数组中   java需要关于jComboBox和jTable的帮助   使用ArrayList的代码中出现java越界异常错误   java文件系统找不到指定的路径   java玩家名单总结   java验证上传的图像DPI和大小是否可打印   java当您更改xml文件中的属性时,调用哪个自定义视图的构造函数?