properties.py


Nameproperties.py JSON
Version 1.2.1 PyPI version JSON
download
home_pagehttps://github.com/romanin-rf/properties.py
SummaryModule for reading/writing properties-files.
upload_time2023-12-15 21:14:20
maintainer
docs_urlNone
authorRomanin
requires_python>=3.7
licenseMIT
keywords properties java io file read write
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # properties.py
## Description
Module for reading/writing properties-files.

## Installation
```shell
pip install -U properties.py
```

## Usage
#### Code
```python
import properties

user = {"name": "NoName", "age": -1, "sex": "M", "data": {"region": 39, "keywords": ["man", "human", 14.88]}}

with open("test.properties", "w", encoding="utf-8", errors="ignore") as file:
    properties.dump(user, file)

with open("test.properties", "r", encoding="utf-8", errors="ignore") as file:
    data = properties.load(file)

print(data)
```
#### Output
```python
{'name': 'NoName', 'age': -1, 'sex': 'M', 'data': {'region': 39, 'keywords': ['man', 'human', 14.88]}}
```
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/romanin-rf/properties.py",
    "name": "properties.py",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "properties,java,io,file,read,write",
    "author": "Romanin",
    "author_email": "semina054@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "# properties.py\n## Description\nModule for reading/writing properties-files.\n\n## Installation\n```shell\npip install -U properties.py\n```\n\n## Usage\n#### Code\n```python\nimport properties\n\nuser = {\"name\": \"NoName\", \"age\": -1, \"sex\": \"M\", \"data\": {\"region\": 39, \"keywords\": [\"man\", \"human\", 14.88]}}\n\nwith open(\"test.properties\", \"w\", encoding=\"utf-8\", errors=\"ignore\") as file:\n    properties.dump(user, file)\n\nwith open(\"test.properties\", \"r\", encoding=\"utf-8\", errors=\"ignore\") as file:\n    data = properties.load(file)\n\nprint(data)\n```\n#### Output\n```python\n{'name': 'NoName', 'age': -1, 'sex': 'M', 'data': {'region': 39, 'keywords': ['man', 'human', 14.88]}}\n```",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Module for reading/writing properties-files.",
    "version": "1.2.1",
    "project_urls": {
        "Homepage": "https://github.com/romanin-rf/properties.py",
        "Repository": "https://github.com/romanin-rf/properties.py"
    },
    "split_keywords": [
        "properties",
        "java",
        "io",
        "file",
        "read",
        "write"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e7444a57fde8655f3f6e577980c50a95c0d62edc31bb39ed49f3cc5c03630937",
                "md5": "5a6861bfb8e5e30425358050416dc898",
                "sha256": "82fd9247509f513a449122e18b5e6d384ed24be99841c0e82518b64798f2bb77"
            },
            "downloads": -1,
            "filename": "properties_py-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a6861bfb8e5e30425358050416dc898",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5047,
            "upload_time": "2023-12-15T21:14:20",
            "upload_time_iso_8601": "2023-12-15T21:14:20.695212Z",
            "url": "https://files.pythonhosted.org/packages/e7/44/4a57fde8655f3f6e577980c50a95c0d62edc31bb39ed49f3cc5c03630937/properties_py-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-15 21:14:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "romanin-rf",
    "github_project": "properties.py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "properties.py"
}
        
Elapsed time: 0.34816s