lucy-spc


Namelucy-spc JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/aswin-kevin/lucy-spc
SummaryA Python library for reading and writing .spc files
upload_time2024-03-12 04:32:45
maintainer
docs_urlNone
authorAswin Venkat
requires_python
licenseMIT
keywords spc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Lucy SPC

Lucy SPC is a Python library ( name inspired by the character Lucy Pevensie from the Narnia movie series ) provides functionalities to read and write .spc (Special Configuration) files, allowing easy conversion to and from JSON format.

## Installation

You can install Lucy SPC via pip:

```bash
pip install lucy-spc
```

## Usage

### Reading .spc Files

```python
import lucy_spc as cf

# Initialize Config object with the path to the .spc file
spc = cf.Config("example.spc")

# Read the .spc file and convert it to JSON format
json_data = spc.readLucy()

# Print the JSON data
print(json_data)
```

### Modifying JSON Data

```python
# Modify the JSON data as needed
spc.jsonData["aws2"]["secret_key"] = "new_secret_key"

# Write the modified JSON data back to the .spc file
spc.writeLucy()
```

### Writing .spc Files

```python
# Create a new JSON object with the desired configuration
new_config = {
    "connection1": {
        "plugin": "aws",
        "secret_key": "my_secret_key",
        "access_key": "my_access_key",
        "regions": ["us-east-1", "us-west-2"]
    },
    "connection2": {
        "plugin": "gcp",
        "secret_key": "another_secret_key",
        "access_key": "another_access_key",
        "regions": ["us-central1", "us-west1"]
    }
}

# Initialize Config object with a new .spc file path
new_spc = cf.Config("new_config.spc")

# Assign the new JSON data
new_spc.jsonData = new_config

# Write the JSON data to a new .spc file
new_spc.writeLucy()
```

## Contributing

Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change.

## License

This project is licensed under the MIT License.

## Acknowledgements

- This library was inspired by the character Lucy Pevensie from the Narnia movie series.
- Special thanks to myself.


# Change Log

## 0.0.1 (12/03/2024)

- Initial version. basic read and write functionality.

## 0.0.2 (12/03/2024)

- Modified readme description.
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/aswin-kevin/lucy-spc",
    "name": "lucy-spc",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "spc",
    "author": "Aswin Venkat",
    "author_email": "aswinvenkat60@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/52/3b/b36554c92c05b1f1081674852a75d86a08ddf203569da1c35f39be000f07/lucy-spc-0.0.2.tar.gz",
    "platform": null,
    "description": "# Lucy SPC\n\nLucy SPC is a Python library ( name inspired by the character Lucy Pevensie from the Narnia movie series ) provides functionalities to read and write .spc (Special Configuration) files, allowing easy conversion to and from JSON format.\n\n## Installation\n\nYou can install Lucy SPC via pip:\n\n```bash\npip install lucy-spc\n```\n\n## Usage\n\n### Reading .spc Files\n\n```python\nimport lucy_spc as cf\n\n# Initialize Config object with the path to the .spc file\nspc = cf.Config(\"example.spc\")\n\n# Read the .spc file and convert it to JSON format\njson_data = spc.readLucy()\n\n# Print the JSON data\nprint(json_data)\n```\n\n### Modifying JSON Data\n\n```python\n# Modify the JSON data as needed\nspc.jsonData[\"aws2\"][\"secret_key\"] = \"new_secret_key\"\n\n# Write the modified JSON data back to the .spc file\nspc.writeLucy()\n```\n\n### Writing .spc Files\n\n```python\n# Create a new JSON object with the desired configuration\nnew_config = {\n    \"connection1\": {\n        \"plugin\": \"aws\",\n        \"secret_key\": \"my_secret_key\",\n        \"access_key\": \"my_access_key\",\n        \"regions\": [\"us-east-1\", \"us-west-2\"]\n    },\n    \"connection2\": {\n        \"plugin\": \"gcp\",\n        \"secret_key\": \"another_secret_key\",\n        \"access_key\": \"another_access_key\",\n        \"regions\": [\"us-central1\", \"us-west1\"]\n    }\n}\n\n# Initialize Config object with a new .spc file path\nnew_spc = cf.Config(\"new_config.spc\")\n\n# Assign the new JSON data\nnew_spc.jsonData = new_config\n\n# Write the JSON data to a new .spc file\nnew_spc.writeLucy()\n```\n\n## Contributing\n\nContributions are welcome! For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Acknowledgements\n\n- This library was inspired by the character Lucy Pevensie from the Narnia movie series.\n- Special thanks to myself.\n\n\n# Change Log\n\n## 0.0.1 (12/03/2024)\n\n- Initial version. basic read and write functionality.\n\n## 0.0.2 (12/03/2024)\n\n- Modified readme description.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python library for reading and writing .spc files",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/aswin-kevin/lucy-spc"
    },
    "split_keywords": [
        "spc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "523bb36554c92c05b1f1081674852a75d86a08ddf203569da1c35f39be000f07",
                "md5": "c971c2bd42a6231eee86140f9ff13e13",
                "sha256": "d75bd96269a8a97cc01b1d1952e3b197d4993ed63ea2adbd18290ae8e8a937fa"
            },
            "downloads": -1,
            "filename": "lucy-spc-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c971c2bd42a6231eee86140f9ff13e13",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3698,
            "upload_time": "2024-03-12T04:32:45",
            "upload_time_iso_8601": "2024-03-12T04:32:45.018214Z",
            "url": "https://files.pythonhosted.org/packages/52/3b/b36554c92c05b1f1081674852a75d86a08ddf203569da1c35f39be000f07/lucy-spc-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-12 04:32:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aswin-kevin",
    "github_project": "lucy-spc",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "lucy-spc"
}
        
Elapsed time: 0.21898s