{"id":41419122,"url":"https://github.com/poupeaua/otary","last_synced_at":"2026-01-23T14:00:02.982Z","repository":{"id":303883613,"uuid":"1016661479","full_name":"poupeaua/otary","owner":"poupeaua","description":"Otary — elegant, readable, and powerful image and 2D geometry Python library.","archived":false,"fork":false,"pushed_at":"2026-01-16T15:09:32.000Z","size":2270,"stargazers_count":56,"open_issues_count":28,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-17T04:47:22.675Z","etag":null,"topics":["2d","geometric","geometric-algorithms","geometry","geometry-processing","image","image-analysis","image-manipulation","image-processing","open-source"],"latest_commit_sha":null,"homepage":"https://alexandrepoupeau.com/otary/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poupeaua.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-09T10:38:47.000Z","updated_at":"2025-12-20T09:36:24.000Z","dependencies_parsed_at":"2025-11-27T17:10:42.194Z","dependency_job_id":null,"html_url":"https://github.com/poupeaua/otary","commit_stats":null,"previous_names":["poupeaua/otary"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/poupeaua/otary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poupeaua%2Fotary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poupeaua%2Fotary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poupeaua%2Fotary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poupeaua%2Fotary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poupeaua","download_url":"https://codeload.github.com/poupeaua/otary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poupeaua%2Fotary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28693434,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T11:01:27.039Z","status":"ssl_error","status_checked_at":"2026-01-23T11:00:26.909Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["2d","geometric","geometric-algorithms","geometry","geometry-processing","image","image-analysis","image-manipulation","image-processing","open-source"],"created_at":"2026-01-23T14:00:01.258Z","updated_at":"2026-01-23T14:00:02.966Z","avatar_url":"https://github.com/poupeaua.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"\"\u003e\n    \u003cimg src=\"https://github.com/poupeaua/otary/raw/master/docs/img/logo-withname-bg-transparent.png\" alt=\"Otary\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cem\u003eOtary library, shape your images, image your shapes.\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://alexandrepoupeau.com/otary/\" \u003e \u003cimg src=\"docs/img/badge-enjoy-otary-gradient.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/poupeaua/otary/actions/workflows/test.yaml\" \u003e \u003cimg src=\"https://github.com/poupeaua/otary/actions/workflows/test.yaml/badge.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/github/poupeaua/otary\" \u003e \u003cimg src=\"https://codecov.io/github/poupeaua/otary/graph/badge.svg?token=LE040UGFZU\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://app.codacy.com/gh/poupeaua/otary/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade\" \u003e \u003cimg src=\"https://app.codacy.com/project/badge/Grade/704a873ee08c40318423a47ec71b9bf4\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://alexandrepoupeau.com/otary/\" \u003e \u003cimg src=\"https://github.com/poupeaua/otary/actions/workflows/docs.yaml/badge.svg?branch=master\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/otary\" target=\"_blank\"\u003e \u003cimg src=\"https://img.shields.io/pypi/v/otary?color=blue\u0026label=pypi\" alt=\"Package version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/otary\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/otary?color=blue\u0026label=python\" alt=\"License\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/poupeaua/otary/blob/master/LICENSE\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/github/license/poupeaua/otary?color=8A2BE2\" alt=\"License\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Welcome to Otary\n\nOtary — elegant, readable, and powerful image and 2D geometry Python library.\n\n## Features\n\nThe main features of Otary are:\n\n- **Unification**: Otary offers a cohesive solution for image and geometry manipulation, letting you work seamlessly without switching tools.\n\n- **Readability**: Self-explanatory by design. Otary’s clean, readable code eliminates the need for comments, making it easy for beginners to learn and for experts to build efficiently.\n\n- **Performance**: optimized for speed and efficiency, making it suitable for high-performance applications. It is built on top of [NumPy](https://numpy.org) and [OpenCV](https://opencv.org), which are known for their speed and performance.\n\n- **Interactivity**: designed to be Interactive and user-friendly, ideal for [Jupyter notebooks](https://jupyter.org) and live exploration.\n\n- **Flexibility**: provides a flexible and extensible architecture, allowing developers to customize and extend its functionality as needed.\n\n## Installation\n\nOtary is available on [PyPI](https://pypi.org/project/otary/). You can install it with:\n\n```bash\npip install otary\n```\n\n## Example\n\nLet me illustrate the usage of Otary with a simple example. Imagine you need to:\n\n1. read an image from a pdf file\n2. draw an rectangle on it, shift and rotate the rectangle\n3. crop a part of the image\n4. rotate the cropped image\n5. apply a threshold\n6. show the image\n\nIn order to compare the use of Otary versus other libraries, I will use the same example but with different libraries. Try it yourself on your favorite LLM (like [ChatGPT](https://chatgpt.com/)) by copying the query:\n\n```text\nGenerate a python code to read an image from a pdf, draw a rectangle on it, shift and rotate the rectangle, crop a part of the image, rotate the cropped image, apply a threshold on the image.\n```\n\nUsing Otary you can do it with few lines of code:\n\n```python\nimport otary as ot\n\nim = ot.Image.from_pdf(\"path/to/you/file.pdf\", page_nb=0)\n\nrectangle = ot.Rectangle([[1, 1], [4, 1], [4, 4], [1, 4]]) * 100\nrectangle.shift([50, 50]).rotate(angle=30, is_degree=True)\n\nim = (\n    im.draw_polygons([rectangle])\n    .crop(x0=50, y0=50, x1=450, y1=450)\n    .rotate(angle=90, is_degree=True)\n    .threshold_simple(thresh=200)\n)\n\nim.show()\n```\n\nUsing Otary makes the code:\n\n- Much more **readable** and hence **maintainable**\n- Much more **interactive**\n- Much simpler, simplifying **libraries management** by only using one library and not manipulating multiple libraries like Pillow, OpenCV, Scikit-Image, PyMuPDF etc.\n\n## Enhanced Interactivity\n\nIn a Jupyter notebook, you can easily test and iterate on transformations by simply commenting part of the code as you need it.\n\n```python\nim = (\n    im.draw_polygons([rectangle])\n    # .crop(x0=50, y0=50, x1=450, y1=450)\n    # .rotate(angle=90, is_degree=True)\n    .threshold_simple(thresh=200)\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoupeaua%2Fotary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoupeaua%2Fotary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoupeaua%2Fotary/lists"}