environparse


Nameenvironparse JSON
Version 0.2.0.post1 PyPI version JSON
download
home_pageNone
SummaryEnvironment variable parsing library.
upload_time2024-07-27 20:10:14
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
license木兰宽松许可证, 第2版 2020年1月 http://license.coscl.org.cn/MulanPSL2 您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束: 0. 定义 “软件” 是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。 “贡献” 是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。 “贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 “法人实体” 是指提交贡献的机构及其“关联实体”。 “关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 1. 授予版权许可 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。 2. 授予专利许可 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。 3. 无商标许可 “本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。 4. 分发限制 您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。 5. 免责声明与责任限制 “软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 6. 语言 “本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。 Mulan Permissive Software License,Version 2 (Mulan PSL v2) January 2020 http://license.coscl.org.cn/MulanPSL2 Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions: 0. Definition Software means the program and related documents which are licensed under this License and comprise all Contribution(s). Contribution means the copyrightable work licensed by a particular Contributor under this License. Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License. Legal Entity means the entity making a Contribution and all its Affiliates. Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity. 1. Grant of Copyright License Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not. 2. Grant of Patent License Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken. 3. No Trademark License No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4. 4. Distribution Restriction You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software. 5. Disclaimer of Warranty and Limitation of Liability THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 6. Language THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL.
keywords env environ environment parse parser argparse optparse envparse
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # `environparse`

Environment variable parsing library, inspired by stdlib `argparse`.

## Features:

- Handles both optional and required environment variable.
- Built-in various actions to handle the value parsing, such as:
    - String
    - Number (integer or float)
    - Boolean
    - Path (with optional validations)
    - File opener
- Localization support. Currently, supports the following languages:
    - `en`
    - `zh-CN`
    - `zh-SG`
    - `zh-HK`
    - `zh-TW`
- And more features that have not yet been implemented...

## Install

