{"id":27111898,"url":"https://github.com/programming-sai/fprintx","last_synced_at":"2025-04-09T22:04:52.126Z","repository":{"id":286461826,"uuid":"961437786","full_name":"Programming-Sai/fprintx","owner":"Programming-Sai","description":"fprintx is a minimal Python utility for clean, aligned debug printing — especially useful in coding contests or complex loops where output readability matters.","archived":false,"fork":false,"pushed_at":"2025-04-06T21:46:12.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T22:04:51.980Z","etag":null,"topics":["console","debug","f-strings","formatting","fprintx-","opensource","print","pypi","python","styling","tabular","utility-"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Programming-Sai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-06T14:21:32.000Z","updated_at":"2025-04-06T21:46:15.000Z","dependencies_parsed_at":"2025-04-06T16:47:45.212Z","dependency_job_id":"eacbb233-8687-427a-9a3b-a2e023f4e403","html_url":"https://github.com/Programming-Sai/fprintx","commit_stats":null,"previous_names":["programming-sai/fprintx"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Programming-Sai%2Ffprintx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Programming-Sai%2Ffprintx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Programming-Sai%2Ffprintx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Programming-Sai%2Ffprintx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Programming-Sai","download_url":"https://codeload.github.com/Programming-Sai/fprintx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119296,"owners_count":21050755,"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":["console","debug","f-strings","formatting","fprintx-","opensource","print","pypi","python","styling","tabular","utility-"],"created_at":"2025-04-07T01:25:12.024Z","updated_at":"2025-04-09T22:04:52.108Z","avatar_url":"https://github.com/Programming-Sai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fprintx\n\n**fprintx** is a minimal Python utility for clean, aligned debug printing — especially useful in coding contests or complex loops where output readability matters.\n\n---\n\n## Why fprintx?\n\nWhen debugging in competitive programming or trying to inspect multiple values in a loop, messy spacing can make it hard to quickly see what’s happening. You might print values like this:\n\n```python\nfor i in range(3):\n    print(i, i * 10, i ** 2)\n```\n\nAnd get:\n\n```\n0 0 0\n1 10 1\n2 20 4\n```\n\nThat’s fine… until the values start getting uneven:\n\n```\n10 100 100\n100 1000 10000\n```\n\nThat’s where **fprintx** helps — it aligns and formats each value clearly, so you can visually track changes without squinting.\n\n---\n\n## Features\n\n- Align multiple values (left, center, right)\n- Set custom widths for better visual layout\n- Apply styles like bold, italic, or underline (optional)\n- Optional truncation of long strings\n- Return as string if you don’t want to print immediately\n\n---\n\n## Quick Example\n\n```python\nfrom fprintx import printx\n\nfor i in range(3):\n    printx(\"i:\", i, \"i*10:\", i*10, \"i^2:\", i**2, widths=[3, 4, 6, 5, 4])\n```\n\nSample output:\n\n```\ni:  0    i*10:    0   i^2:  0\ni:  1    i*10:   10   i^2:  1\ni:  2    i*10:   20   i^2:  4\n```\n\n---\n\n## Installation\n\nTo install fprintx directly via pip, simply run:\n\n```bash\npip install git+https://github.com/Programming-Sai/fprintx.git\n```\n\nIf you'd like to test, contribute, or run it locally, you can also clone the repository:\n\n```bash\ngit clone https://github.com/Programming-Sai/fprintx.git\n\ncd fprintx\n```\n\n---\n\n## Options\n\n| Parameter       | Description                                    |\n| --------------- | ---------------------------------------------- |\n| `widths`        | List of widths per value                       |\n| `alignments`    | List of alignments (`\u003c`, `\u003e`, `^`)             |\n| `styles`        | List of styles (`bold`, `italic`, `underline`) |\n| `truncate`      | Truncate values that overflow width            |\n| `return_as_str` | Return the result instead of printing          |\n\n---\n\n## Testing\n\n```bash\npython -m unittest discover -s tests\n```\n\n---\n\n## Project Structure\n\n```ftt\n./fprintx/*\n        ├─ fprintx/*\n        |       ├─ core.py\n        |       └─ __init__.py\n        ├─ tests/*\n        |       └─ test_fprintx.py\n        ├─ .fttignore\n        ├─ .gitignore\n        ├─ LICENSE\n        ├─ README.md\n        └─ setup.py\n```\n\n---\n\n## Contributing\n\nContributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/Programming-Sai/fprintx/issues) for any ideas or to report bugs.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogramming-sai%2Ffprintx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogramming-sai%2Ffprintx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogramming-sai%2Ffprintx/lists"}