cfgtools


Namecfgtools JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/Chitaoji/cfgtools/
SummaryProvides tools for managing config files.
upload_time2025-07-10 05:12:14
maintainerNone
docs_urlNone
authorChitaoji
requires_python>=3.12.7
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# cfgtools
Provides tools for managing config files.

## Installation
```sh
$ pip install cfgtools
```

## Requirements
```txt
pyyaml
lazyr
Faker
htmlmaster
```

## Usage
### Save to a config file

```py
>>> import cfgtools
>>> cfg = cfgtools.config({"foo": "bar", "this": ["is", "an", "example"]})
>>> cfg.save("test.cfg", "yaml") # or: cfg.to_yaml("test.cfg")
```
If not specifeid, the format of the file will be automatically detected according to the file suffix. Valid formats include `ini`, `json`, `yaml`, `pickle`, etc. For example:
```py
>>> cfg.save("test.yaml") # a yaml file is created
>>> cfg.save("test.pkl") # a pickle file is created
>>> cfg.save("unspecified.cfg") # by default a json file is created
```

### Read from a config file
```py
>>> cfgtools.read("test.cfg")
cfgtools.config({'foo': 'bar', 'this': ['is', 'an', 'example']})
```
The encoding and format of the file will be automatically detected if not specified.

## See Also
### Github repository
* https://github.com/Chitaoji/cfgtools/

### PyPI project
* https://pypi.org/project/cfgtools/

## License
This project falls under the BSD 3-Clause License.

## History
### v0.0.3
* Added requirement `htmlmaster`.

### v0.0.2
* New method `ConfigIOWrapper.safematch()`.

### v0.0.1
* Initial release.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Chitaoji/cfgtools/",
    "name": "cfgtools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Chitaoji",
    "author_email": "2360742040@qq.com",
    "download_url": null,
    "platform": null,
    "description": "\n# cfgtools\nProvides tools for managing config files.\n\n## Installation\n```sh\n$ pip install cfgtools\n```\n\n## Requirements\n```txt\npyyaml\nlazyr\nFaker\nhtmlmaster\n```\n\n## Usage\n### Save to a config file\n\n```py\n>>> import cfgtools\n>>> cfg = cfgtools.config({\"foo\": \"bar\", \"this\": [\"is\", \"an\", \"example\"]})\n>>> cfg.save(\"test.cfg\", \"yaml\") # or: cfg.to_yaml(\"test.cfg\")\n```\nIf not specifeid, the format of the file will be automatically detected according to the file suffix. Valid formats include `ini`, `json`, `yaml`, `pickle`, etc. For example:\n```py\n>>> cfg.save(\"test.yaml\") # a yaml file is created\n>>> cfg.save(\"test.pkl\") # a pickle file is created\n>>> cfg.save(\"unspecified.cfg\") # by default a json file is created\n```\n\n### Read from a config file\n```py\n>>> cfgtools.read(\"test.cfg\")\ncfgtools.config({'foo': 'bar', 'this': ['is', 'an', 'example']})\n```\nThe encoding and format of the file will be automatically detected if not specified.\n\n## See Also\n### Github repository\n* https://github.com/Chitaoji/cfgtools/\n\n### PyPI project\n* https://pypi.org/project/cfgtools/\n\n## License\nThis project falls under the BSD 3-Clause License.\n\n## History\n### v0.0.3\n* Added requirement `htmlmaster`.\n\n### v0.0.2\n* New method `ConfigIOWrapper.safematch()`.\n\n### v0.0.1\n* Initial release.\n\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Provides tools for managing config files.",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/Chitaoji/cfgtools/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "64efc72df9967ae0fb9943e4b4119b75a5273c6c35d7cb1dd4bb1bafe53e9091",
                "md5": "a164d6ceff0a75b28ea74ca7a89dda88",
                "sha256": "987185f6313634ec4cf93aaf1d5d85652abd3454118800d9b95fc674a89a4ec6"
            },
            "downloads": -1,
            "filename": "cfgtools-0.0.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a164d6ceff0a75b28ea74ca7a89dda88",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.12.7",
            "size": 16266,
            "upload_time": "2025-07-10T05:12:14",
            "upload_time_iso_8601": "2025-07-10T05:12:14.218196Z",
            "url": "https://files.pythonhosted.org/packages/64/ef/c72df9967ae0fb9943e4b4119b75a5273c6c35d7cb1dd4bb1bafe53e9091/cfgtools-0.0.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-10 05:12:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Chitaoji",
    "github_project": "cfgtools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cfgtools"
}
        
Elapsed time: 1.01572s