Compare commits

..

3 Commits

Author SHA1 Message Date
Michael Pilosov, PhD
6a0424a3e1 version bump 2024-01-27 05:58:50 +00:00
Michael Pilosov, PhD
d513f6c565 update pkg 2024-01-27 05:54:58 +00:00
Michael Pilosov, PhD
67540962cf use less CPU 2024-01-27 05:29:39 +00:00
4 changed files with 18 additions and 7 deletions

View File

@ -1,4 +1,3 @@
```
# lazy_serve
A simple, easy-to-use Python package for starting HTTP servers with minimal setup. Ideal for serving static files in development environments or for lightweight file sharing.
@ -7,10 +6,11 @@ A simple, easy-to-use Python package for starting HTTP servers with minimal setu
To install lazy_serve, simply use pip:
```sh
```bash
pip install lazy_serve
```
## Usage
Using lazy_serve is straightforward. Here's a basic example:

View File

@ -2,6 +2,7 @@ import os
import signal
import subprocess
import threading
import time
class ServerThread(threading.Thread):
@ -22,6 +23,8 @@ class ServerThread(threading.Thread):
self.process.poll()
if self.process.returncode is not None:
break
else:
time.sleep(0.2)
def stop(self):
self._stop_event.set()

8
makefile Normal file
View File

@ -0,0 +1,8 @@
clean:
rm -rf dist/
build: clean
python -m build --sdist --wheel
pub: build
twine upload dist/*

View File

@ -2,13 +2,13 @@ from setuptools import find_packages, setup
setup(
name="lazy_serve",
version="0.2",
description="A simple package for effortlessly starting HTTP servers.",
version="0.2.1",
description="A simple package for effortlessly starting multiple threaded HTTP servers.",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
author="Your Name",
author_email="your.email@example.com",
url="https://github.com/yourusername/lazy_serve",
author="Michael Pilosov",
author_email="mm@clfx.cc",
url="https://git.mlden.com/mm/lazy_serve.git",
packages=find_packages(),
install_requires=[],
python_requires=">=3.6",