{"id":15043919,"url":"https://github.com/joeyism/py-nprint","last_synced_at":"2026-01-07T00:07:07.756Z","repository":{"id":57447021,"uuid":"114510278","full_name":"joeyism/py-nprint","owner":"joeyism","description":"A lightweight nested printing, for all your function within loops within function needs","archived":false,"fork":false,"pushed_at":"2017-12-17T05:08:35.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T19:45:23.598Z","etag":null,"topics":["debug","function","indent","loop","loops","nest","nested","nprint","print","python","tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeyism.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-17T04:50:34.000Z","updated_at":"2017-12-17T05:07:53.000Z","dependencies_parsed_at":"2022-08-30T01:00:33.239Z","dependency_job_id":null,"html_url":"https://github.com/joeyism/py-nprint","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-nprint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-nprint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-nprint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-nprint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeyism","download_url":"https://codeload.github.com/joeyism/py-nprint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245878929,"owners_count":20687297,"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":["debug","function","indent","loop","loops","nest","nested","nprint","print","python","tool"],"created_at":"2024-09-24T20:49:49.536Z","updated_at":"2026-01-07T00:07:07.730Z","avatar_url":"https://github.com/joeyism.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nested Print\nA lightweight nested printing, for all your function within loops within function needs\n\n## Installation\nYou can install using pip with\n\n```bash\npip3 install --user nprint\n```\n\n## Usage\nThis functions like an extension to the python print API, so you can use `end` and `sep` and everything else listed in the [print API](https://docs.python.org/3/library/functions.html#print). Only additional fields are added:\n\n* level\n* nest\n\n### Basic Example\n\n```python\nfrom nprint import nprint\n\nnprint(\"hi\", \"there\", level=2)              # prints \\t\\t hi there\nnprint(\"hi\", \"there\", level=1, nest=\"--\")   # prints -- hi there\n```\n\n### Motivation Example\n\n```python\nfrom nprint import nprint\n\nnprint(\"here\")\nfor i in range(10):\n    nprint(i, level=1)\n    for j in range(3):\n        nprint(j, level=2)\n```\n\nwhich prints\n\n```bash\nhere\n    0\n        0\n        1\n        2\n    1\n        0\n        1\n        2\n...\n```\nso it becomes easier for me to debug\n\n### API\n\n#### level\nThis describes how many \"nest\" or \"indentations\" to add. Setting `level=0` is the same as using print. `level=1` indents the output once, such that a `\\t` is added in front when printing.\n\n#### nest\nBy default, nest is set to `\\t`. This value can be set if you want to modify the indentation. For example, instead of using `\\t`, you can set `nest=\"  \"` to just add 2 spaces as the indentation. Or set `nest=\"--\"` to set two dashes for every indentation.\n\n## Versions\n**1.0.x**\n* Original publish and its fixes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeyism%2Fpy-nprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeyism%2Fpy-nprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeyism%2Fpy-nprint/lists"}