Package: crumbly
CrumblyIntroductionCrumbly Libraryis a Python library designed to provide a versatile and user-friendly way of storing and managing multiple variables within a single object. This library offers theCrumbclass, which acts as a container for various key-value pairs, akin to a dictionary. The library aims to simplify the management of data and provide easy-to-use methods for manipulation, conversion, and serialization.Oh yeah also this was the first name that came to mind, and itkinda.... sucks. Can't think of a better one thoFeaturesFlexible Storage:Crumbobjects allow you to store multiple variables using key-value pairs, similar to a dictionary, providing a convenient way to organize related data.Easy Access: With intuitive methods such as__getattr__, accessing values stored in aCrumbis seamless, reducing the need for verbose code.Dynamic Attributes: Accessing attributes of aCrumbobject is done by simply using attribute notation, making the code more readable and concise.Dynamic Modification: The library provides methods for adding, modifying, and deleting key-value pairs within theCrumbobject, allowing for dynamic data manipulation.Serialization:Crumbobjects can be converted into JSON format using themakeJSONmethod, and vice versa using thecrumbFromJSONclass method, facilitating data serialization and deserialization.Convenience Methods: The library includes various convenient methods for retrieving keys, values, items, copying, checking for key existence, and more.InstallationTo use theCrumbly Library, you can download it off of PyPI usingpip install crumblyOr,Stable releaseDownload the provided ZIP file in the Releases page (crumbly_vXXXX_XX_XX.zip) and include thecrumbly.pyfile from inside the ZIP in your project directory. Then, simply import theCrumbclass into your Python code.Unstable releaseDownloadcrumbly.pyfrom the Code section of this page, and include it in your project directory. Then, simply import theCrumbclass into your Python code.ImportingfromcrumblyimportCrumbUsageCreating aCrumbObjectTo create aCrumbobject, you can initialize it with key-value pairs as arguments:my_crumb=Crumb(name="Alice",age=30,city="Wonderland")Accessing ValuesValues stored in aCrumbobject can be accessed using attribute notation:print(my_crumb.name)# Output: Aliceprint(my_crumb.age)# Output: 30Modifying and Deleting ValuesYou can modify existing values or add new key-value pairs using theaddDatamethod:my_crumb.addData("job","Adventurer")my_crumb.age=31To delete a key-value pair:delmy_crumb.citySerializationYou can convert aCrumbobject into a JSON string using themakeJSONmethod:json_data=my_crumb.makeJSON()And deserialize a JSON string back into aCrumbobject using thecrumbFromJSONclass method:restored_crumb=Crumb.crumbFromJSON(json_data)Other Useful Methodslen(my_crumb): Get the number of key-value pairs in theCrumbobject.my_crumb.keys(): Get a list of keys in theCrumbobject.my_crumb.values(): Get a list of values in theCrumbobject.my_crumb.items(): Get a list of key-value tuples in theCrumbobject.my_crumb.copy(): Create a copy of theCrumbobject.my_crumb.has_key("name"): Check if a key exists in theCrumbobject.my_crumb.clear(): Remove all key-value pairs from theCrumbobject.ContributionsContributions to theCrumbly Libraryare welcome! If you find any issues or have suggestions for improvements, feel free to submit a pull request or open an issue on theGitHub repository.LicenseThis library is provided under the MIT License. See theLICENSEfile for more details.Disclaimer:The "Crumbly Library" is intended for educational and experimental purposes and might not be suitable for production use. Use it at your own discretion....No,YOUused ChatGPT to make this readmeI did change the installation part from the generated version quite a bit though