Name | config-center JSON |
Version |
0.0.40.post2
JSON |
| download |
home_page | None |
Summary | A site-package to create your local pypi-sitepackage, manage your own scripts pack as an env! |
upload_time | 2024-05-21 02:27:15 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.4 |
license | MIT License |
keywords |
config
local
pipeline
tool
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
## **<u>CFGC</u>** 构建自己本地的 PYPI
**快速构建项目的自定义python运行环境**
------
```
当我们进行某些任务时,他们可能有多种类似的脚本,输出类似的内容,比如一些pipeline。
这时候任务脚本间可能存在大量的重复函数/变量,而这些函数并非pypi提供的,可能是我们自己定义的
如果对这些内容在各个脚本间重复定义则太不灵活,而CFGC(config-center)库则是为此而生!
```
如:
- 测评一系列类似的方法 (测评、数据加载函数很大概率是一种)
- 多流程分支分析 (数据读取、某些变量如输出路径)
- 日常使用 (如获取时间间隔的API、机器学习常用的数据拆分策略)
- ...更多可能
------
## Install
```python
pip install config-center
```
## Usage
```python
# region |- Import -|
import cfgc
import datetime
import os
# endregion
# list all envs
cfgc.envs.view()
# region |- Create an Env -|
env = cfgc.center.Environment()
env.define(
"cfgc-base", # env name: test
{"date": datetime.datetime.now().strftime('%Y-%m-%d')}, # env domain(data): test
os.path.join(cfgc.center.PATH.center) # env engine(site-package): cfgc self
)
env.save(safe=True)
# Input: yes
# endregion
del env
# region |- Reload the Env -|
from pprint import pprint
load_env = cfgc.center.Environment(load="cfgc-base") # env name: test
pprint(dir(load_env.engine))
# endregion
# region |- Export the Env -|
load_env.export("../export")
del load_env
# reload
load_env = cfgc.center.Environment()
load_env.load_path("../export") # env name: export
pprint(dir(load_env.engine.center))
print(load_env.domain)
# endregion
```
------
**CFGC实现非常简单,仅仅是使用了部分路径定义、模块加载的知识即可完成**
**而它可以保证让你在本地构建一些简单的python包,而无需上传pypi下载,来达到随心import**
- 完全不要再为相对路径、绝对路径的导入发愁
- 数据目录 与 函数目录分离, 无论项目的路径怎么变化, CFGC都可以定位到你本地的函数库
- 简单的客制化
------
## 欢迎使用体验CFGC!
Raw data
{
"_id": null,
"home_page": null,
"name": "config-center",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.4",
"maintainer_email": null,
"keywords": "config, local, pipeline, tool",
"author": null,
"author_email": "VaterFus <1107818699@qq.com>",
"download_url": "https://files.pythonhosted.org/packages/91/fe/404390578d4009925464a7311d1e72a129f585909ead2793caf4ca27f4e8/config_center-0.0.40.post2.tar.gz",
"platform": null,
"description": "## **<u>CFGC</u>** \u6784\u5efa\u81ea\u5df1\u672c\u5730\u7684 PYPI\n\n**\u5feb\u901f\u6784\u5efa\u9879\u76ee\u7684\u81ea\u5b9a\u4e49python\u8fd0\u884c\u73af\u5883**\n\n------\n\n```\n\u5f53\u6211\u4eec\u8fdb\u884c\u67d0\u4e9b\u4efb\u52a1\u65f6\uff0c\u4ed6\u4eec\u53ef\u80fd\u6709\u591a\u79cd\u7c7b\u4f3c\u7684\u811a\u672c\uff0c\u8f93\u51fa\u7c7b\u4f3c\u7684\u5185\u5bb9\uff0c\u6bd4\u5982\u4e00\u4e9bpipeline\u3002\n\u8fd9\u65f6\u5019\u4efb\u52a1\u811a\u672c\u95f4\u53ef\u80fd\u5b58\u5728\u5927\u91cf\u7684\u91cd\u590d\u51fd\u6570/\u53d8\u91cf\uff0c\u800c\u8fd9\u4e9b\u51fd\u6570\u5e76\u975epypi\u63d0\u4f9b\u7684\uff0c\u53ef\u80fd\u662f\u6211\u4eec\u81ea\u5df1\u5b9a\u4e49\u7684\n\u5982\u679c\u5bf9\u8fd9\u4e9b\u5185\u5bb9\u5728\u5404\u4e2a\u811a\u672c\u95f4\u91cd\u590d\u5b9a\u4e49\u5219\u592a\u4e0d\u7075\u6d3b\uff0c\u800cCFGC(config-center)\u5e93\u5219\u662f\u4e3a\u6b64\u800c\u751f\uff01\n```\n\n\u5982\uff1a\n\n- \u6d4b\u8bc4\u4e00\u7cfb\u5217\u7c7b\u4f3c\u7684\u65b9\u6cd5 (\u6d4b\u8bc4\u3001\u6570\u636e\u52a0\u8f7d\u51fd\u6570\u5f88\u5927\u6982\u7387\u662f\u4e00\u79cd)\n- \u591a\u6d41\u7a0b\u5206\u652f\u5206\u6790 (\u6570\u636e\u8bfb\u53d6\u3001\u67d0\u4e9b\u53d8\u91cf\u5982\u8f93\u51fa\u8def\u5f84)\n- \u65e5\u5e38\u4f7f\u7528 (\u5982\u83b7\u53d6\u65f6\u95f4\u95f4\u9694\u7684API\u3001\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u6570\u636e\u62c6\u5206\u7b56\u7565)\n- ...\u66f4\u591a\u53ef\u80fd\n\n------\n\n## Install\n\n```python\npip install config-center\n```\n\n## Usage\n\n```python\n# region |- Import -|\nimport cfgc\nimport datetime\nimport os\n# endregion\n\n# list all envs\ncfgc.envs.view()\n\n# region |- Create an Env -|\nenv = cfgc.center.Environment()\nenv.define(\n \"cfgc-base\", # env name: test\n {\"date\": datetime.datetime.now().strftime('%Y-%m-%d')}, # env domain(data): test\n os.path.join(cfgc.center.PATH.center) # env engine(site-package): cfgc self\n )\nenv.save(safe=True)\n# Input: yes\n# endregion\n\ndel env\n\n# region |- Reload the Env -|\nfrom pprint import pprint\nload_env = cfgc.center.Environment(load=\"cfgc-base\") # env name: test\npprint(dir(load_env.engine))\n# endregion\n\n# region |- Export the Env -|\nload_env.export(\"../export\")\ndel load_env\n# reload\nload_env = cfgc.center.Environment()\nload_env.load_path(\"../export\") # env name: export\npprint(dir(load_env.engine.center))\nprint(load_env.domain)\n# endregion\n```\n\n\n\n------\n\n**CFGC\u5b9e\u73b0\u975e\u5e38\u7b80\u5355\uff0c\u4ec5\u4ec5\u662f\u4f7f\u7528\u4e86\u90e8\u5206\u8def\u5f84\u5b9a\u4e49\u3001\u6a21\u5757\u52a0\u8f7d\u7684\u77e5\u8bc6\u5373\u53ef\u5b8c\u6210**\n\n**\u800c\u5b83\u53ef\u4ee5\u4fdd\u8bc1\u8ba9\u4f60\u5728\u672c\u5730\u6784\u5efa\u4e00\u4e9b\u7b80\u5355\u7684python\u5305\uff0c\u800c\u65e0\u9700\u4e0a\u4f20pypi\u4e0b\u8f7d\uff0c\u6765\u8fbe\u5230\u968f\u5fc3import**\n\n- \u5b8c\u5168\u4e0d\u8981\u518d\u4e3a\u76f8\u5bf9\u8def\u5f84\u3001\u7edd\u5bf9\u8def\u5f84\u7684\u5bfc\u5165\u53d1\u6101\n- \u6570\u636e\u76ee\u5f55 \u4e0e \u51fd\u6570\u76ee\u5f55\u5206\u79bb, \u65e0\u8bba\u9879\u76ee\u7684\u8def\u5f84\u600e\u4e48\u53d8\u5316, CFGC\u90fd\u53ef\u4ee5\u5b9a\u4f4d\u5230\u4f60\u672c\u5730\u7684\u51fd\u6570\u5e93\n- \u7b80\u5355\u7684\u5ba2\u5236\u5316\n\n------\n\n## \u6b22\u8fce\u4f7f\u7528\u4f53\u9a8cCFGC\uff01",
"bugtrack_url": null,
"license": "MIT License",
"summary": "A site-package to create your local pypi-sitepackage, manage your own scripts pack as an env!",
"version": "0.0.40.post2",
"project_urls": {
"Repository": "https://github.com/WhatMelonGua/config-center"
},
"split_keywords": [
"config",
" local",
" pipeline",
" tool"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e6f1735bac0072770d5e7d1a3f5aeaaec86ab8b2e77cd4ebbbe6848f981d8eb9",
"md5": "6915b22aab991c2590e48c5957605a7e",
"sha256": "21735095035222b74c040722590497f3621406118cedb12694931ba331b6331f"
},
"downloads": -1,
"filename": "config_center-0.0.40.post2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6915b22aab991c2590e48c5957605a7e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.4",
"size": 6357,
"upload_time": "2024-05-21T02:27:13",
"upload_time_iso_8601": "2024-05-21T02:27:13.657068Z",
"url": "https://files.pythonhosted.org/packages/e6/f1/735bac0072770d5e7d1a3f5aeaaec86ab8b2e77cd4ebbbe6848f981d8eb9/config_center-0.0.40.post2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "91fe404390578d4009925464a7311d1e72a129f585909ead2793caf4ca27f4e8",
"md5": "02df297bbb8bc5155d372852191a1706",
"sha256": "10779e56019d5e570d247ab5c160501f0acf1d30ec79d1d11399e46755d13d08"
},
"downloads": -1,
"filename": "config_center-0.0.40.post2.tar.gz",
"has_sig": false,
"md5_digest": "02df297bbb8bc5155d372852191a1706",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.4",
"size": 7918,
"upload_time": "2024-05-21T02:27:15",
"upload_time_iso_8601": "2024-05-21T02:27:15.416173Z",
"url": "https://files.pythonhosted.org/packages/91/fe/404390578d4009925464a7311d1e72a129f585909ead2793caf4ca27f4e8/config_center-0.0.40.post2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-21 02:27:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "WhatMelonGua",
"github_project": "config-center",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "config-center"
}