# netlink-core
Core components of NetLink tools
## Updates
### 0.0.4
Add `netlink.core.Mapping` Abstract class, must implement `__init__`.
This provides a small set of functionality share by my collection of tools:
- [netlink-crypt](https://pypi.org/project/netlink-crypt/)
- [netlink-logging](https://pypi.org/project/netlink-logging/)
- [netlink-sap-rfc](https://pypi.org/project/netlink-sap-rfc/)
- [netlink-sharepoint](https://pypi.org/project/netlink-sharepoint/)
## Contents
- Centralized configuration using [TOML](https://toml.io/en/)
in the users home directory (subdirectory `.netlink`).
### Classes
#### netlink.core.AttributeMapping
behaves like an immutable mapping, adding access to all items via property notation:
a['b'] == a.b
This is propagated through all levels, when parameter `deep` is `True` (default):
a['b']['c']['d'] == a.b.c.d
| Parameter | Default | |
|----------------|----------------|-----------------------------------------------------------------------------------------------|
| value | **mandatory** | Mapping containing information. Might be deep. |
| deep | `True` | Items within the mapping will be copied, not referenced (implemented for Lists and Mappings). |
| case_sensitive | `False` | If **False**, ignore case when retrieving items or attributes. |
| under | `True` | Try dash (`-`) if underscore (`_`) in name not found. |
#### netlink.core.Singleton
is a base class to be inherited from to make all instances of a class the same.
#### netlink.core.Config
is a Singleton that provides configuration information (will be initialized the first time).
### Scripts
- `create_netlink_defaults` creates a TOML file containing all currently internal defaults in the users home directory (
subdirectory `.netlink`). If the file already exist, the current file is copied as a backup with extension `.001`.
## Installation
Use your preferred tool to install from [PyPI](https://pypi.org/). I prefer [Poetry](https://python-poetry.org/).
[//]: # (## Roadmap)
[//]: # (## Contributing)
## License
MIT
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/netlink_python/netlink-core.git",
"name": "netlink-core",
"maintainer": null,
"docs_url": null,
"requires_python": "<=3.12,>=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Bernhard Radermacher",
"author_email": "bernhard.radermacher@netlink-consulting.com",
"download_url": "https://files.pythonhosted.org/packages/03/b9/08c4b0da1dee56ded927807260717216eb2c0df599b79907df771c0b8a07/netlink-core-1.1.2.tar.gz",
"platform": null,
"description": "# netlink-core\n\nCore components of NetLink tools\n\n## Updates\n\n### 0.0.4\n\nAdd `netlink.core.Mapping` Abstract class, must implement `__init__`.\n\nThis provides a small set of functionality share by my collection of tools:\n\n- [netlink-crypt](https://pypi.org/project/netlink-crypt/)\n- [netlink-logging](https://pypi.org/project/netlink-logging/)\n- [netlink-sap-rfc](https://pypi.org/project/netlink-sap-rfc/)\n- [netlink-sharepoint](https://pypi.org/project/netlink-sharepoint/)\n\n## Contents\n\n- Centralized configuration using [TOML](https://toml.io/en/)\n in the users home directory (subdirectory `.netlink`).\n\n### Classes\n\n#### netlink.core.AttributeMapping\n\nbehaves like an immutable mapping, adding access to all items via property notation:\n\n a['b'] == a.b\n\nThis is propagated through all levels, when parameter `deep` is `True` (default):\n\n a['b']['c']['d'] == a.b.c.d\n\n| Parameter | Default | |\n|----------------|----------------|-----------------------------------------------------------------------------------------------|\n| value | **mandatory** | Mapping containing information. Might be deep. |\n| deep | `True` | Items within the mapping will be copied, not referenced (implemented for Lists and Mappings). |\n| case_sensitive | `False` | If **False**, ignore case when retrieving items or attributes. |\n| under | `True` | Try dash (`-`) if underscore (`_`) in name not found. |\n\n#### netlink.core.Singleton\n\nis a base class to be inherited from to make all instances of a class the same.\n\n#### netlink.core.Config\n\nis a Singleton that provides configuration information (will be initialized the first time).\n\n### Scripts\n\n- `create_netlink_defaults` creates a TOML file containing all currently internal defaults in the users home directory (\n subdirectory `.netlink`). If the file already exist, the current file is copied as a backup with extension `.001`.\n\n## Installation\n\nUse your preferred tool to install from [PyPI](https://pypi.org/). I prefer [Poetry](https://python-poetry.org/).\n\n[//]: # (## Roadmap)\n\n[//]: # (## Contributing)\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Core components of NetLink tools",
"version": "1.1.2",
"project_urls": {
"Homepage": "https://gitlab.com/netlink_python/netlink-core.git",
"Repository": "https://gitlab.com/netlink_python/netlink-core.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "258eee8d7fd65ea8d4a3c57c8e81a35c7fc5bbefac88d83d78f4578b4db3e194",
"md5": "71cb8436302a7c019cfe56ae387c6792",
"sha256": "21c807d4e6be0eeddafc51c9172483fd74675c379602a1f7f9f83d23149738a8"
},
"downloads": -1,
"filename": "netlink_core-1.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "71cb8436302a7c019cfe56ae387c6792",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<=3.12,>=3.8",
"size": 8225,
"upload_time": "2024-05-16T06:49:55",
"upload_time_iso_8601": "2024-05-16T06:49:55.954816Z",
"url": "https://files.pythonhosted.org/packages/25/8e/ee8d7fd65ea8d4a3c57c8e81a35c7fc5bbefac88d83d78f4578b4db3e194/netlink_core-1.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "03b908c4b0da1dee56ded927807260717216eb2c0df599b79907df771c0b8a07",
"md5": "c341b99553a9588f37584ae6b8f5fa84",
"sha256": "9fd2b105165a0af98bc9e9b4ce80949389a0bcadf4f7dddd0430f94f78b4999f"
},
"downloads": -1,
"filename": "netlink-core-1.1.2.tar.gz",
"has_sig": false,
"md5_digest": "c341b99553a9588f37584ae6b8f5fa84",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<=3.12,>=3.8",
"size": 6137,
"upload_time": "2024-05-16T06:49:54",
"upload_time_iso_8601": "2024-05-16T06:49:54.857678Z",
"url": "https://files.pythonhosted.org/packages/03/b9/08c4b0da1dee56ded927807260717216eb2c0df599b79907df771c0b8a07/netlink-core-1.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-16 06:49:54",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "netlink_python",
"gitlab_project": "netlink-core",
"lcname": "netlink-core"
}