A simple package for effortlessly starting multiple threaded HTTP servers.
Project description
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.
Installation
To install lazy_serve, simply use pip:
pip install lazy_serve
Usage
Using lazy_serve is straightforward. Here's a basic example:
import lazy_serve as lz
if __name__ == "__main__":
servers = [(8080, "~/server1/out/"), (8081, "~/server2/out/")]
lz.serve(servers)
This code will start HTTP servers on ports 8080 and 8081, serving files from ~/server1/out/
and ~/server2/out/
respectively.
Features
- Easy to Use: Start a server in just a few lines of code.
- Flexible: Serve any directory by simply specifying its path.
- Concurrent Servers: Run multiple servers at once, each on its own port.
Requirements
- Python 3.6 or higher
Contributing
Contributions to lazy_serve are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature.
- Add your feature or bug fix.
- Run the tests to ensure everything is working.
- Submit a pull request.
License
This project is licensed under the MIT License.
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
File details
Details for the file lazy_serve-0.2.post5.tar.gz
.
File metadata
- Download URL: lazy_serve-0.2.post5.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcd5cda9de172d28b862bf2218956bc234b720d387b6958c752e41bcc62cfae7 |
|
MD5 | a00396fc0171ddb2f62093644cffce0b |
|
BLAKE2b-256 | fa79dd35c0cb9897916e5f7ba73d9eb37a71bb5b8ce2bbfc8b1bad68033b0e85 |
File details
Details for the file lazy_serve-0.2.post5-py3-none-any.whl
.
File metadata
- Download URL: lazy_serve-0.2.post5-py3-none-any.whl
- Upload date:
- Size: 1.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6126663ae74f707dc9898e5ea2e50bc3026b911135052a5e3ce422c318c0b21 |
|
MD5 | f88445d1116eebe2cd41826a64b91af4 |
|
BLAKE2b-256 | 0dab899dbd90404b336230acc2ad0160705c3464cfd7902307a546d938da95ad |