strictdataclass


Namestrictdataclass JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryAuto type cast dataclasses to suggested types.
upload_time2024-03-07 04:10:19
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT License Copyright (c) 2024 Braden Douglas Toone 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 cast dataclass inherit strict type
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # strictdataclass

Sections:

- [Purpose](#purpose)
- [Contents](#contents)
- [Installation](#installation)
- [Usage](#usage)
    - [Declaration](#declaration)
- [Issues/Limitations](#issueslimitations)
- [Author](#author)
- [License](#license)

## Purpose

This package contains the necessary base class structure for strict,
auto-casting dataclasses for use in an inheritence architecture.
The inheritable base class has custom double-underscore (dunder),
convenience, and property methods.

## Contents

This package contains two modules written in pure Python (3.7 or newer)
with the following code blocks accessible from the root module:

- `StrictDataclass`: Inheritable base class for automatic type casting 
on instantiation
- `ObjectTypeNotCastableError`: Error raised when type casting fails

## Installation

This package is distributed to PyPi, and can be installed with either
of the following commands:

- `pip install strictdataclass`
- `pip3 install strictdataclass`

## Usage

Inherit the base class `StrictDataclass` in a dataclass-decorated 
class definition to inherit the type casting properties.

### Declaration

    @dataclass
    class Foo(StrictDataclass):
        bar: bool
        foo: int = 5

## Issues/Limitations

Although there are currently no known cast failing cases or 
performance issues, this package is in its infancy and has been marked
as:

***Beta***

## Author

Braden Toone is the sole author and maintainer of this code, and can
be contacted via email at braden@toonetown.com

## License

This package is licensed under the OSI Approved MIT License for free
commercial and personal use as stated in the LICENSE file.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "strictdataclass",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "Braden Toone <braden@toonetown.com>",
    "keywords": "cast,dataclass,inherit,strict,type",
    "author": "",
    "author_email": "Braden Toone <braden@toonetown.com>",
    "download_url": "https://files.pythonhosted.org/packages/9f/cb/2d2188b05a7813518280cc1b9a80e8fc10dfbe1a123892a6f4e9d7f86e59/strictdataclass-0.1.0.tar.gz",
    "platform": null,
    "description": "# strictdataclass\n\nSections:\n\n- [Purpose](#purpose)\n- [Contents](#contents)\n- [Installation](#installation)\n- [Usage](#usage)\n    - [Declaration](#declaration)\n- [Issues/Limitations](#issueslimitations)\n- [Author](#author)\n- [License](#license)\n\n## Purpose\n\nThis package contains the necessary base class structure for strict,\nauto-casting dataclasses for use in an inheritence architecture.\nThe inheritable base class has custom double-underscore (dunder),\nconvenience, and property methods.\n\n## Contents\n\nThis package contains two modules written in pure Python (3.7 or newer)\nwith the following code blocks accessible from the root module:\n\n- `StrictDataclass`: Inheritable base class for automatic type casting \non instantiation\n- `ObjectTypeNotCastableError`: Error raised when type casting fails\n\n## Installation\n\nThis package is distributed to PyPi, and can be installed with either\nof the following commands:\n\n- `pip install strictdataclass`\n- `pip3 install strictdataclass`\n\n## Usage\n\nInherit the base class `StrictDataclass` in a dataclass-decorated \nclass definition to inherit the type casting properties.\n\n### Declaration\n\n    @dataclass\n    class Foo(StrictDataclass):\n        bar: bool\n        foo: int = 5\n\n## Issues/Limitations\n\nAlthough there are currently no known cast failing cases or \nperformance issues, this package is in its infancy and has been marked\nas:\n\n***Beta***\n\n## Author\n\nBraden Toone is the sole author and maintainer of this code, and can\nbe contacted via email at braden@toonetown.com\n\n## License\n\nThis package is licensed under the OSI Approved MIT License for free\ncommercial and personal use as stated in the LICENSE file.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Braden Douglas Toone  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": "Auto type cast dataclasses to suggested types.",
    "version": "0.1.0",
    "project_urls": {
        "Changelog": "https://github.com/Braden2n/StrictDataclass/activity",
        "Documentation": "https://github.com/Braden2n/StrictDataclass",
        "Homepage": "https://github.com/Braden2n/StrictDataclass",
        "Issues": "https://github.com/Braden2n/StrictDataclass/issues",
        "Repository": "https://github.com"
    },
    "split_keywords": [
        "cast",
        "dataclass",
        "inherit",
        "strict",
        "type"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dac26801c054ee86ff7835f414d2e11fb55c4f907283edd116050f955f0b913b",
                "md5": "f83762bf59dedf62dac01cb3c02fe6e8",
                "sha256": "732e3fa006e084cc70783b5a45ae676014d89088558d05782dab5d54ea4ba5c1"
            },
            "downloads": -1,
            "filename": "strictdataclass-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f83762bf59dedf62dac01cb3c02fe6e8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5143,
            "upload_time": "2024-03-07T04:10:18",
            "upload_time_iso_8601": "2024-03-07T04:10:18.607890Z",
            "url": "https://files.pythonhosted.org/packages/da/c2/6801c054ee86ff7835f414d2e11fb55c4f907283edd116050f955f0b913b/strictdataclass-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9fcb2d2188b05a7813518280cc1b9a80e8fc10dfbe1a123892a6f4e9d7f86e59",
                "md5": "c173510f7af31bb13632c979a85e0f44",
                "sha256": "1e7c7047e80310ec33c52c4449103bb0ab242afcb682022959fcf2f66f2f263e"
            },
            "downloads": -1,
            "filename": "strictdataclass-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c173510f7af31bb13632c979a85e0f44",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4136,
            "upload_time": "2024-03-07T04:10:19",
            "upload_time_iso_8601": "2024-03-07T04:10:19.577015Z",
            "url": "https://files.pythonhosted.org/packages/9f/cb/2d2188b05a7813518280cc1b9a80e8fc10dfbe1a123892a6f4e9d7f86e59/strictdataclass-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-07 04:10:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Braden2n",
    "github_project": "StrictDataclass",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "strictdataclass"
}
        
Elapsed time: 5.08011s