{"id":34030604,"url":"https://github.com/slyphix/quickdemo","last_synced_at":"2026-03-27T04:31:54.199Z","repository":{"id":57459406,"uuid":"169321345","full_name":"slyphix/quickdemo","owner":"slyphix","description":"Small Python library for quick prototyping and code demonstrations","archived":false,"fork":false,"pushed_at":"2022-08-16T20:25:38.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-12T05:44:55.196Z","etag":null,"topics":["demonstration","prototyping","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slyphix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-05T22:11:17.000Z","updated_at":"2025-08-29T09:09:12.000Z","dependencies_parsed_at":"2022-09-10T15:41:28.401Z","dependency_job_id":null,"html_url":"https://github.com/slyphix/quickdemo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/slyphix/quickdemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slyphix%2Fquickdemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slyphix%2Fquickdemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slyphix%2Fquickdemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slyphix%2Fquickdemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slyphix","download_url":"https://codeload.github.com/slyphix/quickdemo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slyphix%2Fquickdemo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31019443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T03:51:26.850Z","status":"ssl_error","status_checked_at":"2026-03-27T03:51:09.693Z","response_time":164,"last_error":"SSL_read: 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":["demonstration","prototyping","python"],"created_at":"2025-12-13T18:01:49.307Z","updated_at":"2026-03-27T04:31:54.191Z","avatar_url":"https://github.com/slyphix.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## quickdemo\r\n\r\n_For when unit tests would be too much!_\r\n\r\n`quickdemo` is a tiny Python library for code demonstrations and small-scale testing.\r\nIf your debugging tool of choice is printing to `stdout`, this might be the right library for you.\r\n\r\n`quickdemo` allows you to decorate any module-level function with an _invocation_ or _testing_ directive:\r\n\r\n    import quickdemo as qd\r\n\r\n    @qd.expect([1, 2], [0, 1], 1)\r\n    @qd.run([1, 2, 3], 5)\r\n    def add_to_list(input_list, number):\r\n        return [x + number for x in input_list]\r\n\r\nThe snippet above produces the following output:\r\n\r\n    add_to_list([1, 2, 3], 5) -\u003e [6, 7, 8]\r\n    Passed: add_to_list([0, 1], 1)\r\n\r\nCheck out the `showcase*.py` files for more examples!\r\n\r\nI developed `quickdemo` for two reasons:\r\n\r\nFirstly, when presenting solutions to other people, I always wrote several `print` statements per function to demonstrate the correctness of the solution.\r\nThe `print` statements always added up quickly, making it difficult to discern which output corresponded to which function.\r\nAlso, changing any function name implied re-writing the invocation code.\r\nThis was especially tedious when working with Jupyter Notebooks, where you have to take great care to re-run a cell each time something changes.\r\n\r\nSecondly, there is an educational programming language called [Pyret](https://www.pyret.org/), which allows writing short unit tests as part of a function definition.\r\nI believe this to be a sensible choice when targeting beginners.\r\nUnfortunately, Pyret code is neither readable nor particularly fast, so I decided to introduce this feature to Python as a part of `quickdemo`.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslyphix%2Fquickdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslyphix%2Fquickdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslyphix%2Fquickdemo/lists"}