{"id":15043331,"url":"https://github.com/pm8k/bpmagic","last_synced_at":"2025-07-17T23:34:17.196Z","repository":{"id":57416194,"uuid":"97438328","full_name":"pm8k/bpmagic","owner":"pm8k","description":"bpmagic is a library to save and load boilerplate code","archived":false,"fork":false,"pushed_at":"2017-12-17T21:17:52.000Z","size":16,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T21:13:30.308Z","etag":null,"topics":["boilerplate","ipython","jupyter"],"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/pm8k.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.rtf","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-07-17T05:28:01.000Z","updated_at":"2018-06-04T14:54:12.000Z","dependencies_parsed_at":"2022-09-05T03:01:35.875Z","dependency_job_id":null,"html_url":"https://github.com/pm8k/bpmagic","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/pm8k/bpmagic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pm8k%2Fbpmagic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pm8k%2Fbpmagic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pm8k%2Fbpmagic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pm8k%2Fbpmagic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pm8k","download_url":"https://codeload.github.com/pm8k/bpmagic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pm8k%2Fbpmagic/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265678710,"owners_count":23810117,"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":["boilerplate","ipython","jupyter"],"created_at":"2024-09-24T20:48:52.025Z","updated_at":"2025-07-17T23:34:17.170Z","avatar_url":"https://github.com/pm8k.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bpmagic\n\nbpmagic is a library to save and load boilerplate code. With a few simple commands, you can save and load bits of frequently used code to speed up programming in iPython and Jupyter.\n\n## Install\nbpmagic is up on pip, so you can simply call:\n`pip install bpmagic`\n\n## Loading bpmagic\nTo load the bpmagic namespaces, you can use the load_ext magic function:\n`%load_ext bpmagic`\nTo prevent typing this everytime, you can add this to your ipython profile startup (mine is in `/.ipython/profile_default/startup/`) and place the above command into a `*.ipy` file (you can name it whatever you want, I used `bpmagic.ipy`)\n\n\n\n## Save\n\nUsing the `%%isave` magic function, you can write and save a chunk of code into a new bpmagic namespace. For example:\n\n```\n\t%%isave data\n\timport pandas as pd\n\timport numpy as np\n\timport scipy as sp\n``` \n\nThis will save your current cell of code into the namespace `data`. If the namespace is already defined, you can overwrite using the -o flag:\n\n```\n\t%%isave plot -o\n\timport matplotlib.pyplot as plt\n\timport seaborn as sns\n\t%matplotlib inline\n``` \n\n## Load\n\nUsing the `%iload` function, you can load up 1 or more profiles at once. For example:\n\n`%iload data plot`\n\nThis will load the boiler plate code for `data` and `plot` and replace the cell that contained `%iload` with:\n\n```\n\t# data\n\timport pandas as pd\n\timport numpy as np\n\timport scipy as sp\n\n\t# plot\n\timport matplotlib.pyplot as plt\n\timport seaborn as sns\n\t%matplotlib inline\n\n``` \n\n## Delete\nIf you pass a profile name after `%idelete`, you will remove that profile name. Example:\n`%idelete data`\n\n## Rename\nPassing in the old name followed by the new profile name will change the name of a profile:\n`%irename plot plotting`\n\n\n## List\nTo get a list of current profiles, simply call `%ilist` in ipython, and it will return a list of all of your current profiles.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpm8k%2Fbpmagic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpm8k%2Fbpmagic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpm8k%2Fbpmagic/lists"}