{
"info": {
"author": "Tom Ritchford",
"author_email": "tom@swirly.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7"
],
"description": "`cfgs`\n-------------\n\nSimple, correct handling of config, data and cache files\n==================================================================\n\nLike everyone else, I wrote a lot of programs which saved config files\nas dotfiles in the user's home directory like ``~/.my-program-name`` and now\neveryone's home directory has dozens of these.\n\nThen I read\n`this article `_.\n\nGreat was my embarrasment to discover that there was a\n`neat little specification `_\nfor data, config and cache directories in Linux that prevents this problem, and\nthat I was not using it:\n\nSo I implemented a small and simple Python API as a single file, ``cfgs.py``.\n\nIt works on all versions of Python from 2.7 to 3.7, has complete test coverage,\nand all the functionality is reachable from a single class, ``cfgs.App``\n\nHow it works in one sentence\n===========================================\n\nCreate a ``cfgs.App`` for your application, project, or script which\nhandles finding, reading and writing your data and config files, and\nmanaging your cache directories.\n\nHow to install\n=====================\n\nYou can either use pip:\n\n.. code-block:: bash\n\n pip install cfgs\n\nOr if you don't like dependencies (and who does?), you can drop the source file\n`cgfs.py `_\nright into your project.\n\n\nUsage examples\n==================\n\n.. code-block:: python\n\n import cfgs\n app = cfgs.App('my-project')\n print(app.xdg.XDG_CACHE_HOME)\n # /home/tom/.cache/my-project\n\n app.xdg.XDG_CONFIG_DIRS\n # /etc/xdg\n\n with app.config.open() as f:\n f.update(name='oliver', species='dog')\n f['description'] = {'size': 'S', 'fur': 'brown'}\n print(f.filename)\n # /home/tom/.cache/my-project/my-project.json\n\n # Later:\n with app.config.open() as f:\n print(f['name'])\n # oliver\n\n print(f.as_dict())\n # {'name': 'oliver', 'species': 'dog',\n # 'description': {'size': 'S', 'fur': 'brown'}\n\n\nCache\n======\n\n.. code-block:: python\n\n import cfgs\n cache_size = 0x10000000\n app = cfgs.App('my-project')\n directory = app.cache.directory(cache_size=cache_size)\n # TODO: rewrite cache or add features.\n\n\nUsing ``cfgs`` In legacy code\n=============================\n\nIf you already have code to handle your config, data and cache files, then you\ncan just use ``cgfs`` to get the\n`XDG variables `_\n\n.. code-block:: python\n\n from cfgs import XDG\n\n xdg = XDG()\n config_dir = xdg.XDG_CONFIG_HOME\n\n # Your code here - eg:\n my_config_file = os.path.join(config_dir, 'my-file.json')\n with open(my_config_file) as f:\n legacy_write_my_file(f)\n\n\n``cfgs`` automatically handles data and config files, and independently, cache\ndirectories.\n\n\nAPI Documentation\n======================\n\nAPI documentation is `here `_.\n\n--------------------------------------\n\n====== ======\n|pic1| |pic2|\n====== ======\n\n\n.. |pic2| image::\n https://img.shields.io/travis/timedata-org/cfgs/master.svg?style=flat\n\n.. |pic1| image:: https://img.shields.io/pypi/pyversions/cfgs.svg?style=flat\n",
"description_content_type": "",
"docs_url": null,
"download_url": "http://github.com/rec/cfgs/archive/0.9.9.tar.gz",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://github.com/rec/cfgs",
"keywords": "configuration",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "cfgs",
"package_url": "https://pypi.org/project/cfgs/",
"platform": "",
"project_url": "https://pypi.org/project/cfgs/",
"project_urls": {
"Download": "http://github.com/rec/cfgs/archive/0.9.9.tar.gz",
"Homepage": "http://github.com/rec/cfgs"
},
"release_url": "https://pypi.org/project/cfgs/0.9.9/",
"requires_dist": null,
"requires_python": "",
"summary": "cfgs is a pure Python library for data and config files which implements the XDG standard for persistent files",
"version": "0.9.9"
},
"last_serial": 5012486,
"releases": {
"0.9.0": [
{
"comment_text": "",
"digests": {
"md5": "4c6d173cd156205bcf7bb084deb924ea",
"sha256": "54418b9316c17da7889a35e9e9514dff070ef55bc490cf62f9e161dcabf4053d"
},
"downloads": -1,
"filename": "cfgs-0.9.0.tar.gz",
"has_sig": false,
"md5_digest": "4c6d173cd156205bcf7bb084deb924ea",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4529,
"upload_time": "2019-02-13T14:54:05",
"url": "https://files.pythonhosted.org/packages/33/3c/e1cd2648d5b60e050fb289a28e604812c1e6064427a9e65e9e2a202e242f/cfgs-0.9.0.tar.gz"
}
],
"0.9.1": [
{
"comment_text": "",
"digests": {
"md5": "fb767bff1ec4bd62aa48f5058b93d9eb",
"sha256": "dd93e718e2b7edeb1a9b51e11032f8d9b43d74b33e88bd35988c71929a8b7f19"
},
"downloads": -1,
"filename": "cfgs-0.9.1.tar.gz",
"has_sig": false,
"md5_digest": "fb767bff1ec4bd62aa48f5058b93d9eb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3089,
"upload_time": "2019-02-13T15:15:50",
"url": "https://files.pythonhosted.org/packages/9c/48/83efcd63cbfa7c76f82d0baa2e102137707a26501a24ca68fd2947de2947/cfgs-0.9.1.tar.gz"
}
],
"0.9.2": [
{
"comment_text": "",
"digests": {
"md5": "ba60e0d363f14225e03c2b6ec0fbb5f3",
"sha256": "46159481288ca8e6912728a8d136617e3fd7fd0541898212842135004169137e"
},
"downloads": -1,
"filename": "cfgs-0.9.2.tar.gz",
"has_sig": false,
"md5_digest": "ba60e0d363f14225e03c2b6ec0fbb5f3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3149,
"upload_time": "2019-02-13T16:45:37",
"url": "https://files.pythonhosted.org/packages/a5/cf/55b058e94194d8032763d31c79d93a0f0a122fc565f07a1293783aa044f9/cfgs-0.9.2.tar.gz"
}
],
"0.9.3": [
{
"comment_text": "",
"digests": {
"md5": "840287dce170bc768654452fbd1ac941",
"sha256": "e2d80b8802c05fd6d19c3cdba243578326a832eefa8b83193aff0bda86b247e5"
},
"downloads": -1,
"filename": "cfgs-0.9.3.tar.gz",
"has_sig": false,
"md5_digest": "840287dce170bc768654452fbd1ac941",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3472,
"upload_time": "2019-02-13T17:28:26",
"url": "https://files.pythonhosted.org/packages/15/76/b0771d0534b4f75a8bd31fee86311ad4c6dcf8761383f35b45b859d128ec/cfgs-0.9.3.tar.gz"
}
],
"0.9.4": [
{
"comment_text": "",
"digests": {
"md5": "cecaa767ea296ac2a315a62a5342a92b",
"sha256": "a64dd7d52bafc0fee76f668700ce155620384f2e6f6956d33e3d5d74b1d8a1aa"
},
"downloads": -1,
"filename": "cfgs-0.9.4.tar.gz",
"has_sig": false,
"md5_digest": "cecaa767ea296ac2a315a62a5342a92b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3598,
"upload_time": "2019-02-15T17:56:51",
"url": "https://files.pythonhosted.org/packages/ec/37/24f47af346119db3b6cacb8b350812251418e95ec3887328dd04c4d583ca/cfgs-0.9.4.tar.gz"
}
],
"0.9.5": [
{
"comment_text": "",
"digests": {
"md5": "cd482ebe896c6f3a0fda235f177fbb08",
"sha256": "c1626fb00ab59467891b2c7de1c71a668803ce1fc296e8bac612a32ca9dcd75b"
},
"downloads": -1,
"filename": "cfgs-0.9.5.tar.gz",
"has_sig": false,
"md5_digest": "cd482ebe896c6f3a0fda235f177fbb08",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3680,
"upload_time": "2019-02-16T11:07:27",
"url": "https://files.pythonhosted.org/packages/68/2c/447523dae4e04933398d70050371535b507c3df5c967148e20dc2f953cc6/cfgs-0.9.5.tar.gz"
}
],
"0.9.6": [
{
"comment_text": "",
"digests": {
"md5": "3c0f0af27928c99addc0106479204dd1",
"sha256": "d54df26a3ef513cb32239a14e513d0a643d009cb81fa8adaba03cfdb62ec043f"
},
"downloads": -1,
"filename": "cfgs-0.9.6.tar.gz",
"has_sig": false,
"md5_digest": "3c0f0af27928c99addc0106479204dd1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7108,
"upload_time": "2019-02-16T11:11:10",
"url": "https://files.pythonhosted.org/packages/88/87/0c8e08e5366e641a90458ca8a91a64632f885056385597a5e3dcb7cf50bf/cfgs-0.9.6.tar.gz"
}
],
"0.9.7": [
{
"comment_text": "",
"digests": {
"md5": "f5ea8b42e2e384dbe902d7a825d03d17",
"sha256": "d289423ace78e3a1f137254c5b941206d98c4cfb25674ba4cca1ebb98d46a188"
},
"downloads": -1,
"filename": "cfgs-0.9.7.tar.gz",
"has_sig": false,
"md5_digest": "f5ea8b42e2e384dbe902d7a825d03d17",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7105,
"upload_time": "2019-02-16T11:19:45",
"url": "https://files.pythonhosted.org/packages/92/a4/1a0423ebda948995e75ad41cc6f8ba6c55e94f82578c726def1a11bb29db/cfgs-0.9.7.tar.gz"
}
],
"0.9.9": [
{
"comment_text": "",
"digests": {
"md5": "d2119594d82d3b2d8938c15de9241721",
"sha256": "4f77e6ec57c51e469f2183633cccef85c112a068205b7a4a402cba5da8dd93e3"
},
"downloads": -1,
"filename": "cfgs-0.9.9.tar.gz",
"has_sig": false,
"md5_digest": "d2119594d82d3b2d8938c15de9241721",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7156,
"upload_time": "2019-04-01T10:40:32",
"url": "https://files.pythonhosted.org/packages/8d/8d/64113e74c008a6b0a22e15d3f7323fcb418cc7ff4e25147116f41358c5aa/cfgs-0.9.9.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "d2119594d82d3b2d8938c15de9241721",
"sha256": "4f77e6ec57c51e469f2183633cccef85c112a068205b7a4a402cba5da8dd93e3"
},
"downloads": -1,
"filename": "cfgs-0.9.9.tar.gz",
"has_sig": false,
"md5_digest": "d2119594d82d3b2d8938c15de9241721",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7156,
"upload_time": "2019-04-01T10:40:32",
"url": "https://files.pythonhosted.org/packages/8d/8d/64113e74c008a6b0a22e15d3f7323fcb418cc7ff4e25147116f41358c5aa/cfgs-0.9.9.tar.gz"
}
]
}