Reloadr – Hot code reloading tool for Python

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. jurigged

    Hot reloading for Python

    `python -m jurigged script.py` or `jurigged script.py` instead of `python script.py` and it will watch everything in the current working directory.

    There's still some bugs I have to iron out, though, it should be better in a month or so. Still, you can pip install it if you want.

    [1] https://github.com/breuleux/jurigged

  2. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  3. reloadr

    Hot code reloading tool for Python

  4. PyDev.Debugger

    Sources for the debugger used in PyDev, PyCharm and VSCode Python

    Ha, I'm just working on integrating the `pydev.debugger` code reloading into `debugpy` (so that the code reloading from the PyDev debugger will be available for Python-VSCode debugger users too).

    The in-memory reloading (which may be seen at: https://github.com/fabioz/PyDev.Debugger/blob/main/_pydevd_b...) unfortunately doesn't work all the time (fixing the references at runtime in Python is difficult), but it works well enough for the cases where you have a simple function and change it (that file does explain some of the issues that the reloading faces).

    One major issue is that after doing the reload, you need to get out of the function and then back into it to see the difference -- so, if you're stopped in the function in a breakpoint, it's not possible to simply drop the function and restart it as Python itself doesn't support that... maybe that's a good idea for a PEP ;)

    Anyways, when it works, it's pretty nice in that you don't have to restart your whole debug session to see changes (the other approach, which webservers use in general is just restart the whole process, so, for instance, Django has an initial process just monitoring for changes and a 2nd process which is actually serving requests which is restarted when something changes -- not as good if you have a heavy startup or are working with something where you have to click through multiple things to get to the state which you want).

  5. ipdb

    Integration of IPython pdb

    Now tie in some ipdb [1] and you have a pretty sweet setup. Also depending on your serving framework it might also have hot reloading as well, tornado, flask, etc.

    [1]https://github.com/gotcha/ipdb

    [2] https://www.tornadoweb.org/en/stable/autoreload.html https://werkzeug.palletsprojects.com/en/0.14.x/serving/

  6. RuntimeCompiledCPlusPlus

    Change C++ code at runtime

    There is https://github.com/RuntimeCompiledCPlusPlus/RuntimeCompiledC...

    The idea is to use virtual functions, and recompile new classes into a shared library. The shared lib is linked into the running program, and old instances of the classes are deleted and replaced by new instances constructed from the share library.

    I am working on a library using the same (stolen) idea here:

    https://github.com/jheruty/hscpp

    Proof of concept demo:

    https://m.youtube.com/watch?v=pjGngeKgni8

    hscpp is still very alpha, and I’m sure I’ll find lots of bugs as I work on a “real” demo. In contrast, Runtime Compiled C++ is quite mature and is used in real game projects.

    Note that this approach very much limits your architecture. For example, you won’t be able to use statics, as the newly compiled shared libraries won’t see them.

    It’s a finicky thing, worth it to me, but not something you can just plop in to an established project.

  7. PythonHotswap

    Hotswap Python functions. And persistence of runtime.

    - https://github.com/albertz/PythonHotswap

  8. ipython

    Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.

    - https://github.com/ipython/ipython/blob/f8c9ea7db42d9830f163...

  9. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  10. pyqtboiler

    PyQt application boilerplate for rapid development

    - https://github.com/mikr/pyqtboiler/blob/master/baseapp/utils...

  11. hotpatch

    In-place hotpatching for Python functions

    - https://github.com/mpolney/hotpatch

  12. hottie

    python code hot-swapping

    - https://github.com/narfdotpl/hottie with decorator

  13. inquest

    Discontinued Inquest lets you add log statements to python without restarting your python instance. It helps you quickly uncover what is going wrong.

    - https://github.com/yiblet/inquest

  14. reloading

    Change Python code while it's running without losing state

    Write a similar thing [1] which can also reload functions from source before every execution but also load loop bodies from source before each iteration. Can be helpful for long running loops like when downloading or training deep learning models.

    [1] https://github.com/julvo/reloading

  15. Revise.jl

    Automatically update function definitions in a running Julia session

    In Julia, this can be done with even less efforts on the user-side by loading Revise (https://github.com/timholy/Revise.jl) before any other package you load.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • The new pdbp (Pdb+) Python debugger!

    9 projects | dev.to | 2 Aug 2023
  • Why do people say that Neovim cannot be an IDE?

    2 projects | /r/neovim | 18 Sep 2022
  • Debugging Python programs without an IDE

    2 projects | dev.to | 29 Jun 2022
  • Debug in VIM

    5 projects | /r/vim | 15 Apr 2021
  • reloadr - A hot code reloading tool for Python

    1 project | /r/programming | 22 Feb 2021