Skip to main content

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.displayhook to pprint (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 REPL
  • reload() takes module names recorded in allow_reload sections, pops them from sys.modules and 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythonrc_manager-0.1.1.tar.gz (35.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythonrc_manager-0.1.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pythonrc_manager-0.1.1.tar.gz.

File metadata

  • Download URL: pythonrc_manager-0.1.1.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pythonrc_manager-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ba0479d831822e497e1e5001d60742e075044dec5c5d7681777865da1ae30070
MD5 d1e4055628d961be62f430bb150a707b
BLAKE2b-256 bcb3badee83368af9fc43a90202c182f5800743c3192cd26464e0ed90dc1bffc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pythonrc_manager-0.1.1.tar.gz:

Publisher: release.yml on bswck/pythonrc-manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pythonrc_manager-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pythonrc_manager-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7636649bc3cbe77ba521fd5ab14fc0728791e2f785de099ab802ab5ed8aa5a1c
MD5 a4f7163a363c9a2201b3c546314526d6
BLAKE2b-256 2b9611b35420d9a3b1fbe85883ad77bd477a54e500c5b37104d5f920e540fb7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pythonrc_manager-0.1.1-py3-none-any.whl:

Publisher: release.yml on bswck/pythonrc-manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page