Shell helper utilities for python
Project description
|
gripe
|
|
|
Opinionated extensions for the `grip` utility. The grip utility provides rendering/serving local markdown files written in github-flavored markdown. Gripe extends it, allowing for serving more types of local files, as well as intelligent management for multiple `grip` daemons. |
|
Overview
The gripe library provides extensions for grip.
The grip utility provides rendering/serving local markdown files written in github-flavored markdown.
Gripe extends it, allowing for serving more types of local files, as well as intelligent management for multiple grip daemons without thinking about server-port collisions.
Features
Support for Multiple Projects
Working with multiple projects simultaneously is supported. This works by managing multiple daemons with a per-project port. See CLI Usage for more information.
Installation
See pypi for available releases.
$ pip install gripe
Usage (CLI)
The gripe library publishes a small CLI tool.
Listing Servers
# or `gripe ls` or `python -mgripe ls`
$ gripe list
{"local": [], "foreign": []}
Starting and Stopping Servers
# or `python -mgripe start`
$ gripe start
INFO gripe Trying to serve files
DEBUG gripe Starting gripe for this project..
DEBUG gripe Used ports: []
INFO gripe starting server with command:
INFO gripe 'flask --app gripe:app run --port 6149 >> .tmp.gripe.log 2>&1 &'
# startup example for a 2nd server over the same project: server start is NO-OP
$ gripe start
INFO gripe Trying to serve files
INFO gripe 1 copies of gripe are already started
INFO gripe gripe @ pid `10059` is already serving this project
INFO gripe Skipping startup.
# startup example for 2nd server over 2nd project: new port allocated automatically
$ gripe start
INFO gripe trying to serve files
INFO gripe 1 copies of gripe are already started
INFO gripe No gripes are serving this project.
DEBUG gripe Starting gripe for this project..
DEBUG gripe Used ports: [6149]
DEBUG gripe server port @ 6149, using next available @ 6150
INFO gripe starting server with command:
INFO gripe 'flask --app gripe:app run --port 6150 >> .tmp.gripe.log 2>&1 &'
$ gripe stop
INFO gripe gripe @ {'pid': 10059, 'cwd':'...', 'port': 6149} started here
INFO gripe killing it..
Usage (API)
Listing Servers
>>> import gripe
>>> gripe.list()
{"local": [], "foreign": []}
Starting and Stopping Servers
>>> import gripe
>>> servers = gripe.start(); print(servers)
{ "local": [
{ "pid": 93867,
"cwd": "...",
"port": 6149 }
],
"foreign": []
}
>>> gripe.stop(grips=servers['local'])
{
"killed":
[ { "pid": 93867,
"cwd": "...",
"port": 6149 } ]
}
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 gripe-2024.2.24.1.31.tar.gz.
File metadata
- Download URL: gripe-2024.2.24.1.31.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87f03f7e13c4ab5d80ce96ef50d0e7ec5ea23ee5282acca869c4a0ed1e7ee661
|
|
| MD5 |
47ea8085249eec0d94ccecf86e2198c5
|
|
| BLAKE2b-256 |
37e45409eae79ab330f96e81f3ad6d547b0dd50ea29f3d74c6369a472e741d67
|
File details
Details for the file gripe-2024.2.24.1.31-py3-none-any.whl.
File metadata
- Download URL: gripe-2024.2.24.1.31-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7be1483720ff4eef7fb0c734218c0f693c1d1f5eac4e313cfbb55dc6bd09c82
|
|
| MD5 |
5d03e4a9b13a98618c9c5f7f01d5f0e6
|
|
| BLAKE2b-256 |
e49d9660ce5295e77b768310ed8e459010ce101a75c85ef1bda063bb9cfad964
|