Overview
Sappy is a simple, single-page application (SPA) web server for end-to-end testing.
The Python standard library includes a web server that works great for serving up files:
$ python3 -m http.server 8080
Serving HTTP on 0.0.0.0 port 8080 ...
$ curl http://localhost:8080/index.html
<!DOCTYPE html>
<html>
<head>
<title>Example Index</title>
...
But when used to serve up single-page applications, a 404 is returned whenever any page other than the index is accessed directly:
$ curl http://localhost:8080/login
<!DOCTYPE html>
<html lang=en>
<title>Error 404 (Not Found)</title
...
This project builds on the existing web server code to forward all requests to the index. The single-page application’s client-side routing can then display the page that corresponds to that request’s URL.
Setup
Requirements
- Python 3.10+
Installation
Install this tool globally with pipx (or pip):
$ pipx install sappy
or add it to your Poetry project:
$ poetry add sappy
Usage
Build your static website (e.g. an Ember application) for production:
$ ember build --environment=production
Building...
Built project successfully. Stored in "dist/".
Then serve up the application:
$ sappy
Serving /home/browning/project/dist/ on 8080
Check out the documentation or command-line help for additional options:
$ sappy --help
Metadata
Release files for sappy 1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sappy-1.4.tar.gz | 5.2 kB | Without provenance | Details for sappy-1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sappy-1.4-py3-none-any.whl | Python 3 | none | any | Details for sappy-1.4-py3-none-any.whl |
Total release size: 12.1 kB
Release files / sappy-1.4.tar.gz
| Download URL | sappy-1.4.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d476e0e3477d00ed083bf41188d37a938d1818e9cf52fff24affac5a485d2d47
|
|
BLAKE2b-256 checksum How to use checksums |
0b9fb30c48896e4849af2564bca3093f74805eb1b61a69473ca6d15c30135449
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.15.0 Darwin/24.6.0
|
Release files / sappy-1.4-py3-none-any.whl
| Download URL | sappy-1.4-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c7ddbd6233e4574eaa8ec7cce43c05f93fd52084aceee811ca0772290164841
|
|
BLAKE2b-256 checksum How to use checksums |
8be1a43ff013e01c62902773fa0fd6b8d26c85cf00aa6670fc4a5b7b37b81ee8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.15.0 Darwin/24.6.0
|
Security for sappy 1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.