Name | smartsettings JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | Smart Settings |
upload_time | 2024-07-04 03:05:17 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | MIT License Copyright (c) 2024 Quan Lin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
json
settings
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Smart Settings
[![PyPI version][pypi_img]][pypi_link]
[![Downloads][downloads_img]][downloads_link]
[pypi_img]: https://badge.fury.io/py/smartsettings.svg
[pypi_link]: https://badge.fury.io/py/smartsettings
[downloads_img]: https://pepy.tech/badge/smartsettings
[downloads_link]: https://pepy.tech/project/smartsettings
Easy to use, flexible and versitile settings.
It can be serialized to json format, and even encrypted.
The `updatable` feature makes it suitable for value bindings.
## Installation
`pip install smartsettings`
## Usage
### Use `SmartSettings` directly
<details open><summary>Code</summary>
```python
import smartsettings as ss
# Add attributes on initialization
settings = ss.SmartSettings(name="settings", first_value=100)
# Add attribute directly
settings.second_value = 3.14
# Add attribute with indexing operator
settings["third_value"] = True
# Add subsettings
settings.fourth_value = ss.SmartSettings(name="subsettings", value=200)
print(f"{settings = }")
# Serialize settings to json string
# The `indent` keyword argument is passed to `jsonpickle.encode`
settings_string = ss.to_string(settings, indent=2)
print("settings_string =", settings_string)
# Deserialize settings from json string
loaded_settings = ss.from_string(settings_string)
print(f"{loaded_settings = }")
# The 2 settings are equal
print(loaded_settings == settings)
# Non-existing attribute with indexing operator returns `None`
print(f"{settings['fifth_value'] = }")
# Non-existing attribute raises `AttributeError`
try:
print(f"{settings.fifth_value = }")
except AttributeError as ae:
print(ae)
```
</details>
<details open><summary>Output</summary>
```
settings = {'name': 'settings', 'first_value': 100, 'second_value': 3.14, 'third_value': True, 'fourth_value': {'name': 'subsettings', 'value': 200}}
settings_string = {
"py/object": "smartsettings.smartsettings.SmartSettings",
"name": "settings",
"first_value": 100,
"second_value": 3.14,
"third_value": true,
"fourth_value": {
"py/object": "smartsettings.smartsettings.SmartSettings",
"name": "subsettings",
"value": 200
}
}
loaded_settings = {'name': 'settings', 'first_value': 100, 'second_value': 3.14, 'third_value': True, 'fourth_value': {'name': 'subsettings', 'value': 200}}
True
settings['fifth_value'] = None
'SmartSettings' object has no attribute 'fifth_value'
```
</details>
### Subclass `SmartSettings`
<details><summary>Code</summary>
```python
import smartsettings as ss
class ChildSettings(ss.SmartSettings):
def __init__(self, name: str, value: int) -> None:
self.name = name
self.value = value
class ParentSettings(ss.SmartSettings):
def __init__(self, name: str, children: list[ChildSettings]) -> None:
self.name = name
self.children = children
parent_settings = ParentSettings(
name="parent",
children=[
ChildSettings(name="first child", value=100),
ChildSettings(name="second child", value=200),
ChildSettings(name="third child", value=300),
],
)
print(f"{parent_settings = }")
# Serialize settings to json string
# The `indent` keyword argument is passed to `jsonpickle.encode`
parent_settings_string = ss.to_string(parent_settings, indent=2)
print("parent_settings_string =", parent_settings_string)
# Deserialize settings from json string
loaded_parent_settings = ss.from_string(parent_settings_string)
print(f"{loaded_parent_settings = }")
# The 2 settings are equal
print(loaded_parent_settings == parent_settings)
```
</details>
<details><summary>Output</summary>
```
parent_settings = {'name': 'parent', 'children': [{'name': 'first child', 'value': 100}, {'name': 'second child', 'value': 200}, {'name': 'third child', 'value': 300}]}
parent_settings_string = {
"py/object": "__main__.ParentSettings",
"name": "parent",
"children": [
{
"py/object": "__main__.ChildSettings",
"name": "first child",
"value": 100
},
{
"py/object": "__main__.ChildSettings",
"name": "second child",
"value": 200
},
{
"py/object": "__main__.ChildSettings",
"name": "third child",
"value": 300
}
]
}
loaded_parent_settings = {'name': 'parent', 'children': [{'name': 'first child', 'value': 100}, {'name': 'second child', 'value': 200}, {'name': 'third child', 'value': 300}]}
True
```
</details>
### With encryption
<details><summary>Code</summary>
```python
import smartsettings as ss
# Add attributes on initialization
settings = ss.SmartSettings(name="settings", value=100)
print(f"{settings = }")
# Serialize and encrypt settings to string
settings_string = ss.to_string(settings, crypto_key="secret")
print("settings_string =", settings_string)
# Decrypt and deserialize settings from string
loaded_settings = ss.from_string(settings_string, crypto_key="secret")
print(f"{loaded_settings = }")
# The 2 settings are equal
print(loaded_settings == settings)
```
</details>
<details><summary>Output</summary>
```
settings = {'name': 'settings', 'value': 100}
settings_string = GmllNjgIP9KhgWIWiv8pva6r9vVCFldz3NKv9sbAdy+gpRDU1MuO4Rcs9NoooD/yXudNWWPTbWmjbfIaxRv/VZ6bIy6Gsn/LAZJl6K3PgWHcIP3v6rZWZGMuH9yquTHf
loaded_settings = {'name': 'settings', 'value': 100}
True
```
</details>
### Json settings file
<details><summary>Code</summary>
```python
from pathlib import Path
import smartsettings as ss
# Settings file path
JSON_SETTINGS_FILE_PATH = Path("settings/settings.json")
# Default settings
default_settings = ss.SmartSettings(name="default_settings", value=0)
# Add attributes on initialization
settings = ss.SmartSettings(name="settings", value=100)
print(f"{settings = }")
# Serialize settings to json file
# The `backup_num` keyword argument controls the number of backup files
# When `backup_num=None` (default), the number of backup files is unlimited
# When `backup_num=0`, there is no backup file at all
# The `indent` keyword argument is passed to `jsonpickle.encode`
ss.to_file(
settings,
JSON_SETTINGS_FILE_PATH,
backup_num=2,
indent=2,
)
# Deserialize settings from json file
# In case the settings file does not exist, the `default_settings` is loaded.
loaded_settings = ss.from_file(
JSON_SETTINGS_FILE_PATH,
default_settings=default_settings,
)
print(f"{loaded_settings = }")
# The 2 settings are equal
print(loaded_settings == settings)
```
</details>
<details><summary>Output</summary>
```
settings = {'name': 'settings', 'value': 100}
loaded_settings = {'name': 'settings', 'value': 100}
True
```
</details>
### Encrypted settings file
<details><summary>Code</summary>
```python
from pathlib import Path
import smartsettings as ss
# Encrypted settings file path
ENCRYPTED_SETTINGS_FILE_PATH = Path("settings/settings.txt")
# Default settings
default_settings = ss.SmartSettings(name="default_settings", value=0)
# Add attributes on initialization
settings = ss.SmartSettings(name="settings", value=100)
print(f"{settings = }")
# Serialize and encrypt settings to text file
# The `backup_num` keyword argument controls the number of backup files
# When `backup_num=None` (default), the number of backup files is unlimited
# When `backup_num=0`, there is no backup file at all
ss.to_file(
settings,
ENCRYPTED_SETTINGS_FILE_PATH,
crypto_key="secret",
backup_num=2,
)
# Decrypt and deserialize settings from text file
# In case the settings file does not exist, the `default_settings` is loaded.
loaded_settings = ss.from_file(
ENCRYPTED_SETTINGS_FILE_PATH,
crypto_key="secret",
default_settings=default_settings,
)
print(f"{loaded_settings = }")
# The 2 settings are equal
print(loaded_settings == settings)
```
</details>
<details><summary>Output</summary>
```
settings = {'name': 'settings', 'value': 100}
loaded_settings = {'name': 'settings', 'value': 100}
True
```
</details>
### Settings update
<details><summary>Code</summary>
```python
import smartsettings as ss
# Settings
settings = ss.SmartSettings(name="settings", value=100)
print(f"{settings = }")
# New settings
new_settings = ss.SmartSettings(name="new_settings", value=200)
print(f"{new_settings = }")
# Update `settings` with `new_settings`
# `<<` operator has the same effect as `_update_with` method
# `settings._update_with(new_settings)`
settings << new_settings
print(f"{settings = }")
# The 2 settings are equal
print(settings == new_settings)
```
</details>
<details><summary>Output</summary>
```
settings = {'name': 'settings', 'value': 100}
new_settings = {'name': 'new_settings', 'value': 200}
settings = {'name': 'new_settings', 'value': 200}
True
```
</details>
### Dictionary settings
<details><summary>Code</summary>
```python
import smartsettings as ss
# Dictionary settings
settings = dict(name="settings", first_value=100)
settings["second_value"] = 3.14
settings["third_value"] = True
# Dictionary subsettings
settings["fourth_value"] = dict(name="subsettings", value=200)
print(f"{settings = }")
# Serialize settings to json string
# The `indent` keyword argument is passed to `jsonpickle.encode`
settings_string = ss.to_string(settings, indent=2)
print("settings_string =", settings_string)
# Deserialize settings from json string
loaded_settings = ss.from_string(settings_string)
print(f"{loaded_settings = }")
# The 2 settings are equal
print(loaded_settings == settings)
```
</details>
<details><summary>Output</summary>
```
settings = {'name': 'settings', 'first_value': 100, 'second_value': 3.14, 'third_value': True, 'fourth_value': {'name': 'subsettings', 'value': 200}}
settings_string = {
"name": "settings",
"first_value": 100,
"second_value": 3.14,
"third_value": true,
"fourth_value": {
"name": "subsettings",
"value": 200
}
}
loaded_settings = {'name': 'settings', 'first_value': 100, 'second_value': 3.14, 'third_value': True, 'fourth_value': {'name': 'subsettings', 'value': 200}}
True
```
Raw data
{
"_id": null,
"home_page": null,
"name": "smartsettings",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "json, settings",
"author": null,
"author_email": "Quan Lin <jacklinquan@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/3b/7e/4fc152d0f8d0e19fd77e7e15def44c88321764df49e43ac96f98b8cbc8b7/smartsettings-0.2.0.tar.gz",
"platform": null,
"description": "# Smart Settings\r\n\r\n[![PyPI version][pypi_img]][pypi_link]\r\n[![Downloads][downloads_img]][downloads_link]\r\n\r\n [pypi_img]: https://badge.fury.io/py/smartsettings.svg\r\n [pypi_link]: https://badge.fury.io/py/smartsettings\r\n [downloads_img]: https://pepy.tech/badge/smartsettings\r\n [downloads_link]: https://pepy.tech/project/smartsettings\r\n\r\nEasy to use, flexible and versitile settings.\r\nIt can be serialized to json format, and even encrypted.\r\nThe `updatable` feature makes it suitable for value bindings.\r\n\r\n## Installation\r\n\r\n`pip install smartsettings`\r\n\r\n## Usage\r\n\r\n### Use `SmartSettings` directly\r\n\r\n<details open><summary>Code</summary>\r\n\r\n```python\r\nimport smartsettings as ss\r\n\r\n# Add attributes on initialization\r\nsettings = ss.SmartSettings(name=\"settings\", first_value=100)\r\n# Add attribute directly\r\nsettings.second_value = 3.14\r\n# Add attribute with indexing operator\r\nsettings[\"third_value\"] = True\r\n# Add subsettings\r\nsettings.fourth_value = ss.SmartSettings(name=\"subsettings\", value=200)\r\nprint(f\"{settings = }\")\r\n\r\n# Serialize settings to json string\r\n# The `indent` keyword argument is passed to `jsonpickle.encode`\r\nsettings_string = ss.to_string(settings, indent=2)\r\nprint(\"settings_string =\", settings_string)\r\n\r\n# Deserialize settings from json string\r\nloaded_settings = ss.from_string(settings_string)\r\nprint(f\"{loaded_settings = }\")\r\n\r\n# The 2 settings are equal\r\nprint(loaded_settings == settings)\r\n\r\n# Non-existing attribute with indexing operator returns `None`\r\nprint(f\"{settings['fifth_value'] = }\")\r\n\r\n# Non-existing attribute raises `AttributeError`\r\ntry:\r\n print(f\"{settings.fifth_value = }\")\r\nexcept AttributeError as ae:\r\n print(ae)\r\n```\r\n</details>\r\n\r\n<details open><summary>Output</summary>\r\n\r\n```\r\nsettings = {'name': 'settings', 'first_value': 100, 'second_value': 3.14, 'third_value': True, 'fourth_value': {'name': 'subsettings', 'value': 200}}\r\nsettings_string = {\r\n \"py/object\": \"smartsettings.smartsettings.SmartSettings\",\r\n \"name\": \"settings\",\r\n \"first_value\": 100,\r\n \"second_value\": 3.14,\r\n \"third_value\": true,\r\n \"fourth_value\": {\r\n \"py/object\": \"smartsettings.smartsettings.SmartSettings\",\r\n \"name\": \"subsettings\",\r\n \"value\": 200\r\n }\r\n}\r\nloaded_settings = {'name': 'settings', 'first_value': 100, 'second_value': 3.14, 'third_value': True, 'fourth_value': {'name': 'subsettings', 'value': 200}}\r\nTrue\r\nsettings['fifth_value'] = None\r\n'SmartSettings' object has no attribute 'fifth_value'\r\n```\r\n</details>\r\n\r\n### Subclass `SmartSettings`\r\n\r\n<details><summary>Code</summary>\r\n\r\n```python\r\nimport smartsettings as ss\r\n\r\n\r\nclass ChildSettings(ss.SmartSettings):\r\n def __init__(self, name: str, value: int) -> None:\r\n self.name = name\r\n self.value = value\r\n\r\n\r\nclass ParentSettings(ss.SmartSettings):\r\n def __init__(self, name: str, children: list[ChildSettings]) -> None:\r\n self.name = name\r\n self.children = children\r\n\r\n\r\nparent_settings = ParentSettings(\r\n name=\"parent\",\r\n children=[\r\n ChildSettings(name=\"first child\", value=100),\r\n ChildSettings(name=\"second child\", value=200),\r\n ChildSettings(name=\"third child\", value=300),\r\n ],\r\n)\r\nprint(f\"{parent_settings = }\")\r\n\r\n# Serialize settings to json string\r\n# The `indent` keyword argument is passed to `jsonpickle.encode`\r\nparent_settings_string = ss.to_string(parent_settings, indent=2)\r\nprint(\"parent_settings_string =\", parent_settings_string)\r\n\r\n# Deserialize settings from json string\r\nloaded_parent_settings = ss.from_string(parent_settings_string)\r\nprint(f\"{loaded_parent_settings = }\")\r\n\r\n# The 2 settings are equal\r\nprint(loaded_parent_settings == parent_settings)\r\n```\r\n</details>\r\n\r\n<details><summary>Output</summary>\r\n\r\n```\r\nparent_settings = {'name': 'parent', 'children': [{'name': 'first child', 'value': 100}, {'name': 'second child', 'value': 200}, {'name': 'third child', 'value': 300}]}\r\nparent_settings_string = {\r\n \"py/object\": \"__main__.ParentSettings\",\r\n \"name\": \"parent\",\r\n \"children\": [\r\n {\r\n \"py/object\": \"__main__.ChildSettings\",\r\n \"name\": \"first child\",\r\n \"value\": 100\r\n },\r\n {\r\n \"py/object\": \"__main__.ChildSettings\",\r\n \"name\": \"second child\",\r\n \"value\": 200\r\n },\r\n {\r\n \"py/object\": \"__main__.ChildSettings\",\r\n \"name\": \"third child\",\r\n \"value\": 300\r\n }\r\n ]\r\n}\r\nloaded_parent_settings = {'name': 'parent', 'children': [{'name': 'first child', 'value': 100}, {'name': 'second child', 'value': 200}, {'name': 'third child', 'value': 300}]}\r\nTrue\r\n```\r\n</details>\r\n\r\n### With encryption\r\n\r\n<details><summary>Code</summary>\r\n\r\n```python\r\nimport smartsettings as ss\r\n\r\n# Add attributes on initialization\r\nsettings = ss.SmartSettings(name=\"settings\", value=100)\r\nprint(f\"{settings = }\")\r\n\r\n# Serialize and encrypt settings to string\r\nsettings_string = ss.to_string(settings, crypto_key=\"secret\")\r\nprint(\"settings_string =\", settings_string)\r\n\r\n# Decrypt and deserialize settings from string\r\nloaded_settings = ss.from_string(settings_string, crypto_key=\"secret\")\r\nprint(f\"{loaded_settings = }\")\r\n\r\n# The 2 settings are equal\r\nprint(loaded_settings == settings)\r\n```\r\n</details>\r\n\r\n<details><summary>Output</summary>\r\n\r\n```\r\nsettings = {'name': 'settings', 'value': 100}\r\nsettings_string = GmllNjgIP9KhgWIWiv8pva6r9vVCFldz3NKv9sbAdy+gpRDU1MuO4Rcs9NoooD/yXudNWWPTbWmjbfIaxRv/VZ6bIy6Gsn/LAZJl6K3PgWHcIP3v6rZWZGMuH9yquTHf\r\nloaded_settings = {'name': 'settings', 'value': 100}\r\nTrue\r\n```\r\n</details>\r\n\r\n### Json settings file\r\n\r\n<details><summary>Code</summary>\r\n\r\n```python\r\nfrom pathlib import Path\r\nimport smartsettings as ss\r\n\r\n# Settings file path\r\nJSON_SETTINGS_FILE_PATH = Path(\"settings/settings.json\")\r\n\r\n# Default settings\r\ndefault_settings = ss.SmartSettings(name=\"default_settings\", value=0)\r\n\r\n# Add attributes on initialization\r\nsettings = ss.SmartSettings(name=\"settings\", value=100)\r\nprint(f\"{settings = }\")\r\n\r\n# Serialize settings to json file\r\n# The `backup_num` keyword argument controls the number of backup files\r\n# When `backup_num=None` (default), the number of backup files is unlimited\r\n# When `backup_num=0`, there is no backup file at all\r\n# The `indent` keyword argument is passed to `jsonpickle.encode`\r\nss.to_file(\r\n settings,\r\n JSON_SETTINGS_FILE_PATH,\r\n backup_num=2,\r\n indent=2,\r\n)\r\n\r\n# Deserialize settings from json file\r\n# In case the settings file does not exist, the `default_settings` is loaded.\r\nloaded_settings = ss.from_file(\r\n JSON_SETTINGS_FILE_PATH,\r\n default_settings=default_settings,\r\n)\r\nprint(f\"{loaded_settings = }\")\r\n\r\n# The 2 settings are equal\r\nprint(loaded_settings == settings)\r\n```\r\n</details>\r\n\r\n<details><summary>Output</summary>\r\n\r\n```\r\nsettings = {'name': 'settings', 'value': 100}\r\nloaded_settings = {'name': 'settings', 'value': 100}\r\nTrue\r\n```\r\n</details>\r\n\r\n### Encrypted settings file\r\n\r\n<details><summary>Code</summary>\r\n\r\n```python\r\nfrom pathlib import Path\r\nimport smartsettings as ss\r\n\r\n# Encrypted settings file path\r\nENCRYPTED_SETTINGS_FILE_PATH = Path(\"settings/settings.txt\")\r\n\r\n# Default settings\r\ndefault_settings = ss.SmartSettings(name=\"default_settings\", value=0)\r\n\r\n# Add attributes on initialization\r\nsettings = ss.SmartSettings(name=\"settings\", value=100)\r\nprint(f\"{settings = }\")\r\n\r\n# Serialize and encrypt settings to text file\r\n# The `backup_num` keyword argument controls the number of backup files\r\n# When `backup_num=None` (default), the number of backup files is unlimited\r\n# When `backup_num=0`, there is no backup file at all\r\nss.to_file(\r\n settings,\r\n ENCRYPTED_SETTINGS_FILE_PATH,\r\n crypto_key=\"secret\",\r\n backup_num=2,\r\n)\r\n\r\n# Decrypt and deserialize settings from text file\r\n# In case the settings file does not exist, the `default_settings` is loaded.\r\nloaded_settings = ss.from_file(\r\n ENCRYPTED_SETTINGS_FILE_PATH,\r\n crypto_key=\"secret\",\r\n default_settings=default_settings,\r\n)\r\nprint(f\"{loaded_settings = }\")\r\n\r\n# The 2 settings are equal\r\nprint(loaded_settings == settings)\r\n```\r\n</details>\r\n\r\n<details><summary>Output</summary>\r\n\r\n```\r\nsettings = {'name': 'settings', 'value': 100}\r\nloaded_settings = {'name': 'settings', 'value': 100}\r\nTrue\r\n```\r\n</details>\r\n\r\n### Settings update\r\n\r\n<details><summary>Code</summary>\r\n\r\n```python\r\nimport smartsettings as ss\r\n\r\n# Settings\r\nsettings = ss.SmartSettings(name=\"settings\", value=100)\r\nprint(f\"{settings = }\")\r\n\r\n# New settings\r\nnew_settings = ss.SmartSettings(name=\"new_settings\", value=200)\r\nprint(f\"{new_settings = }\")\r\n\r\n# Update `settings` with `new_settings`\r\n# `<<` operator has the same effect as `_update_with` method\r\n# `settings._update_with(new_settings)`\r\nsettings << new_settings\r\nprint(f\"{settings = }\")\r\n\r\n# The 2 settings are equal\r\nprint(settings == new_settings)\r\n```\r\n</details>\r\n\r\n<details><summary>Output</summary>\r\n\r\n```\r\nsettings = {'name': 'settings', 'value': 100}\r\nnew_settings = {'name': 'new_settings', 'value': 200}\r\nsettings = {'name': 'new_settings', 'value': 200}\r\nTrue\r\n```\r\n</details>\r\n\r\n### Dictionary settings\r\n\r\n<details><summary>Code</summary>\r\n\r\n```python\r\nimport smartsettings as ss\r\n\r\n# Dictionary settings\r\nsettings = dict(name=\"settings\", first_value=100)\r\nsettings[\"second_value\"] = 3.14\r\nsettings[\"third_value\"] = True\r\n# Dictionary subsettings\r\nsettings[\"fourth_value\"] = dict(name=\"subsettings\", value=200)\r\nprint(f\"{settings = }\")\r\n\r\n# Serialize settings to json string\r\n# The `indent` keyword argument is passed to `jsonpickle.encode`\r\nsettings_string = ss.to_string(settings, indent=2)\r\nprint(\"settings_string =\", settings_string)\r\n\r\n# Deserialize settings from json string\r\nloaded_settings = ss.from_string(settings_string)\r\nprint(f\"{loaded_settings = }\")\r\n\r\n# The 2 settings are equal\r\nprint(loaded_settings == settings)\r\n```\r\n</details>\r\n\r\n<details><summary>Output</summary>\r\n\r\n```\r\nsettings = {'name': 'settings', 'first_value': 100, 'second_value': 3.14, 'third_value': True, 'fourth_value': {'name': 'subsettings', 'value': 200}}\r\nsettings_string = {\r\n \"name\": \"settings\",\r\n \"first_value\": 100,\r\n \"second_value\": 3.14,\r\n \"third_value\": true,\r\n \"fourth_value\": {\r\n \"name\": \"subsettings\",\r\n \"value\": 200\r\n }\r\n}\r\nloaded_settings = {'name': 'settings', 'first_value': 100, 'second_value': 3.14, 'third_value': True, 'fourth_value': {'name': 'subsettings', 'value': 200}}\r\nTrue\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Quan Lin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Smart Settings",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/jacklinquan/smartsettings"
},
"split_keywords": [
"json",
" settings"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b19e23ea4ca29d74f4883ec58232e26d53a229f684825db427e2a168af6a9979",
"md5": "9da41e57ed4e17a53f434744726e0e06",
"sha256": "05de892b045302ffc669c658ec50477004e54c2ff99221b4ce1a4e986bf2c174"
},
"downloads": -1,
"filename": "smartsettings-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9da41e57ed4e17a53f434744726e0e06",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7358,
"upload_time": "2024-07-04T03:05:16",
"upload_time_iso_8601": "2024-07-04T03:05:16.037454Z",
"url": "https://files.pythonhosted.org/packages/b1/9e/23ea4ca29d74f4883ec58232e26d53a229f684825db427e2a168af6a9979/smartsettings-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3b7e4fc152d0f8d0e19fd77e7e15def44c88321764df49e43ac96f98b8cbc8b7",
"md5": "9b2ea8803892fc1994a4be52c0ff2eea",
"sha256": "db26ed3f3493b182eeb82d25487b3d94c4d3f992b4aa455b567f1d1d7a93e032"
},
"downloads": -1,
"filename": "smartsettings-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "9b2ea8803892fc1994a4be52c0ff2eea",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 9362,
"upload_time": "2024-07-04T03:05:17",
"upload_time_iso_8601": "2024-07-04T03:05:17.700351Z",
"url": "https://files.pythonhosted.org/packages/3b/7e/4fc152d0f8d0e19fd77e7e15def44c88321764df49e43ac96f98b8cbc8b7/smartsettings-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-04 03:05:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jacklinquan",
"github_project": "smartsettings",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "smartsettings"
}