Available on [PyPI](https://pypi.org/project/environparse).

The release page also provided wheel package to download.

## Example

`environparse` has a built-in HTTP server startup script to demonstrate the basic usage of `environparse`. To access it, run the following command to see help messages:

```sh-session
$ > pwd
/tmp
$ > LANGUAGE=en_SG.UTF-8 HELP= python -m environparse.examples.httpserver
Usage: [ENVS]... httpserver.py [ARGS]...

An script to start a http server, but use `environparse` to demonstrate the option parsing.

The following environment variables will be preemptively parsed and exit after performing the operation:
    HELP=[...]    Show this help message and exit.

Unless otherwise stated, all options are optional by default.
List of available environment variables [ENVS]:
    BIND_ADDRESS=[STRING]    Bind to a specified address. Leave empty to bind all interfaces.
    BIND_PORT=[INTEGER]      Bind to a specified port.                                       
                             [Default: 6282]                                                 
    ROOTDIR=[PATH]           Serve a specified directory.                                    
                             [Default: /tmp]                                                 

Do not forget the warning from `http.server` documentation:
http.server is not recommended for production. It only implements basic security checks.
$ >
```

`environparse` even support localization:

```sh-session
用法:[环境变量]... httpserver.py [参数]...

An script to start a http server, but use `environparse` to demonstrate the option parsing.

以下环境变量将被抢先解析,并在运行操作后退出:
    HELP=[...]    显示此帮助信息并退出。

除非另有说明,所有选项默认都是可选的。
可用的 [环境变量] 列表:
    BIND_ADDRESS=[字符串]    Bind to a specified address. Leave empty to bind all interfaces.
    BIND_PORT=[整数]         Bind to a specified port.                                       
                             [默认值:6282]                                                  
    ROOTDIR=[PATH]           Serve a specified directory.                                    
                             [默认值:/tmp]                                                  

Do not forget the warning from `http.server` documentation:
http.server is not recommended for production. It only implements basic security checks.
$ >
```

Now, try to test the HTTP server:

```sh-session
$ > ROOTDIR="$HOME/Music" BIND_ADDRESS='127.127.127.127' python -m environparse.examples.httpserver
Consumed names of environment variables:
['BIND_ADDRESS', 'ROOTDIR']
Parsed options:
{'BIND_ADDRESS': '127.127.127.127', 'BIND_PORT': 6282, 'rootdir': PosixPath('/home/user/Music')}
Starting the HTTP server...
Serving HTTP on 127.127.127.127 port 6282 (http://127.127.127.127:6282/) ...
127.0.0.1 - - [27/Jul/2024 01:35:59] "GET /Music/EXEC_HYMME_SEAMLESSECHO%3DH_D_.%20-%20stellatram.flac HTTP/1.1" 200 -
127.0.0.1 - - [27/Jul/2024 01:36:45] "GET /Music/%E3%82%B3%E3%83%BC%E3%83%89%E3%83%BB%E3%82%A8%E3%83%86%E3%82%B9%E3%82%A6%E3%82%A7%E3%82%A4%28Class__ETHES_WEI%3D_extends.COMMUNI_SAT_.%29%20-%20%E9%9C%9C%E6%9C%88%E3%81%AF%E3%82%8B%E3%81%8B.flac HTTP/1.1" 200 -
127.0.0.1 - - [27/Jul/2024 01:57:04] "GET /Music/%E7%A5%AD%E6%9E%9C%E3%81%A6%E3%81%AE%E8%8A%B1%20-%20%E4%B8%AD%E6%81%B5%E5%85%89%E5%9F%8E%E3%80%81%E9%9C%9C%E6%9C%88%E3%81%AF%E3%82%8B%E3%81%8B.flac HTTP/1.1" 200 -
^C
Keyboard interrupt received, exiting.
$ >
```

# Changelog

All notable changes to this project will be documented in this file.

This project adheres to [PyPI Version Specification](https://packaging.python.org/en/latest/specifications/version-specifiers).

## 0.2.0.post1 - 2024-07-28

- Fixed some typos in README.md.
- Added missing changelog of version 0.2.0.

## 0.2.0 - 2024-07-28

- Added an `environparse`-based HTTP server start script for example purpose.
    - To access/use this script, run:

      ```sh-session
      $ > [ENVIRONS]... python -m environparse.examples.httpserver
      ```

- Added some base path validators.
    - These validators are members of class `PathValidators`. For example, `PathValidators.HasPermission` can validate the path accessibility with specified `mode` argument.
    - To create a custom path validator, please inherit from `environparse.AbstractPathValidator` and implement the `__call__()` method.
- Now you can finer control over display of option defaults in help messages through keyword-only argument `show_default` in parser initialization and option definition.
- Protocol class `DefinedOptionType` is removed. Now `DefinedOption` (renamed from `_DefinedOption`) can use to annotate the return type of `EnvironmentVariableParser.defineOption()`.

## 0.1.0 - 2024-07-26

The initial release.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "environparse",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "env, environ, environment, parse, parser, argparse, optparse, envparse",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/5d/ac/0ac59cff8ad172bc371f0716fbdb4094c7508328c6061677711a17c15cd1/environparse-0.2.0.post1.tar.gz",
    "platform": null,
    "description": "# `environparse`\n\nEnvironment variable parsing library, inspired by stdlib `argparse`.\n\n## Features:\n\n- Handles both optional and required environment variable.\n- Built-in various actions to handle the value parsing, such as:\n    - String\n    - Number (integer or float)\n    - Boolean\n    - Path (with optional validations)\n    - File opener\n- Localization support. Currently, supports the following languages:\n    - `en`\n    - `zh-CN`\n    - `zh-SG`\n    - `zh-HK`\n    - `zh-TW`\n- And more features that have not yet been implemented...\n\n## Install\n\nAvailable on [PyPI](https://pypi.org/project/environparse).\n\nThe release page also provided wheel package to download.\n\n## Example\n\n`environparse` has a built-in HTTP server startup script to demonstrate the basic usage of `environparse`. To access it, run the following command to see help messages:\n\n```sh-session\n$ > pwd\n/tmp\n$ > LANGUAGE=en_SG.UTF-8 HELP= python -m environparse.examples.httpserver\nUsage: [ENVS]... httpserver.py [ARGS]...\n\nAn script to start a http server, but use `environparse` to demonstrate the option parsing.\n\nThe following environment variables will be preemptively parsed and exit after performing the operation:\n    HELP=[...]    Show this help message and exit.\n\nUnless otherwise stated, all options are optional by default.\nList of available environment variables [ENVS]:\n    BIND_ADDRESS=[STRING]    Bind to a specified address. Leave empty to bind all interfaces.\n    BIND_PORT=[INTEGER]      Bind to a specified port.                                       \n                             [Default: 6282]                                                 \n    ROOTDIR=[PATH]           Serve a specified directory.                                    \n                             [Default: /tmp]                                                 \n\nDo not forget the warning from `http.server` documentation:\nhttp.server is not recommended for production. It only implements basic security checks.\n$ >\n```\n\n`environparse` even support localization:\n\n```sh-session\n\u7528\u6cd5\uff1a[\u73af\u5883\u53d8\u91cf]... httpserver.py [\u53c2\u6570]...\n\nAn script to start a http server, but use `environparse` to demonstrate the option parsing.\n\n\u4ee5\u4e0b\u73af\u5883\u53d8\u91cf\u5c06\u88ab\u62a2\u5148\u89e3\u6790\uff0c\u5e76\u5728\u8fd0\u884c\u64cd\u4f5c\u540e\u9000\u51fa\uff1a\n    HELP=[...]    \u663e\u793a\u6b64\u5e2e\u52a9\u4fe1\u606f\u5e76\u9000\u51fa\u3002\n\n\u9664\u975e\u53e6\u6709\u8bf4\u660e\uff0c\u6240\u6709\u9009\u9879\u9ed8\u8ba4\u90fd\u662f\u53ef\u9009\u7684\u3002\n\u53ef\u7528\u7684 [\u73af\u5883\u53d8\u91cf] \u5217\u8868\uff1a\n    BIND_ADDRESS=[\u5b57\u7b26\u4e32]    Bind to a specified address. Leave empty to bind all interfaces.\n    BIND_PORT=[\u6574\u6570]         Bind to a specified port.                                       \n                             [\u9ed8\u8ba4\u503c\uff1a6282]                                                  \n    ROOTDIR=[PATH]           Serve a specified directory.                                    \n                             [\u9ed8\u8ba4\u503c\uff1a/tmp]                                                  \n\nDo not forget the warning from `http.server` documentation:\nhttp.server is not recommended for production. It only implements basic security checks.\n$ >\n```\n\nNow, try to test the HTTP server:\n\n```sh-session\n$ > ROOTDIR=\"$HOME/Music\" BIND_ADDRESS='127.127.127.127' python -m environparse.examples.httpserver\nConsumed names of environment variables:\n['BIND_ADDRESS', 'ROOTDIR']\nParsed options:\n{'BIND_ADDRESS': '127.127.127.127', 'BIND_PORT': 6282, 'rootdir': PosixPath('/home/user/Music')}\nStarting the HTTP server...\nServing HTTP on 127.127.127.127 port 6282 (http://127.127.127.127:6282/) ...\n127.0.0.1 - - [27/Jul/2024 01:35:59] \"GET /Music/EXEC_HYMME_SEAMLESSECHO%3DH_D_.%20-%20stellatram.flac HTTP/1.1\" 200 -\n127.0.0.1 - - [27/Jul/2024 01:36:45] \"GET /Music/%E3%82%B3%E3%83%BC%E3%83%89%E3%83%BB%E3%82%A8%E3%83%86%E3%82%B9%E3%82%A6%E3%82%A7%E3%82%A4%28Class__ETHES_WEI%3D_extends.COMMUNI_SAT_.%29%20-%20%E9%9C%9C%E6%9C%88%E3%81%AF%E3%82%8B%E3%81%8B.flac HTTP/1.1\" 200 -\n127.0.0.1 - - [27/Jul/2024 01:57:04] \"GET /Music/%E7%A5%AD%E6%9E%9C%E3%81%A6%E3%81%AE%E8%8A%B1%20-%20%E4%B8%AD%E6%81%B5%E5%85%89%E5%9F%8E%E3%80%81%E9%9C%9C%E6%9C%88%E3%81%AF%E3%82%8B%E3%81%8B.flac HTTP/1.1\" 200 -\n^C\nKeyboard interrupt received, exiting.\n$ >\n```\n\n# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThis project adheres to [PyPI Version Specification](https://packaging.python.org/en/latest/specifications/version-specifiers).\n\n## 0.2.0.post1 - 2024-07-28\n\n- Fixed some typos in README.md.\n- Added missing changelog of version 0.2.0.\n\n## 0.2.0 - 2024-07-28\n\n- Added an `environparse`-based HTTP server start script for example purpose.\n    - To access/use this script, run:\n\n      ```sh-session\n      $ > [ENVIRONS]... python -m environparse.examples.httpserver\n      ```\n\n- Added some base path validators.\n    - These validators are members of class `PathValidators`. For example, `PathValidators.HasPermission` can validate the path accessibility with specified `mode` argument.\n    - To create a custom path validator, please inherit from `environparse.AbstractPathValidator` and implement the `__call__()` method.\n- Now you can finer control over display of option defaults in help messages through keyword-only argument `show_default` in parser initialization and option definition.\n- Protocol class `DefinedOptionType` is removed. Now `DefinedOption` (renamed from `_DefinedOption`) can use to annotate the return type of `EnvironmentVariableParser.defineOption()`.\n\n## 0.1.0 - 2024-07-26\n\nThe initial release.\n",
    "bugtrack_url": null,
    "license": "\u6728\u5170\u5bbd\u677e\u8bb8\u53ef\u8bc1\uff0c \u7b2c2\u7248  2020\u5e741\u6708 http://license.coscl.org.cn/MulanPSL2  \u60a8\u5bf9\u201c\u8f6f\u4ef6\u201d\u7684\u590d\u5236\u3001\u4f7f\u7528\u3001\u4fee\u6539\u53ca\u5206\u53d1\u53d7\u6728\u5170\u5bbd\u677e\u8bb8\u53ef\u8bc1\uff0c\u7b2c2\u7248\uff08\u201c\u672c\u8bb8\u53ef\u8bc1\u201d\uff09\u7684\u5982\u4e0b\u6761\u6b3e\u7684\u7ea6\u675f\uff1a  0.   \u5b9a\u4e49  \u201c\u8f6f\u4ef6\u201d \u662f\u6307\u7531\u201c\u8d21\u732e\u201d\u6784\u6210\u7684\u8bb8\u53ef\u5728\u201c\u672c\u8bb8\u53ef\u8bc1\u201d\u4e0b\u7684\u7a0b\u5e8f\u548c\u76f8\u5173\u6587\u6863\u7684\u96c6\u5408\u3002  \u201c\u8d21\u732e\u201d \u662f\u6307\u7531\u4efb\u4e00\u201c\u8d21\u732e\u8005\u201d\u8bb8\u53ef\u5728\u201c\u672c\u8bb8\u53ef\u8bc1\u201d\u4e0b\u7684\u53d7\u7248\u6743\u6cd5\u4fdd\u62a4\u7684\u4f5c\u54c1\u3002  \u201c\u8d21\u732e\u8005\u201d \u662f\u6307\u5c06\u53d7\u7248\u6743\u6cd5\u4fdd\u62a4\u7684\u4f5c\u54c1\u8bb8\u53ef\u5728\u201c\u672c\u8bb8\u53ef\u8bc1\u201d\u4e0b\u7684\u81ea\u7136\u4eba\u6216\u201c\u6cd5\u4eba\u5b9e\u4f53\u201d\u3002  \u201c\u6cd5\u4eba\u5b9e\u4f53\u201d \u662f\u6307\u63d0\u4ea4\u8d21\u732e\u7684\u673a\u6784\u53ca\u5176\u201c\u5173\u8054\u5b9e\u4f53\u201d\u3002  \u201c\u5173\u8054\u5b9e\u4f53\u201d \u662f\u6307\uff0c\u5bf9\u201c\u672c\u8bb8\u53ef\u8bc1\u201d\u4e0b\u7684\u884c\u4e3a\u65b9\u800c\u8a00\uff0c\u63a7\u5236\u3001\u53d7\u63a7\u5236\u6216\u4e0e\u5176\u5171\u540c\u53d7\u63a7\u5236\u7684\u673a\u6784\uff0c\u6b64\u5904\u7684\u63a7\u5236\u662f\u6307\u6709\u53d7\u63a7\u65b9\u6216\u5171\u540c\u53d7\u63a7\u65b9\u81f3\u5c1150%\u76f4\u63a5\u6216\u95f4\u63a5\u7684\u6295\u7968\u6743\u3001\u8d44\u91d1\u6216\u5176\u4ed6\u6709\u4ef7\u8bc1\u5238\u3002  1.   \u6388\u4e88\u7248\u6743\u8bb8\u53ef  \u6bcf\u4e2a\u201c\u8d21\u732e\u8005\u201d\u6839\u636e\u201c\u672c\u8bb8\u53ef\u8bc1\u201d\u6388\u4e88\u60a8\u6c38\u4e45\u6027\u7684\u3001\u5168\u7403\u6027\u7684\u3001\u514d\u8d39\u7684\u3001\u975e\u72ec\u5360\u7684\u3001\u4e0d\u53ef\u64a4\u9500\u7684\u7248\u6743\u8bb8\u53ef\uff0c\u60a8\u53ef\u4ee5\u590d\u5236\u3001\u4f7f\u7528\u3001\u4fee\u6539\u3001\u5206\u53d1\u5176\u201c\u8d21\u732e\u201d\uff0c\u4e0d\u8bba\u4fee\u6539\u4e0e\u5426\u3002  2.   \u6388\u4e88\u4e13\u5229\u8bb8\u53ef  \u6bcf\u4e2a\u201c\u8d21\u732e\u8005\u201d\u6839\u636e\u201c\u672c\u8bb8\u53ef\u8bc1\u201d\u6388\u4e88\u60a8\u6c38\u4e45\u6027\u7684\u3001\u5168\u7403\u6027\u7684\u3001\u514d\u8d39\u7684\u3001\u975e\u72ec\u5360\u7684\u3001\u4e0d\u53ef\u64a4\u9500\u7684\uff08\u6839\u636e\u672c\u6761\u89c4\u5b9a\u64a4\u9500\u9664\u5916\uff09\u4e13\u5229\u8bb8\u53ef\uff0c\u4f9b\u60a8\u5236\u9020\u3001\u59d4\u6258\u5236\u9020\u3001\u4f7f\u7528\u3001\u8bb8\u8bfa\u9500\u552e\u3001\u9500\u552e\u3001\u8fdb\u53e3\u5176\u201c\u8d21\u732e\u201d\u6216\u4ee5\u5176\u4ed6\u65b9\u5f0f\u8f6c\u79fb\u5176\u201c\u8d21\u732e\u201d\u3002\u524d\u8ff0\u4e13\u5229\u8bb8\u53ef\u4ec5\u9650\u4e8e\u201c\u8d21\u732e\u8005\u201d\u73b0\u5728\u6216\u5c06\u6765\u62e5\u6709\u6216\u63a7\u5236\u7684\u5176\u201c\u8d21\u732e\u201d\u672c\u8eab\u6216\u5176\u201c\u8d21\u732e\u201d\u4e0e\u8bb8\u53ef\u201c\u8d21\u732e\u201d\u65f6\u7684\u201c\u8f6f\u4ef6\u201d\u7ed3\u5408\u800c\u5c06\u5fc5\u7136\u4f1a\u4fb5\u72af\u7684\u4e13\u5229\u6743\u5229\u8981\u6c42\uff0c\u4e0d\u5305\u62ec\u5bf9\u201c\u8d21\u732e\u201d\u7684\u4fee\u6539\u6216\u5305\u542b\u201c\u8d21\u732e\u201d\u7684\u5176\u4ed6\u7ed3\u5408\u3002\u5982\u679c\u60a8\u6216\u60a8\u7684\u201c\u5173\u8054\u5b9e\u4f53\u201d\u76f4\u63a5\u6216\u95f4\u63a5\u5730\uff0c\u5c31\u201c\u8f6f\u4ef6\u201d\u6216\u5176\u4e2d\u7684\u201c\u8d21\u732e\u201d\u5bf9\u4efb\u4f55\u4eba\u53d1\u8d77\u4e13\u5229\u4fb5\u6743\u8bc9\u8bbc\uff08\u5305\u62ec\u53cd\u8bc9\u6216\u4ea4\u53c9\u8bc9\u8bbc\uff09\u6216\u5176\u4ed6\u4e13\u5229\u7ef4\u6743\u884c\u52a8\uff0c\u6307\u63a7\u5176\u4fb5\u72af\u4e13\u5229\u6743\uff0c\u5219\u201c\u672c\u8bb8\u53ef\u8bc1\u201d\u6388\u4e88\u60a8\u5bf9\u201c\u8f6f\u4ef6\u201d\u7684\u4e13\u5229\u8bb8\u53ef\u81ea\u60a8\u63d0\u8d77\u8bc9\u8bbc\u6216\u53d1\u8d77\u7ef4\u6743\u884c\u52a8\u4e4b\u65e5\u7ec8\u6b62\u3002  3.   \u65e0\u5546\u6807\u8bb8\u53ef  \u201c\u672c\u8bb8\u53ef\u8bc1\u201d\u4e0d\u63d0\u4f9b\u5bf9\u201c\u8d21\u732e\u8005\u201d\u7684\u5546\u54c1\u540d\u79f0\u3001\u5546\u6807\u3001\u670d\u52a1\u6807\u5fd7\u6216\u4ea7\u54c1\u540d\u79f0\u7684\u5546\u6807\u8bb8\u53ef\uff0c\u4f46\u60a8\u4e3a\u6ee1\u8db3\u7b2c4\u6761\u89c4\u5b9a\u7684\u58f0\u660e\u4e49\u52a1\u800c\u5fc5\u987b\u4f7f\u7528\u9664\u5916\u3002  4.   \u5206\u53d1\u9650\u5236  \u60a8\u53ef\u4ee5\u5728\u4efb\u4f55\u5a92\u4ecb\u4e2d\u5c06\u201c\u8f6f\u4ef6\u201d\u4ee5\u6e90\u7a0b\u5e8f\u5f62\u5f0f\u6216\u53ef\u6267\u884c\u5f62\u5f0f\u91cd\u65b0\u5206\u53d1\uff0c\u4e0d\u8bba\u4fee\u6539\u4e0e\u5426\uff0c\u4f46\u60a8\u5fc5\u987b\u5411\u63a5\u6536\u8005\u63d0\u4f9b\u201c\u672c\u8bb8\u53ef\u8bc1\u201d\u7684\u526f\u672c\uff0c\u5e76\u4fdd\u7559\u201c\u8f6f\u4ef6\u201d\u4e2d\u7684\u7248\u6743\u3001\u5546\u6807\u3001\u4e13\u5229\u53ca\u514d\u8d23\u58f0\u660e\u3002  5.   \u514d\u8d23\u58f0\u660e\u4e0e\u8d23\u4efb\u9650\u5236  \u201c\u8f6f\u4ef6\u201d\u53ca\u5176\u4e2d\u7684\u201c\u8d21\u732e\u201d\u5728\u63d0\u4f9b\u65f6\u4e0d\u5e26\u4efb\u4f55\u660e\u793a\u6216\u9ed8\u793a\u7684\u62c5\u4fdd\u3002\u5728\u4efb\u4f55\u60c5\u51b5\u4e0b\uff0c\u201c\u8d21\u732e\u8005\u201d\u6216\u7248\u6743\u6240\u6709\u8005\u4e0d\u5bf9\u4efb\u4f55\u4eba\u56e0\u4f7f\u7528\u201c\u8f6f\u4ef6\u201d\u6216\u5176\u4e2d\u7684\u201c\u8d21\u732e\u201d\u800c\u5f15\u53d1\u7684\u4efb\u4f55\u76f4\u63a5\u6216\u95f4\u63a5\u635f\u5931\u627f\u62c5\u8d23\u4efb\uff0c\u4e0d\u8bba\u56e0\u4f55\u79cd\u539f\u56e0\u5bfc\u81f4\u6216\u8005\u57fa\u4e8e\u4f55\u79cd\u6cd5\u5f8b\u7406\u8bba,\u5373\u4f7f\u5176\u66fe\u88ab\u5efa\u8bae\u6709\u6b64\u79cd\u635f\u5931\u7684\u53ef\u80fd\u6027\u3002  6.   \u8bed\u8a00  \u201c\u672c\u8bb8\u53ef\u8bc1\u201d\u4ee5\u4e2d\u82f1\u6587\u53cc\u8bed\u8868\u8ff0\uff0c\u4e2d\u82f1\u6587\u7248\u672c\u5177\u6709\u540c\u7b49\u6cd5\u5f8b\u6548\u529b\u3002\u5982\u679c\u4e2d\u82f1\u6587\u7248\u672c\u5b58\u5728\u4efb\u4f55\u51b2\u7a81\u4e0d\u4e00\u81f4\uff0c\u4ee5\u4e2d\u6587\u7248\u4e3a\u51c6\u3002   Mulan Permissive Software License\uff0cVersion 2 (Mulan PSL v2)  January 2020 http://license.coscl.org.cn/MulanPSL2  Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions:  0. Definition  Software means the program and related documents which are licensed under this License and comprise all Contribution(s).  Contribution means the copyrightable work licensed by a particular Contributor under this License.  Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License.  Legal Entity means the entity making a Contribution and all its Affiliates.  Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, \u2018control\u2019 means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity.  1. Grant of Copyright License  Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not.  2. Grant of Patent License  Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken.  3. No Trademark License  No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4.  4. Distribution Restriction  You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software.  5. Disclaimer of Warranty and Limitation of Liability  THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT\u2019S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  6. Language  THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL. ",
    "summary": "Environment variable parsing library.",
    "version": "0.2.0.post1",
    "project_urls": null,
    "split_keywords": [
        "env",
        " environ",
        " environment",
        " parse",
        " parser",
        " argparse",
        " optparse",
        " envparse"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2c95779d7646ae06ab6fe61e72d59fa41d59ca3a4352fb9c4e06df0c915bbcae",
                "md5": "a97ff82692a394e411ff82fdeeb8206b",
                "sha256": "41ad81d55de728452fb689b9234071d16c0c75db11b898fc423428b555a7021d"
            },
            "downloads": -1,
            "filename": "environparse-0.2.0.post1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a97ff82692a394e411ff82fdeeb8206b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 28728,
            "upload_time": "2024-07-27T20:10:13",
            "upload_time_iso_8601": "2024-07-27T20:10:13.573123Z",
            "url": "https://files.pythonhosted.org/packages/2c/95/779d7646ae06ab6fe61e72d59fa41d59ca3a4352fb9c4e06df0c915bbcae/environparse-0.2.0.post1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5dac0ac59cff8ad172bc371f0716fbdb4094c7508328c6061677711a17c15cd1",
                "md5": "0ab78f909a3d2d484d2d1ef927e966e5",
                "sha256": "2cb2b0c32fba974b6e7ec41969f9638082480e3547de681dd8ecb937fb893d02"
            },
            "downloads": -1,
            "filename": "environparse-0.2.0.post1.tar.gz",
            "has_sig": false,
            "md5_digest": "0ab78f909a3d2d484d2d1ef927e966e5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 24825,
            "upload_time": "2024-07-27T20:10:14",
            "upload_time_iso_8601": "2024-07-27T20:10:14.998046Z",
            "url": "https://files.pythonhosted.org/packages/5d/ac/0ac59cff8ad172bc371f0716fbdb4094c7508328c6061677711a17c15cd1/environparse-0.2.0.post1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-27 20:10:14",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "environparse"
}
        
Elapsed time: 5.43618s