All Projects → hoh → Reloadr

hoh / Reloadr

Licence: lgpl-3.0
Hot code reloading tool for Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Reloadr

dotfiles
My personal app/env configs and dotfiles.
Stars: ✭ 27 (-94.41%)
Mutual labels:  development, developer-tools
Maildev
📫 SMTP Server + Web Interface for viewing and testing emails during development.
Stars: ✭ 3,102 (+542.24%)
Mutual labels:  developer-tools, development
myke
make with yaml: development tasks made simple with golang, yaml and many ingredients
Stars: ✭ 67 (-86.13%)
Mutual labels:  development, developer-tools
Laravel Kit
A desktop Laravel admin panel app
Stars: ✭ 440 (-8.9%)
Mutual labels:  developer-tools, development
Emacs4developers
A document to help developers to use Emacs as a developer
Stars: ✭ 430 (-10.97%)
Mutual labels:  developer-tools, development
Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+10883.85%)
Mutual labels:  developer-tools, development
init-macOS-dev
init my macOS development environment
Stars: ✭ 14 (-97.1%)
Mutual labels:  development, developer-tools
Okteto
Develop your applications directly in your Kubernetes Cluster
Stars: ✭ 1,937 (+301.04%)
Mutual labels:  developer-tools, development
Ergo
The management of multiple apps running over different ports made easy
Stars: ✭ 452 (-6.42%)
Mutual labels:  developer-tools, development
Takeoff
A rapid development environment using docker for convenience.
Stars: ✭ 271 (-43.89%)
Mutual labels:  developer-tools, development
Awesome Ci
List of Continuous Integration services
Stars: ✭ 2,737 (+466.67%)
Mutual labels:  developer-tools, development
Httplab
The interactive web server
Stars: ✭ 3,752 (+676.81%)
Mutual labels:  developer-tools, development
Aiohttp Devtools
dev tools for aiohttp
Stars: ✭ 202 (-58.18%)
Mutual labels:  developer-tools, development
android-trinity
android-trinity is tiny proactive framework with much of the scaffolding code required to start a new Android Application.
Stars: ✭ 44 (-90.89%)
Mutual labels:  development, developer-tools
Devspace
DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
Stars: ✭ 2,559 (+429.81%)
Mutual labels:  developer-tools, development
hapi-dev-errors
A hapi plugin to return better error details and skip the look at command line to catch the issue.
Stars: ✭ 58 (-87.99%)
Mutual labels:  development, developer-tools
Multiwatch
Simple task runner on directory changes that doesn't produce tons of logs if everything is OK 👌
Stars: ✭ 74 (-84.68%)
Mutual labels:  developer-tools, development
Pric
Simple zero-config tool to create Private Certificate Authority & issue locally-trusted development server certificates with any domain names you'd like. SSL certificates for development purposes.
Stars: ✭ 87 (-81.99%)
Mutual labels:  developer-tools, development
Serverlessbydesign
A visual approach to serverless development. Think. Build. Repeat.
Stars: ✭ 254 (-47.41%)
Mutual labels:  developer-tools, development
Developer Roadmap Guide 2018
Stars: ✭ 344 (-28.78%)
Mutual labels:  developer-tools, development

Reloadr

Python hot code reloading tool.

pip install reloadr

Usage

You can simply decorate your functions / classes with @autoreload and you are ready to go.

.. code:: python

from reloadr import autoreload

@autoreload
def do_something(a, b):
    return a + b

@autoreload
class SomeThing:
    def do_stuff(self):
        pass

Advanced usage

To reload the code manually, you can use of the following:

.. code:: Python

from reloadr import reloadr

@reloadr
class SomeThing:
    def do_stuff(self):
        pass

# Manual reload
SomeThing._reload()

# Automatic reload using filesystem notifications
SomeThing._start_watch_reload()

# Automatic reload in a thread every 1 second
SomeThing._start_timer_reload(1)

Examples

Launch an example (they each contain an infinite loop), then change the source code of the decorated class or function.

git clone https://github.com/hoh/reloadr.git

python examples/01_manual_reload.py

How it works

Instead of importing your source file again, which can lead to undesired side effects, Reloadr fetches the new code of your function within the Python source file, and executes that code in the environment of your already loaded module.

This allows it to reload code that is followed by blocking instructions such as the infinite loops you can find in the examples.

To achieve this, Reloadr relies on RedBaron <https://github.com/psycojoker/redbaron/>_ , an great tool for manipulating Python source code.

Future plans

This project is still in its early stages. All ideas for improvement are welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].