⚡ ZeroDock
Run serverless functions locally without Docker, heavy containers, or cloud deploy delays. Pure Python, sub-100ms startup.
Why ZeroDock?
If you build serverless apps (like AWS Lambda, Google Cloud Functions, or Cloudflare Workers), testing them locally is usually frustrating:
- Cloud deploy loops: You tweak one line of code, git push or run
sam deploy, and wait 2 minutes just to see if your JSON parsed right. - Heavy Docker emulators: Tools like LocalStack or SAM CLI need Docker running, eat 2GB+ of RAM, and take 30+ seconds just to start up.
ZeroDock takes a different approach:
Instead of running an entire virtual machine or container, it runs your Python handlers directly on your machine using Python's native importlib and an ultra-fast async HTTP gateway (built on FastAPI and Uvicorn).
- ⚡ Starts in <100ms and uses less than 50MB of RAM.
- 📦 No Docker required — pure, native Python.
- 🐛 Real breakpoints work — drop
breakpoint()into your handler and step through your code line by line in your terminal or IDE. - 📄 Simple declarative config — one small YAML file defines all your routes and handlers.
Quickstart (Under 2 Minutes)
1. Install ZeroDock
We recommend installing in a virtual environment:
# Create and activate a virtual environment (optional but recommended)
python -m venv .venv
# On Windows: .venv\Scripts\activate
# On macOS/Linux: source .venv/bin/activate
pip install zerodock
(If you use uv: uv add zerodock)
2. Create Your Config (serverless-local.yaml)
In your project root, create a file named serverless-local.yaml:
version: "1.0"
gateway:
host: "127.0.0.1"
port: 8080
routes:
api/hello:
file: "./functions/hello.py"
handler: "lambda_handler"
methods: ["GET", "POST"]
api/users:
file: "./functions/users.py"
handler: "handle_users"
methods: ["GET"]
3. Write a Handler (functions/hello.py)
Create functions/hello.py:
def lambda_handler(event, context):
# Read query parameters (?name=Alice)
params = event.get("queryStringParameters") or {}
name = params.get("name", "World")
# Read JSON body for POST requests
body = event.get("body")
return {
"statusCode": 200,
"headers": {"Content-Type": "application/json"},
"body": {
"message": f"Hello, {name}!",
"payload_received": body,
"time_remaining_ms": context.get_remaining_time_in_millis()
}
}
4. Start the Gateway
zerodock dev
You'll see:
INFO: Started server process
INFO: Uvicorn running on http://127.0.0.1:8080 (Press CTRL+C to quit)
5. Test Your Endpoint!
Open your browser or run:
curl "http://localhost:8080/api/hello?name=Developer"
Response:
{
"message": "Hello, Developer!",
"payload_received": null,
"time_remaining_ms": 30000
}
CLI Reference
| Command / Flag | What it does | Default |
|---|---|---|
zerodock dev |
Start the local serverless HTTP gateway | Uses serverless-local.yaml |
-p, --port <PORT> |
Change the listening port | 8080 (or config file value) |
--host <HOST> |
Change the bind IP address | 127.0.0.1 |
-c, --config <PATH> |
Path to your configuration YAML file | serverless-local.yaml |
--log-level <LEVEL> |
Set verbosity (debug, info, warning, error) |
info |
-v, --version |
Display installed ZeroDock version | — |
-h, --help |
Show complete command options | — |
Pro Tip: If the zerodock command isn't recognized directly in your terminal, you can always run:
python -m zerodock.cli dev
Writing Handlers: The Event & Context Objects
ZeroDock handlers match the standard serverless function signature:
def my_handler(event, context):
...
(Both synchronous def and asynchronous async def handlers are fully supported!)
The event Object
The event dictionary provides incoming request data:
event["httpMethod"]— HTTP method ("GET","POST","PUT","DELETE", etc.).event["path"]— The URL path (e.g."/api/hello").event["queryStringParameters"]— Dictionary of URL query parameters ({"name": "Alice"}), orNoneif no query string was sent.event["headers"]— Dictionary of incoming HTTP headers (with lowercase keys for easy lookup).event["body"]— The parsed JSON dictionary if JSON was sent, or a raw string if plain text.
The context Object
The context object supplies runtime execution metadata:
context.function_name— Name of the handler being executed.context.memory_limit_in_mb— Memory limit in MB (default:128).context.get_remaining_time_in_millis()— Remaining time before request timeout (in milliseconds).
What Your Handler Can Return
ZeroDock is designed to be developer-friendly. You can return responses in three ways:
- Standard Serverless Dict (Recommended):
return { "statusCode": 200, "headers": {"Content-Type": "application/json"}, "body": {"status": "success"} }
- Status Code and Body Tuple:
return 201, {"id": "item_123", "created": True}
- Plain Dict or String (Auto-wrapped in HTTP 200):
return {"status": "ok"} # or return "Hello from serverless!"
Native Debugging: The Game Changer
Because ZeroDock runs your code directly on your computer's Python interpreter, you get native host debugging. No container attachments, no remote debugging proxies.
Just drop breakpoint() anywhere in your handler:
def lambda_handler(event, context):
name = event.get("queryStringParameters", {}).get("name")
breakpoint() # <-- Execution pauses right here!
return {"statusCode": 200, "body": {"name": name}}
When you send an HTTP request, execution pauses instantly in your terminal with the interactive Python debugger (pdb). You can inspect variables, evaluate expressions, and step through line by line.
If you use VS Code or PyCharm, you can also set standard graphical red-dot breakpoints!
🛠️ Common Errors & Troubleshooting
Here are the most common things developers encounter and how to fix them in seconds:
1. zerodock : The term 'zerodock' is not recognized... (Windows)
- Why it happens: When you install packages globally on Windows (
pip install zerodock), Python puts the.exescript into your userScriptsdirectory (e.g.,AppData\Local\...\Scripts), which is often missing from your WindowsPATH. - Fix 1 (Instant): Run via Python directly:
python -m zerodock.cli dev
- Fix 2 (Best Practice): Use a virtual environment (
python -m venv .venvand.\.venv\Scripts\activate). Virtual environments automatically add theirScriptsfolder to your PATH, sozerodock devworks everywhere. - Fix 3 (Permanent): Add Python's Scripts folder to your User PATH in Windows Settings.
2. Address already in use or Port 8080 Conflict
- Why it happens: Another application (Docker, Tomcat, another web server) is already listening on port 8080.
- The fix: Tell ZeroDock to use a different port:
zerodock dev --port 8081
Or change the port inserverless-local.yamlundergateway.port.
3. ConfigurationError: Could not find configuration file: serverless-local.yaml
- Why it happens: You ran
zerodock devfrom a folder that doesn't contain yourserverless-local.yaml. - The fix: Either
cdinto the folder whereserverless-local.yamllives, or point to it explicitly:zerodock dev --config ./path/to/serverless-local.yaml
4. HandlerLoadError: Handler file './functions/hello.py' not found
- Why it happens: The file path inside
serverless-local.yamldoesn't match where your.pyfile is stored relative to your working directory. - The fix: Check the
file:entry in your YAML file and verify that the file exists at that exact relative path.
5. HandlerLoadError: Function 'lambda_handler' not found in module
- Why it happens: The
handler:name inserverless-local.yamldoesn't match the function name defined in your Python file. - The fix: Check your
.pyfile and make sure the function name matcheshandler: "my_function_name".
6. Handlers Crashing with 500 Internal Server Error
- When your handler code has an unhandled exception (like a
KeyErrororValueError), ZeroDock displays the full, colored Python traceback in your terminal and returns an HTTP 500 response with error details in the JSON body, keeping the gateway running without crashing.
👉 For more in-depth solutions, platform quirks, and error walkthroughs, check our complete TROUBLESHOOTING.md guide.
🗺️ Roadmap & What's Coming
ZeroDock is actively developed! Here is what is on the roadmap:
- 🔥 Hot-Reloading File Watcher (Sprint 2): Automatically reload handlers when you save
.pyfiles without restarting the server. - 🔐 Local Secrets &
.envLoader (FEAT-008): Automatically inject environment variables into your handlers from.envfiles. - ☁️ Full Cloud Adapters (FEAT-005 - FEAT-007): AWS Lambda full context emulation, Cloudflare Workers Fetch API, and Google Cloud Functions CloudEvents.
- 🗄️ Local Cloud Service Mocks (FEAT-009 - FEAT-012): In-memory S3 bucket and DynamoDB/KV stores.
🤝 Contributing
We love contributions from developers of all experience levels! Please read our CONTRIBUTING.md for guidelines on setting up your local environment and submitting a Pull Request.
📄 License
ZeroDock is open-source software licensed under the MIT License.
Metadata
Release files for zerodock 0.1.1
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 |
|---|---|---|---|---|
| zerodock-0.1.1.tar.gz | 18.6 kB | With provenance | Details for zerodock-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zerodock-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for zerodock-0.1.1-py3-none-any.whl |
Total release size: 37.9 kB
Release files / zerodock-0.1.1.tar.gz
| Download URL | zerodock-0.1.1.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68daed60d135f5aad24836b0f25bb675c55f1d94491f95e3bec507ec7d6c795a
|
|
BLAKE2b-256 checksum How to use checksums |
b586b464b40185eaa102606d5abae28c695ad740539e09f362b7a3ef086d9262
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / zerodock-0.1.1-py3-none-any.whl
| Download URL | zerodock-0.1.1-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2eb9ae2f79adfe3af1544b9a69cbe8548f735ed1921df8ec4fe8fd96978053a2
|
|
BLAKE2b-256 checksum How to use checksums |
3de54a1cc4eeb6bf2492a5997445647c7c4dd23ea3ee2c1c3d7ffc8da9d94e61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logSecurity for zerodock 0.1.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for zerodock-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logA 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.