{"id":15144615,"url":"https://github.com/janipalsamaki/spacex-robot","last_synced_at":"2026-03-09T20:31:39.561Z","repository":{"id":79481496,"uuid":"240267079","full_name":"janipalsamaki/spacex-robot","owner":"janipalsamaki","description":"Tutorial for creating a software robot for fetching data from SpaceX API.","archived":false,"fork":false,"pushed_at":"2020-04-03T07:30:44.000Z","size":14,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-24T09:23:12.517Z","etag":null,"topics":["robot-framework","robotframework","tutorial"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janipalsamaki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-02-13T13:29:49.000Z","updated_at":"2022-01-17T00:51:31.000Z","dependencies_parsed_at":"2023-04-16T06:33:02.103Z","dependency_job_id":null,"html_url":"https://github.com/janipalsamaki/spacex-robot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/janipalsamaki/spacex-robot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janipalsamaki%2Fspacex-robot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janipalsamaki%2Fspacex-robot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janipalsamaki%2Fspacex-robot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janipalsamaki%2Fspacex-robot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janipalsamaki","download_url":"https://codeload.github.com/janipalsamaki/spacex-robot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janipalsamaki%2Fspacex-robot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30310755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["robot-framework","robotframework","tutorial"],"created_at":"2024-09-26T10:42:36.013Z","updated_at":"2026-03-09T20:31:39.521Z","avatar_url":"https://github.com/janipalsamaki.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"---\nid: http-api-robot-tutorial\ntitle: HTTP API robot tutorial\ndescription: Tutorial for creating a software robot for fetching data from SpaceX API using Robot Framework and RPA Framework.\n---\n\n![SpaceX logo](spacex-logo.png)\n\nThis simple software robot fetches and logs the latest launch data from [SpaceX API](https://github.com/r-spacex/SpaceX-API) using [RPA Framework](https://rpaframework.org/).\n\n## Prerequisites\n\n\u003e To complete this tutorial, you need a working [Python](https://www.python.org/) (version 3) installation. On macOS / Linux, you can open the terminal and try running `python3 --version` to check if you have the required Python installed. On Windows, you can open the command prompt and try running `py --version` to check if you have the required Python installed.\n\n## Create a directory for your software robot projects\n\nCreate a directory for your software robot projects. If you already have an existing directory for your projects, you can use that.\n\n## Set up a virtual Python environment\n\nNavigate to your projects directory in the terminal or the command prompt. Set up a virtual Python environment by running the following command:\n\nWindows:\n\n```\npy -m venv venv\n```\n\nmacOS / Linux:\n\n```bash\npython3 -m venv venv\n```\n\nActivate the Python virtual environment:\n\nWindows:\n\n```\nvenv\\Scripts\\activate\n```\n\nmacOS / Linux:\n\n```bash\n. venv/bin/activate\n```\n\n## Install Robocode CLI\n\n```bash\npip install robocode\n```\n\n## Initialize the software robot directory\n\n```bash\nrobo init http-api\n```\n\nNavigate to the directory:\n\n```bash\ncd http-api\n```\n\n## Install RPA Framework\n\n```bash\npip install rpa-framework\n```\n\n## Robot task file\n\nPaste the following Robot Framework code in the `tasks/robot.robot` file:\n\n```robot\n*** Settings ***\nDocumentation   HTTP API robot. Retrieves data from SpaceX API. Demonstrates\n...             how to use RPA.HTTP (create session, get response, validate\n...             response status, pretty-print, get response as text, get\n...             response as JSON, access JSON properties, etc.).\nResource        keywords.robot\nSuite Setup     Setup\nSuite Teardown  Teardown\n\n*** Tasks ***\nLog latest launch info\n    Log latest launch\n\n```\n\n## Robot keywords file\n\nPaste the following Robot Framework code in the `resources/keywords.robot` file:\n\n```robot\n*** Settings ***\nLibrary     RPA.HTTP\nVariables   variables.py\n\n*** Keywords ***\nSetup\n    Create Session  spacex  ${SPACEX_API_BASE_URL}  verify=True\n\nTeardown\n    Delete All Sessions\n\nLog latest launch\n    ${launch}=  Get latest launch\n    Log info    ${launch}\n\nGet latest launch\n    ${response}=  Get Request     spacex        ${SPACEX_API_LATEST_LAUNCHES}\n    Request Should Be Successful  ${response}\n    Status Should Be              200           ${response}\n    [Return]      ${response}\n\nLog info\n    [Arguments]       ${response}\n    ${pretty_json}=   To Json   ${response.text}  pretty_print=True\n    ${launch}=        Set Variable  ${response.json()}\n    Log To Console    ${pretty_json}\n    Log To Console    ${launch[\"mission_name\"]}\n    Log To Console    ${launch[\"rocket\"][\"rocket_name\"]}\n\n```\n\n## Variables file\n\nPaste the following Python code in the `variables/variables.py` file:\n\n```py\nSPACEX_API_BASE_URL = \"https://api.spacexdata.com/v3\"\nSPACEX_API_LATEST_LAUNCHES = \"/launches/latest\"\n\n```\n\n## Wrap the robot\n\n```bash\nrobo wrap\n```\n\n## Run the robot\n\nWindows:\n\n```\nrobo run entrypoint.cmd\n```\n\nmacOS / Linux:\n\n```bash\nrobo run entrypoint.sh\n```\n\nExample response (cropped):\n\n```json\n{\n    \"crew\": null,\n    \"details\": \"This mission will launch the third batch of Starlink version 1.0 satellites, from SLC-40, Cape Canaveral AFS. It is the fourth Starlink launch overall. The satellites will be delivered to low Earth orbit and will spend a few weeks maneuvering to their operational altitude of 550 km. The booster for this mission is expected to land on OCISLY.\",\n    \"flight_number\": 89,\n    \"is_tentative\": false,\n    \"last_date_update\": \"2020-01-29T14:07:07.000Z\",\n    \"last_ll_launch_date\": \"2020-01-29T14:06:00.000Z\",\n    \"last_ll_update\": \"2020-01-29T14:07:07.000Z\",\n    ...\n    \"mission_id\": [],\n    \"mission_name\": \"Starlink 3\",\n    \"rocket\": {\n        \"fairings\": {\n            \"recovered\": true,\n            \"recovery_attempt\": true,\n            \"reused\": false,\n            \"ship\": \"GOMSTREE\"\n        },\n        \"first_stage\": {\n            \"cores\": [\n                {\n                    \"block\": 5,\n                    \"core_serial\": \"B1051\",\n                    \"flight\": 3,\n                    \"gridfins\": true,\n                    \"land_success\": true,\n                    \"landing_intent\": true,\n                    \"landing_type\": \"ASDS\",\n                    \"landing_vehicle\": \"OCISLY\",\n                    \"legs\": true,\n                    \"reused\": true\n                }\n            ]\n        },\n        \"rocket_id\": \"falcon9\",\n        \"rocket_name\": \"Falcon 9\",\n        ...\n}\n```\n\n## Summary\n\nYou executed a simple software robot that fetches data from an API. Congratulations!\n\nDuring the process, you learned some basic features of the [RPA Framework](https://pypi.org/project/rpa-framework/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanipalsamaki%2Fspacex-robot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanipalsamaki%2Fspacex-robot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanipalsamaki%2Fspacex-robot/lists"}