# pymore
`pymore` is a collection of useful utilities for Python.

[](https://badge.fury.io/py/pymore)
This includes
* EqualsTester: a helper for testing the equality contract in Python (originally developed
for [Cirq](https://github.com/quantumlib/cirq))
```python
import pymore
tester = pymore.EqualsTester()
# This tests that the added elements all satisfy the equals contract
# between themselves.
tester.add_equality_group(MyObject("a"), MyObject("a"))
# Each new addition of an equality group also tests that the elements
# in this new group are not equal to those in the previously added group.
# So, for example, this would raise an `AssertionError` if it was
# true that `MyObject("a")` was equal to `MyObject("b")`.
tester.add_equality_group(MyObject("b"), MyObject("b"))
```
* first: Return the first element that matches a predicate, or a default.
```python
import pymore
is_even = lambda x: x % 2 == 0
# Returns the first element that is even.
first = pymore.first([1, 3, 6, 7], is_even)
assert first == 6
```
# License
This package is licensed under an Apache 2.0 license. This code is derived from work in
other frameworks. See [LICENSE](https://github.com/dabacon/pymore/blob/main/LICENSE)
and [NOTICES](https://github.com/dabacon/pymore/blob/main/NOTICES) for details.
Raw data
{
"_id": null,
"home_page": "http://github.com/dabacon/pymore",
"name": "pymore",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9.0",
"maintainer_email": null,
"keywords": "python, testing, iterators",
"author": "The pymore Developers",
"author_email": "dabacon@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/de/7f/228d379452ff94ce3ecc1880e595008e633387d4e9847c07c6ebe8dd145a/pymore-0.1.5.tar.gz",
"platform": null,
"description": "# pymore\n\n`pymore` is a collection of useful utilities for Python.\n\n\n[](https://badge.fury.io/py/pymore)\n\nThis includes\n\n* EqualsTester: a helper for testing the equality contract in Python (originally developed\nfor [Cirq](https://github.com/quantumlib/cirq))\n\n```python\nimport pymore\n\ntester = pymore.EqualsTester()\n\n# This tests that the added elements all satisfy the equals contract\n# between themselves.\ntester.add_equality_group(MyObject(\"a\"), MyObject(\"a\"))\n\n# Each new addition of an equality group also tests that the elements\n# in this new group are not equal to those in the previously added group.\n# So, for example, this would raise an `AssertionError` if it was\n# true that `MyObject(\"a\")` was equal to `MyObject(\"b\")`.\ntester.add_equality_group(MyObject(\"b\"), MyObject(\"b\"))\n```\n\n* first: Return the first element that matches a predicate, or a default.\n\n```python\nimport pymore\n\nis_even = lambda x: x % 2 == 0\n# Returns the first element that is even.\nfirst = pymore.first([1, 3, 6, 7], is_even)\nassert first == 6\n```\n\n# License\n\nThis package is licensed under an Apache 2.0 license. This code is derived from work in\nother frameworks. See [LICENSE](https://github.com/dabacon/pymore/blob/main/LICENSE)\nand [NOTICES](https://github.com/dabacon/pymore/blob/main/NOTICES) for details.\n",
"bugtrack_url": null,
"license": "Apache 2",
"summary": "Mo python, less problems. Helpful python utilities.",
"version": "0.1.5",
"project_urls": {
"Homepage": "http://github.com/dabacon/pymore"
},
"split_keywords": [
"python",
" testing",
" iterators"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a9a30e88676a834d2d145f237f34048104a2ae3a1f32fbecb55122524a282abb",
"md5": "7426bf415f9370ac19b922b6d605cc3b",
"sha256": "81d492d4d8af14c7df9974a620e09a40861d30541039dd0fcb3ee6805a88b0ab"
},
"downloads": -1,
"filename": "pymore-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7426bf415f9370ac19b922b6d605cc3b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9.0",
"size": 13233,
"upload_time": "2025-08-20T20:38:25",
"upload_time_iso_8601": "2025-08-20T20:38:25.369136Z",
"url": "https://files.pythonhosted.org/packages/a9/a3/0e88676a834d2d145f237f34048104a2ae3a1f32fbecb55122524a282abb/pymore-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "de7f228d379452ff94ce3ecc1880e595008e633387d4e9847c07c6ebe8dd145a",
"md5": "333435846ed0249b2100b2f5d240a95c",
"sha256": "39b99376c62f2ca02f5f6600d69f0f3d3f2103101514ef711fccfabcdb64a1a5"
},
"downloads": -1,
"filename": "pymore-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "333435846ed0249b2100b2f5d240a95c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9.0",
"size": 12275,
"upload_time": "2025-08-20T20:38:26",
"upload_time_iso_8601": "2025-08-20T20:38:26.272068Z",
"url": "https://files.pythonhosted.org/packages/de/7f/228d379452ff94ce3ecc1880e595008e633387d4e9847c07c6ebe8dd145a/pymore-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-20 20:38:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dabacon",
"github_project": "pymore",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "pymore"
}