A tool to manipulate python code at runtime for logging, profiling, debugging, etc.
Project description
pyliveupdate
PyLiveUpdate
is a Python runtime monitoring, profiling, debugging and bugfixing tool under development.
PyLiveUpdate allows developers to profile, troubleshoot and fix production issues for Python applications without restarting the programs.
Key features (under developing)
- Profile specific (by name) Python functions call time.
- Check the function invocation details such as function parameters, return object, local variables and etc.
- Add logs to specific functions
- Dynamic patching a function
Quick start
Requirements
Compatibility
- Supports Python 3.6+ on Linux.
Install
pip install pyliveupdate
How to use
We currently implemented function profiling and are implementing more. Please feel free to let us know if you find other features useful: https://github.com/devopspp/pyliveupdate/issues/2.
profile function call time
- Start pyliveupdate server
pylu-server --logserver
- In your program (like examples/program1.py) main module add
from pyliveupdate import *
client.UpdateClient().start()
- Run your program (make sure in the correct directory)
cd examples
python program1.py
- Start profile one function on the server side
instru('__main__.bar')
or any functions
instru('**')
- Check output in either your program output or
/tmp/instru.log
- List applied profiling
listinstru
- Stop a profiling by its id without stop your program
revert(1)
Known Users
Welcome to register your company name here: https://github.com/devopspp/pyliveupdate/issues/1
Credit
Projects
- pyrasite: Inject code into running Python processes.
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
pyliveupdate-0.1.2.tar.gz
(12.1 kB
view hashes)
Built Distribution
Close
Hashes for pyliveupdate-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d89e816fb22ba40c070c5e65fbca7b1e584a59451d9b92dc7bf2d7cde98d459 |
|
MD5 | a5c89ba0fb259d1ea771c023501dd316 |
|
BLAKE2b-256 | e85bc10150a01072776853d7061841dcbba816b16009f88c740e19dc804ce3e1 |