Installation¶
Requirements¶
- Python 3.9 or higher
- pip (Python package installer)
Basic Installation¶
Install RestMachine using pip:
This installs the core framework with zero required dependencies.
Optional Dependencies¶
Validation Support¶
For Pydantic-based request/response validation:
This adds:
- pydantic>=2.0.0
- For data validation and serialization
AWS Lambda Support¶
For deploying to AWS Lambda:
This includes the AWS Lambda adapter with support for: - API Gateway REST API (v1) - API Gateway HTTP API (v2) - Application Load Balancer (ALB) - Lambda Function URLs
ASGI Server (Development)¶
For running locally with an ASGI server:
Complete Installation¶
For all features:
Development Installation¶
To contribute to RestMachine:
-
Clone the repository:
-
Install in editable mode with dev dependencies:
-
Run tests:
Verify Installation¶
Verify your installation:
Or create a simple application:
from restmachine import RestApplication
app = RestApplication()
@app.get('/health')
def health_check():
return {"status": "healthy"}
# Test it
from restmachine import Request, HTTPMethod
request = Request(method=HTTPMethod.GET, path='/health')
response = app.execute(request)
print(response.body) # {"status": "healthy"}
Next Steps¶
- Quick Start → - Build your first API
- Basic Application → - Learn the fundamentals