Skip to content
MustakimShaikh01Public

About

JetPort is a local ASGI development server with automatic TLS for localhost, request capture, a minimal inspector UI, and a request replay helper.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

# JetPort

JetPort is a **blazing-fast local HTTP/WS development server** with built-in TLS, a request inspector, and request replay functionality.  
It's like Uvicorn — but designed specifically for debugging, testing, and running secure local environments.


---

## Features

- **Automatic TLS on localhost** — no more manual cert setup.
- **Request/response inspector** — view requests live in your browser.
- **Request replay** — resend captured requests for debugging or CI pipelines.
- **ASGI compatible** — works with FastAPI, Starlette, Django, or any ASGI app.
- **CLI ready** — `jetport run example_app:app` spins up your app instantly.
- **CI friendly** — can be used in pipelines for webhook testing (Stripe, GitHub, etc.).

---

## Installation

Clone the repo and install in editable mode:

```bash
git clone <your-repo-url> jetport
cd jetport
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install uvicorn typer cryptography httpx aiofiles jinja2
pip install -e .

Running JetPort

Run any ASGI app with TLS enabled automatically:

jetport run example_app:app

Since the certificate is self-signed, your browser will show a warning — click Advanced → Proceed to continue.


Example App

The included example_app.py is a minimal ASGI app to test JetPort:

async def app(scope, receive, send):
    assert scope['type'] == 'http'
    await send({
        'type': 'http.response.start',
        'status': 200,
        'headers': [(b'content-type', b'text/plain')],
    })
    await send({
        'type': 'http.response.body',
        'body': b'Hello from JetPort!',
    })

You can replace this with FastAPI, Starlette, or any ASGI framework.


Running Tests

JetPort uses unittest for testing:

python -m unittest

Example test (tests/test_sanity.py):

import unittest

class SanityTest(unittest.TestCase):
    def test_basic(self):
        self.assertEqual(1 + 1, 2)

if __name__ == "__main__":
    unittest.main()

Roadmap

  • WebSocket request capture & replay
  • React-based inspector UI with live updates
  • Richer CI integration (Docker image + GitHub Actions)
  • PyPI release

About

JetPort is a local ASGI development server with automatic TLS for localhost, request capture, a minimal inspector UI, and a request replay helper.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages