Watches for file changes & runs tasks against your Python code.
Project description
Code Spy
Watches for file changes & runs tasks against your Python code.
Install
pip install code-spy
Quickstart
from flask import Flask # Or any WSGI application framework
from code_spy.core import CodeSpy
from code_spy.tasks import (
MyPyTask,
DevServerTask,
PylintTask,
PytestTask,
)
if __name__ == "__main__":
# Create an instance of a WSGI application
flask = Flask(__name__)
# Pass the code spy shipped tasks to the `tasks` kwarg:
cs = CodeSpy(
path=".",
tasks=[
MyPyTask(path="routes", mypy_file="mypy.ini"),
PylintTask(path="routes", rcfile=".pylintrc"),
PytestTask(path="tests"),
DevServerTask(wsgi_app=flask),
]
)
# Now call `watch`, that's it!
cs.watch()
Tasks
- Mypy ✅
- SimpleHttpServer ✅
- Pylint ✅
- Pytest ✅
Tasks Requiring Library Installs
To restrict the amount of third party libraries that ship with code-spy, the rest of the tasks require library installs:
- ISort TODO
- Flake8 TODO
- Bandit TODO
- Sphinx TODO
- Custom Task TODO
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
code_spy-0.4.5.tar.gz
(3.3 kB
view details)
File details
Details for the file code_spy-0.4.5.tar.gz.
File metadata
- Download URL: code_spy-0.4.5.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e2717ac224a09783fb77b641ba43f93ad5e6a355fe37ddee7ea2a0f4c71e4b2
|
|
| MD5 |
96b1ec166570095633a1f46b61e700d6
|
|
| BLAKE2b-256 |
0abe234b80d97683684bf2a6c2aa2cc5616141a8c82beb27f19af5366889d7f2
|