bm.pythagorean-triples


Namebm.pythagorean-triples JSON
Version 0.6.0 PyPI version JSON
download
home_pageNone
SummaryPythagorean triples
upload_time2025-07-14 18:02:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseNone
keywords math mathematics pythagorean triples
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Boring Math Library - Pythagorean triples

Package containing a class to generate Pythagorean triples along
with a CLI executable.

## Repos and Documentation

### Repositories

- [bm.pythagorean-triples][1] project on *PyPI*
- [Source code][2] on *GitHub*

### Detailed documentation

- [Detailed API documentation][3] on *GH-Pages*

## Overview

Geometrically, a *Pythagorean* triangle is a right triangle with
positive integer sides.

This project is part of the [Boring Math][4] **bm.** namespace project.

### Library modules

#### Pythagorean Triple Class

- Pythagorean Triple Class
  - Method `Pythag3.triples(a_start: int, a_max: int, max: Optional[int]) -> Iterator[int]`
    - Returns an iterator of tuples of primitive *Pythagorean* triples
  - A Pythagorean triple is a tuple in positive integers (a, b, c)
    - such that `a² + b² = c²`
    - `a, b, c` represent integer sides of a right triangle
    - a *Pythagorean* triple is primitive if gcd of `a, b, c` is `1`
  - Iterator finds all primitive Pythagorean Triples
    - where `0 < a_start <= a < b < c <= max` where `a <= a_max`
    - if `max` not given, find all theoretically possible triples with `a <= a_max`

______________________________________________________________________

### CLI Applications

- program [pythag3](#cli-program-pythag3)

These programs are implemented in an OS and package
build tool independent way via the `project.scripts` section of
`pyproject.toml`.

#### CLI program pythag3

- Generates primitive Pythagorean triples
- **Usage:** `pythag3 [m [n [max]]`
  - 3 args print all triples with `m <= a <= n` and `a < b < c <= max`
  - 2 args print all theoretically possible triples with `m <= a <= n`
  - 1 arg prints all theoretically possible triples with `a <= m`
  - 0 args print all triples with `3 <= a <= 100`

______________________________________________________________________

[1]: https://pypi.org/project/bm.pythagorean-triples/
[2]: https://github.com/grscheller/bm-pythagorean-triples/
[3]: https://grscheller.github.io/boring-math-docs/pythagorean-triples/
[4]: https://github.com/grscheller/boring-math-docs

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bm.pythagorean-triples",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "math, mathematics, pythagorean, triples",
    "author": null,
    "author_email": "\"Geoffrey R. Scheller\" <geoffrey@scheller.com>",
    "download_url": "https://files.pythonhosted.org/packages/dd/03/38bc5f20e3f706598c4aabd528260d0cd372ae9814bcae3079f17e806f35/bm_pythagorean_triples-0.6.0.tar.gz",
    "platform": null,
    "description": "# Boring Math Library - Pythagorean triples\n\nPackage containing a class to generate Pythagorean triples along\nwith a CLI executable.\n\n## Repos and Documentation\n\n### Repositories\n\n- [bm.pythagorean-triples][1] project on *PyPI*\n- [Source code][2] on *GitHub*\n\n### Detailed documentation\n\n- [Detailed API documentation][3] on *GH-Pages*\n\n## Overview\n\nGeometrically, a *Pythagorean* triangle is a right triangle with\npositive integer sides.\n\nThis project is part of the [Boring Math][4] **bm.** namespace project.\n\n### Library modules\n\n#### Pythagorean Triple Class\n\n- Pythagorean Triple Class\n  - Method `Pythag3.triples(a_start: int, a_max: int, max: Optional[int]) -> Iterator[int]`\n    - Returns an iterator of tuples of primitive *Pythagorean* triples\n  - A Pythagorean triple is a tuple in positive integers (a, b, c)\n    - such that `a\u00b2 + b\u00b2 = c\u00b2`\n    - `a, b, c` represent integer sides of a right triangle\n    - a *Pythagorean* triple is primitive if gcd of `a, b, c` is `1`\n  - Iterator finds all primitive Pythagorean Triples\n    - where `0 < a_start <= a < b < c <= max` where `a <= a_max`\n    - if `max` not given, find all theoretically possible triples with `a <= a_max`\n\n______________________________________________________________________\n\n### CLI Applications\n\n- program [pythag3](#cli-program-pythag3)\n\nThese programs are implemented in an OS and package\nbuild tool independent way via the `project.scripts` section of\n`pyproject.toml`.\n\n#### CLI program pythag3\n\n- Generates primitive Pythagorean triples\n- **Usage:** `pythag3 [m [n [max]]`\n  - 3 args print all triples with `m <= a <= n` and `a < b < c <= max`\n  - 2 args print all theoretically possible triples with `m <= a <= n`\n  - 1 arg prints all theoretically possible triples with `a <= m`\n  - 0 args print all triples with `3 <= a <= 100`\n\n______________________________________________________________________\n\n[1]: https://pypi.org/project/bm.pythagorean-triples/\n[2]: https://github.com/grscheller/bm-pythagorean-triples/\n[3]: https://grscheller.github.io/boring-math-docs/pythagorean-triples/\n[4]: https://github.com/grscheller/boring-math-docs\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Pythagorean triples",
    "version": "0.6.0",
    "project_urls": {
        "Changelog": "https://grscheller.github.io/bm-pythagorean-triples/html/changelog.html",
        "Documentation": "https://grscheller.github.io/bm-pythagorean-triples/html/",
        "Homepage": "https://github.com/grscheller/bm-docs/blob/main/README.md",
        "Source": "https://github.com/grscheller/bm-pythagorean-triples"
    },
    "split_keywords": [
        "math",
        " mathematics",
        " pythagorean",
        " triples"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a2110c579691e3d514da525499bef52775f70651d49de3831c3ef372bbd54989",
                "md5": "4e39d2264b86affda9e445b32e1a3c54",
                "sha256": "594623fce7c4f634598f40b674a88e7921c2fbe3454121941b9674d07fbd583a"
            },
            "downloads": -1,
            "filename": "bm_pythagorean_triples-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4e39d2264b86affda9e445b32e1a3c54",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 10720,
            "upload_time": "2025-07-14T18:02:03",
            "upload_time_iso_8601": "2025-07-14T18:02:03.166782Z",
            "url": "https://files.pythonhosted.org/packages/a2/11/0c579691e3d514da525499bef52775f70651d49de3831c3ef372bbd54989/bm_pythagorean_triples-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dd0338bc5f20e3f706598c4aabd528260d0cd372ae9814bcae3079f17e806f35",
                "md5": "dff3453033ec01595cabde690e750413",
                "sha256": "7f355fc2bbae9cd34d994a5b9829607f9a4badc3f03d0c71eaeb6c495dca25de"
            },
            "downloads": -1,
            "filename": "bm_pythagorean_triples-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "dff3453033ec01595cabde690e750413",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 9071,
            "upload_time": "2025-07-14T18:02:04",
            "upload_time_iso_8601": "2025-07-14T18:02:04.314777Z",
            "url": "https://files.pythonhosted.org/packages/dd/03/38bc5f20e3f706598c4aabd528260d0cd372ae9814bcae3079f17e806f35/bm_pythagorean_triples-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-14 18:02:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "grscheller",
    "github_project": "bm-docs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "bm.pythagorean-triples"
}
        
Elapsed time: 1.25606s