This release is a pre-release and may not be stable for production use.
srcviewserver
A simple HTTP server that serves source files with syntax highlighting.
Source files with a recognized language extension are highlighted and wrapped in an HTML page.
All other files are served as-is (binary streaming). Directories get an HTML listing.
Installation
pip install srcviewserver
Usage
srcviewserver [--port PORT] [--host HOST]
| Option | Default | Description |
|---|---|---|
--host |
127.0.0.1 |
Host/IP address to bind to. |
--port -p |
8000 |
Port to listen on. |
Navigate to http://127.0.0.1:8000/ and browse the directory tree.
Testing
A self-contained smoke test exercises the response-building functions (directory listing, syntax highlighting, binary streaming, HEAD, and error responses):
python -m test.smoke_test
Run it with either Python 2 or Python 3 from the repository root.
Contributing
Contributions are welcome! Please submit pull requests or open issues on the GitHub repository.
License
This project is licensed under the MIT License.
Release files for srcviewserver 0.1.0a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| srcviewserver-0.1.0a2.tar.gz | 6.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| srcviewserver-0.1.0a2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 13.5 kB
Release files / srcviewserver-0.1.0a2.tar.gz
| Download URL | srcviewserver-0.1.0a2.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2498aff9455660e88726dc839f7cf46257101d2dfcf5c1740619cd7c8aa87403
|
|
BLAKE2b-256 checksum How to use checksums |
af52aaed7e2f554f48d8ca8cb1b40cf8da74f3321a5e47bfdf6ab589416843ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / srcviewserver-0.1.0a2-py2.py3-none-any.whl
| Download URL | srcviewserver-0.1.0a2-py2.py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
34c9570aa3a465cb527841fb9565f26973552e12f6ff376206e3890c88a5a87e
|
|
BLAKE2b-256 checksum How to use checksums |
11071a353dc5fa7b0f849a9547659b49e765167890d9e17a63243f55f937bbb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|