{ "info": { "author": "Luis Carlos Berrocal", "author_email": "luis.berrocal.1942@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: User Interfaces", "Topic :: Terminals" ], "description": "-------------\npyjavaprops\n-------------\n\n.. image:: https://travis-ci.org/luiscberrocal/pyjavaprops.svg?branch=master\n :target: https://travis-ci.org/luiscberrocal/pyjavaprops\n\n.. image:: https://coveralls.io/repos/luiscberrocal/pyjavaprops/badge.svg?branch=master&service=github\n :target: https://coveralls.io/github/luiscberrocal/pyjavaprops?branch=master\n\n.. image:: https://badge.fury.io/py/pyjavaprops.svg\n :target: http://badge.fury.io/py/pyjavaprops\n\n\nLibrary to read Java style properties files. I don't particularly like properties files but working with them in Java\nis very easy. I recently had to support reading Java properties files using Python.\n\nThis project is based on Benjamins Brent fork of pyjavaproperties_.\n\nThe libraries main features are:\n\n- Reads properties files.\n\n- You can add new properties.\n\n- You can save properties to file.\n\n- It interprets variables in curly braces {} and dollar curly braces ${}.\n\n.. _pyjavaproperties: https://bitbucket.org/benjaminbrent/pyjavaproperties-python3\n\nCaveats\n--------\n\nThe library does not interpret unicode characters correctly. If you include charactes like \\u4500 it will interpret it\nas \\, letter y and the number 4500.\n\n\nInstallation\n--------------\n\nRequires Python 3.3 or better. \n\n.. code-block:: console\n\n $ pip install pyjavaprops\n \nUsage\n------\n\n\nLoading Java properties\n=========================\n\n.. code-block:: python\n\n filename = os.path.join(TEST_DATA_FOLDER, 'iso-8859-1.properties')\n iso_8859_1_properties = JavaProperties()\n with open(filename, encoding='iso-8859-1') as property_file:\n iso_8859_1_properties.load(property_file)\n name = iso_8859_1_properties['name']\n\nSaving Java properties to file\n================================\n\n.. code-block:: python\n\n filename = os.path.join(TEST_DATA_FOLDER, 'simple.properties')\n simple_java_properties = JavaProperties()\n with open(filename) as property_file:\n simple_java_properties.load(property_file)\n simple_java_properties['country'] = 'Angola'\n output_filename = os.path.join(OUTPUT_FOLDER, 'simple_%s.properties' % datetime.now().strftime('%Y%m%d_%H%M'))\n with open(output_filename, mode='w') as output:\n simple_java_properties.store(output)\n\nExporting to json\n===================\n\n\n.. code-block:: python\n\n output_filename = os.path.join(OUTPUT_FOLDER, 'simple_%s.json' % datetime.now().strftime('%Y%m%d_%H%M'))\n export_to_json(output_filename, java_properties)\n with open(output_filename) as json_data:\n json_properties = json.load(json_data)\n print(json_properties['Key10'])\n\n\n\n\nDevelopment\n------------\n\n\nVirtual Environment\n====================\n\n\nTo create the virtual environment\n\n.. code-block:: bash\n\n $ cd ~/virtual_environments\n\n $ python3 /usr/local/lib/python3.4/site-packages/virtualenv.py --no-site-packages pyjavaprops_env\n\n $ source ./pyjavaprops_env/bin/activate\n\n (pyjavaprops_env) $\n\n\nRunnig Tests\n=============\n\n.. code-block:: bash\n\n $ coverage run --source pyjavaprops setup.py test", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/luiscberrocal/pyjavaprops/archive/v1.0.2.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/luiscberrocal/pyjavaprops", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pyjavaprops", "package_url": "https://pypi.org/project/pyjavaprops/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyjavaprops/", "project_urls": { "Download": "https://github.com/luiscberrocal/pyjavaprops/archive/v1.0.2.zip", "Homepage": "https://github.com/luiscberrocal/pyjavaprops" }, "release_url": "https://pypi.org/project/pyjavaprops/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Tool to parse Java style properties file", "version": "1.0.2" }, "last_serial": 1740663, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "ebedf2503ee464837954f668d152ba63", "sha256": "a5fb0f1cdd4bea7f270e5e34afdf6407e76a591e958b684b6dd559dcbdbbf93b" }, "downloads": -1, "filename": "pyjavaprops-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ebedf2503ee464837954f668d152ba63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5233, "upload_time": "2015-09-23T04:47:29", "url": "https://files.pythonhosted.org/packages/43/3e/00985047100bb41eb99e75d4e775416031359c68c3c6d55046e1a44191fa/pyjavaprops-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "9ed924987ef43e152c4bc1ef3d0ac669", "sha256": "767b4042e89098b01976b23f2d9e22248b3d248110c82082005177a33a5c1d12" }, "downloads": -1, "filename": "pyjavaprops-0.1.3.tar.gz", "has_sig": false, "md5_digest": "9ed924987ef43e152c4bc1ef3d0ac669", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5727, "upload_time": "2015-09-24T00:50:07", "url": "https://files.pythonhosted.org/packages/15/de/d8f53c4d0aca0310b1dccb5107dee48836b545ea314fb009dfcaba11680a/pyjavaprops-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "bb75f55e364acade963e884754da8d73", "sha256": "550bcd738d620cbbb9c244a7c09be5ac807e03e9c2e2f45e356948543f3202e2" }, "downloads": -1, "filename": "pyjavaprops-0.1.4.tar.gz", "has_sig": false, "md5_digest": "bb75f55e364acade963e884754da8d73", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6083, "upload_time": "2015-09-25T12:50:54", "url": "https://files.pythonhosted.org/packages/11/f0/23089b3bc25db75f6fe645c510a667c0cfb125a914f9f54ab0809a83dc7e/pyjavaprops-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "4224c5b132c72e5bf5d4955489c2dc33", "sha256": "d2360d21ab11f5475ed61958b0a384bec9b44198c369f648789f07f0fe04fc3e" }, "downloads": -1, "filename": "pyjavaprops-0.1.5.tar.gz", "has_sig": false, "md5_digest": "4224c5b132c72e5bf5d4955489c2dc33", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6233, "upload_time": "2015-09-25T18:22:45", "url": "https://files.pythonhosted.org/packages/56/0c/5bd21a001ff915495ff52d6c798bbac7059ed107bb2a3eb41caed267193c/pyjavaprops-0.1.5.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "a160c579c14cb8bd1556d5ca530f76b0", "sha256": "29ee99afee28a06b035e908cfe9e203b6fbe9ce45dc02e957b562973fd3006c8" }, "downloads": -1, "filename": "pyjavaprops-1.0.0.tar.gz", "has_sig": false, "md5_digest": "a160c579c14cb8bd1556d5ca530f76b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6916, "upload_time": "2015-09-26T12:10:55", "url": "https://files.pythonhosted.org/packages/74/3e/f6e7da02c77afc747dd2ac461cf50c9dc848a9c32278b5483f4336e32643/pyjavaprops-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "e330b7fe52b52e5fbcee65ea22887069", "sha256": "4b4669ae4e05c2b937f8452db497d5b97f8e4d901ccb3d6ad2e7273bc59c8fdb" }, "downloads": -1, "filename": "pyjavaprops-1.0.1.tar.gz", "has_sig": false, "md5_digest": "e330b7fe52b52e5fbcee65ea22887069", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6992, "upload_time": "2015-09-26T12:26:09", "url": "https://files.pythonhosted.org/packages/c7/05/e6c33ef16c1111c754f5b58ffc5c87a2a706508ef1142f374bf5b4bde80e/pyjavaprops-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "7b4fc2491242a74db8948d2128697c0a", "sha256": "0e1e54e203072e8c0753ac67f10b1c52446d7dc81fbf2b5adec7b9f6c6b9a0d0" }, "downloads": -1, "filename": "pyjavaprops-1.0.2.tar.gz", "has_sig": false, "md5_digest": "7b4fc2491242a74db8948d2128697c0a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7200, "upload_time": "2015-09-27T13:04:53", "url": "https://files.pythonhosted.org/packages/e6/ff/3ffbe8fc1cc30212e39aeec551863494731ea913f759b2eec84aca124ae4/pyjavaprops-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7b4fc2491242a74db8948d2128697c0a", "sha256": "0e1e54e203072e8c0753ac67f10b1c52446d7dc81fbf2b5adec7b9f6c6b9a0d0" }, "downloads": -1, "filename": "pyjavaprops-1.0.2.tar.gz", "has_sig": false, "md5_digest": "7b4fc2491242a74db8948d2128697c0a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7200, "upload_time": "2015-09-27T13:04:53", "url": "https://files.pythonhosted.org/packages/e6/ff/3ffbe8fc1cc30212e39aeec551863494731ea913f759b2eec84aca124ae4/pyjavaprops-1.0.2.tar.gz" } ] }