Name | ipython-playground JSON |
Version |
0.4.0
JSON |
| download |
home_page | None |
Summary | Understand what is in your ipython playground. |
upload_time | 2025-08-26 12:00:59 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT |
keywords |
ipython
playground
repl
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# IPython Playground
I'm a big fan of playgrounds. Every repo should have a `playground.py` to make it easy to jump right
into REPL-driven development.
However, 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)):

## Installation
```shell
pip install ipython-playground
```
## Usage
1. Run `ipython-playground` to generate a `playground.py`.
2. Execute `./playground.py` to start an IPython session with additional setup.
## How `extras.py` and the `all()` hook work
The `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:
- Loads common app modules (like `app.models`, `app.commands`, `app.jobs`) if available.
- Attempts to import helpful libraries such as `funcy_pipe`, `sqlalchemy`, and `sqlmodel`.
- Optionally discovers all SQLModel classes in your models module and adds them to the namespace.
- 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.
When 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "ipython-playground",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "ipython, playground, repl",
"author": null,
"author_email": "Michael Bianco <mike@mikebian.co>",
"download_url": "https://files.pythonhosted.org/packages/f0/e9/0d8934b8e5d7775456156bedc7d9a2245d4487bf8fedf76443240c87f4f6/ipython_playground-0.4.0.tar.gz",
"platform": null,
"description": "# 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\n\n## Installation\n\n\n```shell\npip install 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- 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",
"bugtrack_url": null,
"license": "MIT",
"summary": "Understand what is in your ipython playground.",
"version": "0.4.0",
"project_urls": {
"Repository": "https://github.com/iloveitaly/ipython-playground"
},
"split_keywords": [
"ipython",
" playground",
" repl"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a78c210d91ea59c0055497cea5f6c4fe2a50cf156ff9346fdf7c11b902bd3494",
"md5": "528a4d83d61754c6e5af0cf68d2ce0a7",
"sha256": "99d22f0dce93dd20c05cc127030a1d7fc2a2caa24f9ef3586c38150ed866c422"
},
"downloads": -1,
"filename": "ipython_playground-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "528a4d83d61754c6e5af0cf68d2ce0a7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 8562,
"upload_time": "2025-08-26T12:00:58",
"upload_time_iso_8601": "2025-08-26T12:00:58.128250Z",
"url": "https://files.pythonhosted.org/packages/a7/8c/210d91ea59c0055497cea5f6c4fe2a50cf156ff9346fdf7c11b902bd3494/ipython_playground-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f0e90d8934b8e5d7775456156bedc7d9a2245d4487bf8fedf76443240c87f4f6",
"md5": "280ba1332fd26b27d64bf657b89f1562",
"sha256": "a3996733fa1ebf9df8df49ccb75a107693a5b03d6e0809129f430af1339e1526"
},
"downloads": -1,
"filename": "ipython_playground-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "280ba1332fd26b27d64bf657b89f1562",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 354446,
"upload_time": "2025-08-26T12:00:59",
"upload_time_iso_8601": "2025-08-26T12:00:59.202261Z",
"url": "https://files.pythonhosted.org/packages/f0/e9/0d8934b8e5d7775456156bedc7d9a2245d4487bf8fedf76443240c87f4f6/ipython_playground-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-26 12:00:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "iloveitaly",
"github_project": "ipython-playground",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ipython-playground"
}