{"id":20511568,"url":"https://github.com/10sr/with-venv-el","last_synced_at":"2025-07-08T21:33:37.204Z","repository":{"id":44877400,"uuid":"161758101","full_name":"10sr/with-venv-el","owner":"10sr","description":"Execute with Python Virtual Environment Activated","archived":false,"fork":false,"pushed_at":"2024-11-12T05:41:51.000Z","size":74,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-05T22:44:34.437Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://10sr.github.io/with-venv-el/","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/10sr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-12-14T08:56:37.000Z","updated_at":"2024-11-12T05:41:55.000Z","dependencies_parsed_at":"2024-11-12T06:22:39.565Z","dependency_job_id":"c732a649-a3a4-4274-a6d5-b08b55163520","html_url":"https://github.com/10sr/with-venv-el","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/10sr/with-venv-el","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10sr%2Fwith-venv-el","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10sr%2Fwith-venv-el/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10sr%2Fwith-venv-el/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10sr%2Fwith-venv-el/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/10sr","download_url":"https://codeload.github.com/10sr/with-venv-el/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10sr%2Fwith-venv-el/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264353071,"owners_count":23595028,"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":[],"created_at":"2024-11-15T20:36:25.146Z","updated_at":"2025-07-08T21:33:37.186Z","avatar_url":"https://github.com/10sr.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![build](https://github.com/10sr/with-venv-el/actions/workflows/build.yaml/badge.svg)](https://github.com/10sr/with-venv-el/actions/workflows/build.yaml)\n[![MELPA](https://melpa.org/packages/with-venv-badge.svg)](https://melpa.org/#/with-venv)\n[![MELPA Stable](https://stable.melpa.org/packages/with-venv-badge.svg)](https://stable.melpa.org/#/with-venv)\n\n\nwith-venv.el\n============\n\nExecute with Python virtual environment activated\n\n\nUsage\n-----\n\n\n`with-venv` macro executes BODY with Python virtual environment activated:\n\n``` emacs-lisp\n(with-venv\n  (executable-find \"python\"))\n```\n\nThis macro searchs for suitable venv directory for current environment\nautomatically: by default it supports `pipenv`, `poetry`, and directories\nnamed `\".venv\"` and `\"venv\"`.\nYou can modify `with-venv-find-venv-dir-functions` to add or remove\nthese supports.\n\n\nThe automatic search result will be cached as a buffer-local variable, so\n`with-venv` try to find venv dir only at the first time it is used after\nvisiting file.\nTo explicitly update this cache (without re-visiting file) after you\ncreated/changed a virtual environment, invoke `M-x with-venv-find-venv-dir`\nmanually.\n\nYou can also set buffer-local vairable `with-venv-venv-dir` explicitly\nto specify venv directory for `with-venv` macro.\nIn this case, the automatic search will be totally disabled for that buffer.\n\n\nIf you want to always enable `with-venv` for certain functions,\n`with-venv-advice-add` can be used for that purpose:\n\n``` emacs-lisp\n(with-venv-advice-add 'blacken-buffer)\n```\n\nAdviced functions are always wrapped with `with-venv` macro when called.\n\nCall `with-venv-advice-remove` to remove these advices.\n\n\nLicense\n-------\n\nThis software is licensed under Apache License 2.0 . See `LICENSE` for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10sr%2Fwith-venv-el","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F10sr%2Fwith-venv-el","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10sr%2Fwith-venv-el/lists"}