{"id":26505518,"url":"https://github.com/iloveitaly/ipython-playground","last_synced_at":"2026-05-17T18:35:17.219Z","repository":{"id":283322548,"uuid":"951377226","full_name":"iloveitaly/ipython-playground","owner":"iloveitaly","description":"Understand what is in your ipython playground.","archived":false,"fork":false,"pushed_at":"2026-05-14T20:50:21.000Z","size":571,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-14T22:14:26.636Z","etag":null,"topics":["ipython","playground","repl"],"latest_commit_sha":null,"homepage":"https://github.com/iloveitaly/ipython-playground","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/iloveitaly.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["iloveitaly"]}},"created_at":"2025-03-19T15:26:31.000Z","updated_at":"2026-05-14T20:49:18.000Z","dependencies_parsed_at":"2025-07-31T05:09:23.066Z","dependency_job_id":"ad68566e-0c67-4ca0-8828-ce291430f40c","html_url":"https://github.com/iloveitaly/ipython-playground","commit_stats":null,"previous_names":["iloveitaly/ipython-playground","iloveitaly/ipython_playground"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/iloveitaly/ipython-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iloveitaly%2Fipython-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iloveitaly%2Fipython-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iloveitaly%2Fipython-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iloveitaly%2Fipython-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iloveitaly","download_url":"https://codeload.github.com/iloveitaly/ipython-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iloveitaly%2Fipython-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33149769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"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":["ipython","playground","repl"],"created_at":"2025-03-20T21:47:29.340Z","updated_at":"2026-05-17T18:35:17.212Z","avatar_url":"https://github.com/iloveitaly.png","language":"Python","funding_links":["https://github.com/sponsors/iloveitaly"],"categories":[],"sub_categories":[],"readme":"[![Release Notes](https://img.shields.io/github/release/iloveitaly/ipython-playground)](https://github.com/iloveitaly/ipython-playground/releases)\n[![Downloads](https://static.pepy.tech/badge/ipython-playground/month)](https://pepy.tech/project/ipython-playground)\n![GitHub CI Status](https://github.com/iloveitaly/ipython-playground/actions/workflows/build_and_publish.yml/badge.svg)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n# IPython Playground\n\nI'm a big fan of playgrounds. Every repo should have a `playground.py` to make it easy to jump right\ninto REPL-driven development.\n\nHowever, it's hard to understand what's in the `playground.py` once it gets big. This project eliminates this problem ([example from this project](https://github.com/iloveitaly/python-starter-template)):\n\n![alt text](screenshot.png)\n\n## Installation\n\n```bash\nuv add ipython-playground\n```\n\n## Usage\n\n1. Run `ipython-playground` to generate a `playground.py`.  \n2. Execute `./playground.py` to start an IPython session with additional setup.\n\n## How `extras.py` and the `all()` hook work\n\nThe `ipython_playground/extras.py` file provides logic to automatically import and expose useful modules and objects in your playground session. The main entry point is the `all()` function, which:\n\n- Loads common app modules (like `app.models`, `app.commands`, `app.jobs`) if available.\n- Monkey patches `Enum.__repr__` to provide a cleaner, concise display of enum members in the REPL (e.g. `MyEnum.MEMBER` instead of `\u003cMyEnum.MEMBER: 1\u003e`).\n- Attempts to import helpful libraries such as `funcy_pipe`, `sqlalchemy`, and `sqlmodel`.\n- Optionally discovers all SQLModel classes in your models module and adds them to the namespace.\n- If a database URL is available (either passed in or imported from your app config), sets up a SQLAlchemy engine and session, and exposes helpers for running and compiling SQL statements.\n\nWhen you run `playground.py`, it calls `globals().update(ipython_playground.all_extras())`, which injects all these objects into your interactive session, making them immediately available for experimentation.\n\n---\n\n*This project was created from [iloveitaly/python-package-template](https://github.com/iloveitaly/python-package-template)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filoveitaly%2Fipython-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filoveitaly%2Fipython-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filoveitaly%2Fipython-playground/lists"}