This project exposes one function – with_reloading – which is used to run a single callable. This callable gets run in a separate thread which gets restarted whenever a Python source file from the current working directory down changes. This improves the development cycle by removing the need to manually restart long running services whenever its source code changes.
> Burgeon: To grow or develop rapidly; expand or proliferate.
Installation
pip install burgeon
Example Usage
from burgeon import with_reloading
def my_function():
while True:
print("hello")
with_reloading(my_function)
The function above demonstrates a minimal example of using with_reloading. Once the code is executed, any changes to the file (that get saved) will notify burgeon to restart the thread running the function and execute the new changes.
Acknowledgements
This implementation of Python file reloading uses watchgod and is heavily based off the BaseReload class in the uvicorn repository. For context, this is how uvicorn implements its own development server reloading. This project simplifies the implementation and exposes the reloading functionality via a simple and opinionated interface.
Release files for burgeon 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| burgeon-0.1.3.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| burgeon-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.1 kB
Release files / burgeon-0.1.3.tar.gz
| Download URL | burgeon-0.1.3.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f3be6b9f480518d5afca94d3257b73ad420d9000721f49712815bc4265d0b09
|
|
BLAKE2b-256 checksum How to use checksums |
830c59f84d8c8395a1669421e2f66409e57efccb6255c4bb15e152b4b3118cb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.6.15 Linux/5.11.0-1022-azure
|
Release files / burgeon-0.1.3-py3-none-any.whl
| Download URL | burgeon-0.1.3-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1100cf2134703e307debacef2291e2661e38a0f6cde73d9f509b2711b55b1fa1
|
|
BLAKE2b-256 checksum How to use checksums |
87e97dda441e5016347863b3d0ae07bc8ae62ec7752912955bc40c626c0e7609
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.6.15 Linux/5.11.0-1022-azure
|