SimpleItem
Python SimpleItem Library.
Installing
Install and update using pip3:
$ pip3 install simpleitem
Python 3 and newer.
SimpleItem Example
Easy to define and use features.
>> from simpleitem import SimpleItem
>> item1 = SimpleItem()
>> item1.node1 = 1
>> item1['node2']node3 = 3
>> item1['node1']
1
>> item1.node2.node3
3
>> item1['node2'].node3
3
>> item1.node2['node3']
3
>> item1['node2']['node3']
3
Other Usage Examples
>> item2 = SimpleItem()
>> item2['node1'] = 1
>> item2['node2']['node3'] = 3
>> item3 = SimpleItem(node1=1, node2={'node3': 3})
>> item4 = SimpleItem(**{'node1': 1, 'node2': {'node3': 3}})
>> item5 = SimpleItem()
>> item5(node1=1, node2={'node3': 3})
>> item6 = SimpleItem()
>> item6(**{'node1': 1, 'node2': {'node3': 3}})
path; test.yaml
- settings:
username: admin
host: 0.0.0.0
>> item = SimpleItem()
>> item.from_yaml(path)
>> item.setting.username
admin
>> setting = item.setting
>> setting.host
0.0.0.0
MemoryStorage Example
MemoryStorage designed as singleton pattern, define somewhere use everywhere.
>> from simpleitem import MemoryStorage
>> storage = MemoryStorage()
>> settings = storage.settings
>> settings.sleep = 1
>> settings.sleep
1
>> settings(debug=True)
>> storage.settings.debug
True
Support
Python 3.x
Supports all operating systems
Links
License: MIT License
Metadata
Release files for simpleitem 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simpleitem-0.0.2.tar.gz | 3.4 kB | Without provenance | Details for simpleitem-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simpleitem-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for simpleitem-0.0.2-py3-none-any.whl |
Total release size: 7.1 kB
Release files / simpleitem-0.0.2.tar.gz
| Download URL | simpleitem-0.0.2.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8d0f3a92109dfecf448070499025bb67e7071c9a925575194fbb0a54a63d013
|
|
BLAKE2b-256 checksum How to use checksums |
a2ac804a6b86802ac33acf8e4057730689ea091f9296451ad91e36c5440aca3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10
|
Release files / simpleitem-0.0.2-py3-none-any.whl
| Download URL | simpleitem-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab793e63a8d1fea97c10c44dc25d5ab03b65d0a3978828fdab0497186c5bd643
|
|
BLAKE2b-256 checksum How to use checksums |
2e033f5712483a3ca4ae4ac04b00845e90b1c2e2f3496abfdc48a206a43ff0cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10
|
Security for simpleitem 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.