elvis-repl


Nameelvis-repl JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryElvis has left the building - A REPL template engine that remembers
upload_time2024-10-31 17:36:38
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseBSD-3-Clause
keywords repl template development jupyter
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Elvis Has Left the Building

Generate Python code strings to recreate objects with their current state. Perfect for:
- Saving exact object recreation code
- Working in terminals where copy-paste is painful
- Quick templating of repetitive code
  
Some say it's pointless. Some say it's brilliant. Elvis doesn't care either way - Elvis has already left the building.

## Install
```bash
pip install elvis-repl
```

## Usage
```python
from elvis_repl import elvis

# Generate object creation code
elvis("df = pd.read_csv(\"{file}\", skiprows={skip})", 
      file="data.csv", skip=2)
# Output: df = pd.read_csv("data.csv", skiprows=2)

# Reuse with changed variables
elvis._vars['skip'] = 3
elvis("df = pd.read_csv(\"{file}\", skiprows={skip})")

# Generate multiple similar objects
for i in range(2):
    elvis("obj_{id} = MyClass(\"{name}\")", id=i, name=f"instance_{i}")
```

## Features
- Remember variables between templates
- Preview code before execution with .show()
- Execute when ready with .run()
- Works in both Jupyter and CLI

Remember: When your session crashes, Elvis makes sure you know how to rebuild everything exactly as it was.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "elvis-repl",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "repl, template, development, jupyter",
    "author": null,
    "author_email": "Kaspar Kallas <kaspar.kana.kallas@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/7c/c2/24a30103f536584932dec0dd9e83a777872d9b8d30e0c6a2e4bcd795f658/elvis_repl-0.1.1.tar.gz",
    "platform": null,
    "description": "# Elvis Has Left the Building\r\n\r\nGenerate Python code strings to recreate objects with their current state. Perfect for:\r\n- Saving exact object recreation code\r\n- Working in terminals where copy-paste is painful\r\n- Quick templating of repetitive code\r\n  \r\nSome say it's pointless. Some say it's brilliant. Elvis doesn't care either way - Elvis has already left the building.\r\n\r\n## Install\r\n```bash\r\npip install elvis-repl\r\n```\r\n\r\n## Usage\r\n```python\r\nfrom elvis_repl import elvis\r\n\r\n# Generate object creation code\r\nelvis(\"df = pd.read_csv(\\\"{file}\\\", skiprows={skip})\", \r\n      file=\"data.csv\", skip=2)\r\n# Output: df = pd.read_csv(\"data.csv\", skiprows=2)\r\n\r\n# Reuse with changed variables\r\nelvis._vars['skip'] = 3\r\nelvis(\"df = pd.read_csv(\\\"{file}\\\", skiprows={skip})\")\r\n\r\n# Generate multiple similar objects\r\nfor i in range(2):\r\n    elvis(\"obj_{id} = MyClass(\\\"{name}\\\")\", id=i, name=f\"instance_{i}\")\r\n```\r\n\r\n## Features\r\n- Remember variables between templates\r\n- Preview code before execution with .show()\r\n- Execute when ready with .run()\r\n- Works in both Jupyter and CLI\r\n\r\nRemember: When your session crashes, Elvis makes sure you know how to rebuild everything exactly as it was.\r\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Elvis has left the building - A REPL template engine that remembers",
    "version": "0.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/KKallas/elvis/issues",
        "Homepage": "https://github.com/KKallas/elvis"
    },
    "split_keywords": [
        "repl",
        " template",
        " development",
        " jupyter"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8837e2be1d918fad882d4cf9f147e9a702b37908c291ab5f09d6f675f85692fd",
                "md5": "79a2b4d32a152ce3785f03527fbbf154",
                "sha256": "0ce63e61e09467b4c9cc15d8a1c269c269f43e4420df1730b864f4c755e86e0d"
            },
            "downloads": -1,
            "filename": "elvis_repl-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "79a2b4d32a152ce3785f03527fbbf154",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4278,
            "upload_time": "2024-10-31T17:36:36",
            "upload_time_iso_8601": "2024-10-31T17:36:36.348113Z",
            "url": "https://files.pythonhosted.org/packages/88/37/e2be1d918fad882d4cf9f147e9a702b37908c291ab5f09d6f675f85692fd/elvis_repl-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7cc224a30103f536584932dec0dd9e83a777872d9b8d30e0c6a2e4bcd795f658",
                "md5": "1afa645675174dcc009673556915b267",
                "sha256": "34035ed43982c181f69ed3c2a8d94e1c6a6a476747d65704daec5ee167cdb1b4"
            },
            "downloads": -1,
            "filename": "elvis_repl-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1afa645675174dcc009673556915b267",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4558,
            "upload_time": "2024-10-31T17:36:38",
            "upload_time_iso_8601": "2024-10-31T17:36:38.181535Z",
            "url": "https://files.pythonhosted.org/packages/7c/c2/24a30103f536584932dec0dd9e83a777872d9b8d30e0c6a2e4bcd795f658/elvis_repl-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-31 17:36:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "KKallas",
    "github_project": "elvis",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "elvis-repl"
}
        
Elapsed time: 9.21419s