A virtual environment utility for saving the commands you use in python projects.
Project description
Keep a local history of everything you do inside your virtual python environment.
Installation
After activating your virtual environment, install the module with:
pip install pystory
Add the following line to your .bashrc/.bash_profile file to enable pystory:
export PROMPT_COMMAND='if [ ! -z ${VIRTUAL_ENV+x} ]; then echo "$(date "+%Y-%m-%d.%H:%M:%S") $(pwd) $(history 1)" >> $VIRTUAL_ENV/.pystory; fi'
The contents of PROMPT_COMMAND are executed as a regular Bash command just before Bash displays a prompt.
This line adds your last command as an entry to the .pystory file, which will be placed in your $VIRTUAL_ENV/ folder.
Ex:
/Users/username/project/.venv/.pystory
Usage
Check your pystory by typing pystory while your virtual environment is activated.
$ pystory Hist Count Command 1 1. pip install requests 2 1. pip install Django 5 3. python ...
Note that the output is compressed, so only the last history entry of a command is listed, with the count of times the command is used.
$ pystory find Django Commands matching `Django`: Hist Count Command 2 1 pip install Django
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pystory-0.2.tar.gz.
File metadata
- Download URL: pystory-0.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
464ef2cb5dda0514a0caa53e278a7d44a784b2b62f2a9761de24abb640f1b2c1
|
|
| MD5 |
2f8e07e30bdc58ed8602f82e4b73093b
|
|
| BLAKE2b-256 |
24bb9eb4503daa375249fda654e50c30c9f2b894d6072f0e16ff669b38b6f776
|
File details
Details for the file pystory-0.2-py2.py3-none-any.whl.
File metadata
- Download URL: pystory-0.2-py2.py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d7396c9bf2216e42d547f385b60ddc52d1915b51c76b2d4f66384de9d82ddb1
|
|
| MD5 |
16e5cf8d4239dd15bacdfc7e5e532b7d
|
|
| BLAKE2b-256 |
971f42f3e4bb1736ab76bb7f87d3edb9f0e9900b31d5b846467d717056034bf2
|