Source: https://dev-docs.nebula-graph.io/v5.3.2/app-development/ Documentation version: v5.3.2 # Application tutorials Use the existing `movie` dataset to build a movie cast service. The application accepts a movie ID and returns JSON with the movie name and its actors through `GET /movies/{movie_id}/actors`. ## Audience These tutorials are for developers who know basic Python and want to use database queries in an application. They use FastAPI to provide an HTTP endpoint; no previous knowledge of the framework is required. The examples read existing data without creating or modifying graph data. ## Choose a connection method | Tutorial | NebulaGraph Database Developer Edition connection | Main topics | [Build a service with the Python SDK](https://dev-docs.nebula-graph.io/v5.3.2/app-development/python-sdk/) | Python SDK, port `9669` | Execute queries through a client and read result sets | [Build a service with the REST API](https://dev-docs.nebula-graph.io/v5.3.2/app-development/rest-api/) | HTTP, port `19669` (preview feature) | Obtain a JWT token, send query requests, and read responses Both tutorials implement the same application endpoint; choose either one. Start with the Python SDK for your first example, or choose the REST API to access NebulaGraph Database Developer Edition over HTTP. Both provide complete code to download. ## Prepare NebulaGraph Database Developer Edition 1. Start NebulaGraph Database Developer Edition by following [Deploy Developer Edition with Docker Compose](https://dev-docs.nebula-graph.io/v5.3.2/get-started/deploy/). 2. Follow [Connect and run your first query](https://dev-docs.nebula-graph.io/v5.3.2/get-started/first-query/) to load `movie` and confirm that you can query movie ID `3` and its actors. Reuse the data if it is already loaded. 3. Have a NebulaGraph Database Developer Edition username and password ready. For local practice, use `root` with the actual password set during deployment; see [Set the root password](https://dev-docs.nebula-graph.io/v5.3.2/get-started/deploy/#root-password) for settings and escaping rules. If you changed the password, use the new one. The examples query `/default_schema/movie`. If the data is in another Schema, update the graph path in both queries in the example file. ## Request flow ```` flowchart LR caller["Browser or curl"] -->|"HTTP · 8100"| app["Movie cast service
FastAPI"] app -->|"Python SDK · 9669
or REST API · 19669"| database["Graph database
movie graph"] ```` A browser or `curl` calls the application on port `8100`; the application then accesses NebulaGraph Database Developer Edition. The application validates movie IDs, runs queries, and returns JSON. It stores and uses the NebulaGraph Database Developer Edition credentials and JWT tokens. The example application listens on `127.0.0.1`, so you can access it from the application computer. If you run it remotely over SSH, follow the port forwarding instructions in the tutorial you choose.