Skip to main content

ZeroDock

Run Python serverless-style HTTP handlers locally, without Docker or a cloud deployment.

PyPI CI License: MIT

ZeroDock maps routes from a small YAML file to Python functions. It runs those functions in your local Python process and returns their results over HTTP.

What it provides

  • A local HTTP gateway with synchronous and asynchronous Python handlers.
  • A configuration file for routes, methods, entrypoints, and request timeouts.
  • Opt-in, in-process hot reload (--reload) of configured handler source files.
  • Automatic .env.local / .env secrets loading (os.environ, event["stageVariables"], and context.client_context).
  • Built-in local object storage mock (LocalStorageMock, .zerodock/buckets/, and optional storage.buckets config).
  • Rich Terminal UI startup route table and live latency monitor (with --plain / --no-color fallback).
  • Native Python debugging and structured development error responses.

ZeroDock is a local development tool, not a complete cloud emulator or a sandbox. Additional cloud adapters and other languages are future work. See the roadmap and security notes.

Installation and release status

The package declares Python 3.10 or later. Actual validation coverage and dependency limitations are documented in Performance and validation.

Create a virtual environment:

python -m venv .venv

Activate it in Windows PowerShell:

.\.venv\Scripts\Activate.ps1

Or in macOS/Linux shells:

source .venv/bin/activate

Install a published release:

python -m pip install zerodock

This documentation describes the current checkout. A published release may not contain every feature shown here. To use the current source instead, run the following from your cloned repository:

python -m pip install -e .

Use python -m zerodock.cli --version and python -m zerodock.cli dev --help to inspect the environment you are actually using. Contributor setup is covered in CONTRIBUTING.md.

Quickstart

1. Create one handler

In your project directory, create a functions directory and save this as functions/hello.py:

def lambda_handler(event, context):
    parameters = event.get("queryStringParameters") or {}
    name = parameters.get("name", "World")
    return {
        "statusCode": 200,
        "body": {"message": f"Hello, {name}!"},
    }

2. Configure its route

Save this as serverless-local.yaml beside the functions directory:

version: "1.0"
gateway:
  host: "127.0.0.1"
  port: 8080
routes:
  /api/hello:
    file: "./functions/hello.py"
    handler: "lambda_handler"
    methods: ["GET"]

Handler paths are relative to the configuration file, not necessarily the directory where the command is run. Every configured handler file must exist at startup.

3. Start the gateway

From the directory containing that configuration:

python -m zerodock.cli dev

Open this URL in a browser:

http://127.0.0.1:8080/api/hello?name=Developer

Expected JSON response:

{"message": "Hello, Developer!"}

Press Ctrl+C in the server terminal to stop the gateway.

4. Enable reload when available

If dev --help lists --reload, restart with:

python -m zerodock.cli dev --reload

Change the handler's greeting, save the file, wait for the invalidation log, and request the same URL again. The running process and port stay unchanged.

Reload is disabled by default and watches configured handler files only. Imported helpers, dependencies, configuration changes, and new routes may require a restart. See Hot reload and debugging for the full contract.

Command reference

After installation, zerodock and python -m zerodock.cli are equivalent entrypoints.

Command or option Behavior
zerodock dev Start using serverless-local.yaml
zerodock dev --reload Enable in-process handler observation
dev -c PATH, dev --config PATH Use another configuration file
dev --host HOST Override the configured bind address
dev -p PORT, dev --port PORT Override the configured port
dev --log-level LEVEL Select debug, info, warning, or error logging
zerodock --version Print the installed/resolved package version
zerodock --help, zerodock dev --help Show available options

With no subcommand, ZeroDock uses default startup with reload disabled. zerodock --reload is not supported; the flag belongs to dev.

Status and limitations

Functional handler reload is implemented in this checkout. Cross-runtime startup and dispatch reliability remain under investigation. The approved baseline memory limit is below 60 decimal MB of current server RSS; below 50MB remains an optimization target. These are scoped baseline measurements, not promises for arbitrary handlers.

Read Performance and validation for exact boundaries, recorded results, and environments that have not been tested.

Documentation

License

ZeroDock is released under the MIT License.

Metadata

Release files for zerodock 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zerodock 0.2.0
File Size Uploaded Provenance Actions
zerodock-0.2.0.tar.gz 21.9 kB With provenance Details for zerodock-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zerodock 0.2.0
File Interpreter ABI Platform Actions
zerodock-0.2.0-py3-none-any.whl Python 3 none any Details for zerodock-0.2.0-py3-none-any.whl

Total release size: 48.5 kB

Release files / zerodock-0.2.0.tar.gz

Download URL zerodock-0.2.0.tar.gz
Size 21.9 kB
Tags Source
SHA-256 checksum
How to use checksums
95aceaa0e2d80970722b988dc947a5a9bd8b1ebfe90264882c52b918822e3893
BLAKE2b-256 checksum
How to use checksums
8395bb5b7fddc56591fc7330fa9ced485b50fcb3cda7a3b7186ad8dee69c5c6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 28, 2026.

Transparency log

Release files / zerodock-0.2.0-py3-none-any.whl

Download URL zerodock-0.2.0-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62c652bc6222daceb7a476d34ba5d2caec91c93b03921f24d1f35132e2c2aef8
BLAKE2b-256 checksum
How to use checksums
ac8577fab5f4848311e4dee47ba4520600faafa5d979c583d924adf492fb60c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 28, 2026.

Transparency log

Security for zerodock 0.2.0

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.

Select from 2 files

Attestation for zerodock-0.2.0.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 Nov 28, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page