--- title: Examples Gallery description: Runnable code examples demonstrating JustAPI features — the Rust-powered FastAPI alternative. From hello world to full e-commerce APIs. keywords: [JustAPI examples, FastAPI alternative examples, Python API examples, Rust Python, JustAPI demo, API code examples] --- ## Getting Started | Example | Description | File | |---|---|---| | [Hello World](https://github.com/swadhinbiswas/JustAPI/blob/main/examples/01_hello_world.py) | Basic GET and parameterized routes | `examples/01_hello_world.py` | | [Path & Query Params](https://github.com/swadhinbiswas/JustAPI/blob/main/examples/02_path_query_params.py) | URL parameters and query strings | `examples/02_path_query_params.py` | | [Request Body](https://github.com/swadhinbiswas/JustAPI/blob/main/examples/03_request_body.py) | JSON body validation with Pydantic | `examples/03_request_body.py` | ## Core Features | Example | Description | File | |---|---|---| | [Dependencies](https://github.com/swadhinbiswas/JustAPI/blob/main/examples/04_dependencies.py) | Dependency injection with Depends | `examples/04_dependencies.py` | | [Middleware](https://github.com/swadhinbiswas/JustAPI/blob/main/examples/05_middleware.py) | Request/response interception | `examples/05_middleware.py` | | [Error Handling](https://github.com/swadhinbiswas/JustAPI/blob/main/examples/06_error_handling.py) | Custom exception handlers | `examples/06_error_handling.py` | | [File Uploads](https://github.com/swadhinbiswas/JustAPI/blob/main/examples/07_file_uploads.py) | Multipart form data | `examples/07_file_uploads.py` | | [Routers](https://github.com/swadhinbiswas/JustAPI/blob/main/examples/08_routers.py) | Modular APIRouter | `examples/08_routers.py` | | [DB Integration](https://github.com/swadhinbiswas/JustAPI/blob/main/examples/09_db_integration.py) | Database read/write | `examples/09_db_integration.py` | | [WebSockets](https://github.com/swadhinbiswas/JustAPI/blob/main/examples/10_websockets.py) | Real-time bidirectional comms | `examples/10_websockets.py` | ## Advanced | Example | Description | File | |---|---|---| | [Plugin System](https://github.com/swadhinbiswas/JustAPI/blob/main/examples/plugin_cache.py) | Custom plugin with caching | `examples/plugin_cache.py` | | [Agent Demo](https://github.com/swadhinbiswas/JustAPI/blob/main/examples/agent_demo/app.py) | MCP tools, sessions, streaming | `examples/agent_demo/app.py` | ## Full Application The [demo_shop](https://github.com/swadhinbiswas/JustAPI/tree/main/demo_shop) is a complete e-commerce application with 23 endpoints: - Catalog (categories, products, sellers) - Customers (register, lookup) - Cart (add, remove, checkout) - Orders (create, list, status lifecycle) - Reviews (CRUD, analytics) All examples are in the [`examples/`](https://github.com/swadhinbiswas/JustAPI/tree/main/examples) directory of the repository. ## See Also - [Tutorials](/tutorials/hello-world/) — Step-by-step guides - [API Reference](/api-reference/) — Complete API docs - [CLI Scaffolder](/getting-started/cli-scaffolder/) — Generate project templates