Utilities for Python REPL startup scripts
Project description
pythonrc-manager (wip)
[!warning] Don't use this yet, I'm getting the alpha version ready
Python REPL RC manager that records reloadable imports
Features
- patch
sys.displayhooktopprint(wrapped to preserve other display hook functionality) - project-scoped RC scripts (write a custom Python RC file per project) detected with git
- RCE guards (initially based on
git check-ignore, which is an imperfect heuristic for many reasons) allow_reload()a context manager and a context decorator that records module names that can be reloaded in the REPLreload()takes module names recorded inallow_reloadsections, pops them fromsys.modulesand reexecutes your RC file
Maybe also worth adding
- backported new REPL idioms (
clear,exit) for tail-developed projects - autoreloading based on a stat watcher in the background thread?
Authors
MIT License
(C) Bartosz Sławecki 2025
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pythonrc_manager-0.1.13.tar.gz.
File metadata
- Download URL: pythonrc_manager-0.1.13.tar.gz
- Upload date:
- Size: 35.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e95cc2cf093904b80d688976eb8b1d0b8838285fbb956483fcc685571c5e1e47
|
|
| MD5 |
c490be1bcafb0c75e6edd1e6f40b5b06
|
|
| BLAKE2b-256 |
23a01c39d737b6ac755a90e3eec8a85a29c7c56bb96b2bb141aef1beb1a2d582
|
Provenance
The following attestation bundles were made for pythonrc_manager-0.1.13.tar.gz:
Publisher:
ci.yml on johnslavik/pythonrc-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pythonrc_manager-0.1.13.tar.gz -
Subject digest:
e95cc2cf093904b80d688976eb8b1d0b8838285fbb956483fcc685571c5e1e47 - Sigstore transparency entry: 942266865
- Sigstore integration time:
-
Permalink:
johnslavik/pythonrc-manager@a8da47be0a4eb51326c6a3e0052771d7f3ce5f2a -
Branch / Tag:
refs/tags/v0.1.13 - Owner: https://github.com/johnslavik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@a8da47be0a4eb51326c6a3e0052771d7f3ce5f2a -
Trigger Event:
push
-
Statement type:
File details
Details for the file pythonrc_manager-0.1.13-py3-none-any.whl.
File metadata
- Download URL: pythonrc_manager-0.1.13-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f1b9e9d3ebc2c050050647c26e652b596d5791333bf8324dc1973dde30438ca
|
|
| MD5 |
b738cc08955b2dd36809326cc63cdee2
|
|
| BLAKE2b-256 |
3b8ec4f8d487e5a8fa6548f07bd85b0a4be1ac0461265868e1d438674f8ff042
|
Provenance
The following attestation bundles were made for pythonrc_manager-0.1.13-py3-none-any.whl:
Publisher:
ci.yml on johnslavik/pythonrc-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pythonrc_manager-0.1.13-py3-none-any.whl -
Subject digest:
8f1b9e9d3ebc2c050050647c26e652b596d5791333bf8324dc1973dde30438ca - Sigstore transparency entry: 942266871
- Sigstore integration time:
-
Permalink:
johnslavik/pythonrc-manager@a8da47be0a4eb51326c6a3e0052771d7f3ce5f2a -
Branch / Tag:
refs/tags/v0.1.13 - Owner: https://github.com/johnslavik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@a8da47be0a4eb51326c6a3e0052771d7f3ce5f2a -
Trigger Event:
push
-
Statement type: