{"id":21082193,"url":"https://github.com/olsonpm/py_all-purpose-set","last_synced_at":"2025-03-14T04:43:00.613Z","repository":{"id":57409833,"uuid":"166751042","full_name":"olsonpm/py_all-purpose-set","owner":"olsonpm","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-19T20:19:28.000Z","size":175,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2025-02-22T23:17:20.784Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olsonpm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-21T05:01:53.000Z","updated_at":"2019-05-19T20:19:30.000Z","dependencies_parsed_at":"2022-08-24T20:00:15.338Z","dependency_job_id":null,"html_url":"https://github.com/olsonpm/py_all-purpose-set","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Fpy_all-purpose-set","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Fpy_all-purpose-set/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Fpy_all-purpose-set/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Fpy_all-purpose-set/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olsonpm","download_url":"https://codeload.github.com/olsonpm/py_all-purpose-set/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243526853,"owners_count":20305112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T20:13:06.249Z","updated_at":"2025-03-14T04:43:00.593Z","avatar_url":"https://github.com/olsonpm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# All Purpose Set\n\n\u003c!-- pypiwarn --\u003e\n\n\u003cbr\u003e\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**\n\n- [What is it?](#what-is-it)\n- [Why create it?](#why-create-it)\n- [Simple usage](#simple-usage)\n- [See also](#see-also)\n- [Api](#api)\n- [Test](#test)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n\u003cbr\u003e\n\n### What is it?\n\n- A set which doesn't require hashable contents\n\n\u003cbr\u003e\n\n### Why create it?\n\n- I often have a need to store non-hashable contents in a set.  For example\n  storing a dict isn't possible with the builtin set.\n\n  ```py\n  # doesn't work\n  someDict = { \"key\": \"value\" }\n  someSet = { someDict }\n  ```\n\n\u003cbr\u003e\n\n### Simple usage\n\n```py\nfrom all_purpose_set import ApSet\n\nsomeDict = { \"key\": \"value\" }\nsomeSet = ApSet([someDict])\n\nprint(someDict in someSet) # prints True\n```\n\n\u003cbr\u003e\n\n### See also\n\n- [All Purpose Dict](https://github.com/olsonpm/py_all-purpose-dict)\n\n\u003cbr\u003e\n\n### Api\n\n*Note: This api is young and subject to change quite a bit.  There also may be\nfunctionality present in the builtin set which this set doesn't cover.  I'm\nwilling to add it so please just raise a github issue or PR with details.*\n\n#### class ApSet([a list])\n- all methods return `self` unless specified otherwise\n- iterates in the order of insertion\n- currently the internal methods implemented are\n  - \\_\\_contains\\_\\_\n  - \\_\\_iter\\_\\_\n  - \\_\\_len\\_\\_\n\n##### add(something)\n\n##### clear()\n\n##### has(something) =\u003e bool\n- a function alternative to `key in aSet`\n\n##### remove(something)\n- raises a `KeyError` if the element doesn't exist\n\n\u003cbr\u003e\n\n### Test\n\n```sh\n#\n# you must have poetry installed\n#\n$ poetry shell\n$ poetry install\n$ python runTests.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folsonpm%2Fpy_all-purpose-set","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folsonpm%2Fpy_all-purpose-set","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folsonpm%2Fpy_all-purpose-set/lists"}