{ "info": { "author": "Daniel Paz Avalos", "author_email": "me@dpazavalos.dev", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Itermark\nExtension for iterable data types; adds boundwise bookmark iteration, enabling active item\ntracking/setting (type allowing)\n\nIdeal for 'paging' through iterables\n\n## Installation\n```\npip install itermark\n```\n\n## Using Itermark\n ```python\n>>> from itermark import Itermark\n>>> iterlist = Itermark(['zero', 'one', 'two', 'three'])\n>>> iterlist.active\n'zero'\n>>> iterlist.mark += 2\n>>> iterlist.active\n'two'\n>>> iterlist.mark = 5 # Would put mark outside active index\n>>> iterlist.active\n'three' # Defaults to highest upper bound\n>>> iterlist.active = 'new three'\n>>> iterlist.active\n'new three'\n```\nThe Itermark extension adds two properties (three for dicts), and two functions to it's objects.\nNote that all itermark attributes are disabled if underlying iterable is empty \n\n##### `mark` \nActs as a bookmark index, and can be assigned a value directly (`iterlist.mark = 2`) or by operator assignment\n(`iterlist.mark += 1`, `iterlist.mark -= 1`)\n\n##### `active` \nRetrieves nth item from iterable where self.mark = n. Dictionary Itermarks return nth value \n\n##### `activekey` \nDict specific, retrieves nth key from dictonary type where self.mark = n. \nNote that itermark was made post 3.6's insertion ordered dicts. While itermark properties still work\npre 3.6, collections.OrderedDict is recommended and supported\n\n##### `markend()`\nSet mark to end value. Mark will never go above upper bound, but without calling len() user may not\nknow what that upper bound is. Use .markend() to reliably set mark to upper bound\n\n## Supported types\n\n##### `list`\nOriginal implementation, full mark and active usage\n\n##### `tuple\nNo active assignment\n`\n##### `dict`\nUses iterator gen for mark and active properties. `active` calls and sets values, \n`activekey` calls immutable keys\n\n##### `OrderedDict`\nSame features as a regular dict, but for pre 3.6 implementation\n\n##### `string`\nSure, strings are just a list of characters\n\n##### `set`\nLook, I don't know who'd want bookmark iteration through a set but here ya go\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dpazavalos/Itermark", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "itermark", "package_url": "https://pypi.org/project/itermark/", "platform": "", "project_url": "https://pypi.org/project/itermark/", "project_urls": { "Homepage": "https://github.com/dpazavalos/Itermark" }, "release_url": "https://pypi.org/project/itermark/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "Extension for iterable data types; adds boundwise bookmark iteration, enabling active item tracking/setting (type allowing)", "version": "0.1.0" }, "last_serial": 5124788, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f5b40bd1502911bc324ee04fb2ba542b", "sha256": "fd02f14613462fd7eef52eaff3bd3e018e1b8013cfe9d7269cfb12bdaafe112c" }, "downloads": -1, "filename": "itermark-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f5b40bd1502911bc324ee04fb2ba542b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8310, "upload_time": "2019-04-10T15:53:35", "url": "https://files.pythonhosted.org/packages/1c/00/7d91059bfd1d3f90a9eeece126b3823c096b6e5c2ae1432ca4fcd2977de8/itermark-0.1.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f5b40bd1502911bc324ee04fb2ba542b", "sha256": "fd02f14613462fd7eef52eaff3bd3e018e1b8013cfe9d7269cfb12bdaafe112c" }, "downloads": -1, "filename": "itermark-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f5b40bd1502911bc324ee04fb2ba542b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8310, "upload_time": "2019-04-10T15:53:35", "url": "https://files.pythonhosted.org/packages/1c/00/7d91059bfd1d3f90a9eeece126b3823c096b6e5c2ae1432ca4fcd2977de8/itermark-0.1.0-py3-none-any.whl" } ] }