{"id":19533601,"url":"https://github.com/ynsrc/python-simple-rest-api","last_synced_at":"2025-09-13T15:43:24.062Z","repository":{"id":238056776,"uuid":"795776744","full_name":"ynsrc/python-simple-rest-api","owner":"ynsrc","description":"Simple REST API Example with pure Python","archived":false,"fork":false,"pushed_at":"2024-05-04T03:25:04.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T17:24:53.416Z","etag":null,"topics":["api-server","json","json-server","python-api","python-rest-api","rest","rest-api","restful-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ynsrc.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}},"created_at":"2024-05-04T03:09:35.000Z","updated_at":"2024-05-09T05:22:34.000Z","dependencies_parsed_at":"2024-05-04T04:25:31.296Z","dependency_job_id":"449c37ea-6d76-45b6-a7c0-a22e67b35852","html_url":"https://github.com/ynsrc/python-simple-rest-api","commit_stats":null,"previous_names":["ynsrc/python-simple-rest-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ynsrc%2Fpython-simple-rest-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ynsrc%2Fpython-simple-rest-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ynsrc%2Fpython-simple-rest-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ynsrc%2Fpython-simple-rest-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ynsrc","download_url":"https://codeload.github.com/ynsrc/python-simple-rest-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240788778,"owners_count":19857695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["api-server","json","json-server","python-api","python-rest-api","rest","rest-api","restful-api"],"created_at":"2024-11-11T02:08:47.237Z","updated_at":"2025-02-26T03:42:29.587Z","avatar_url":"https://github.com/ynsrc.png","language":"Python","readme":"# Simple REST API with pure Python\n\nThis is an example REST API project.\n\n## Run\n```\n# python server.py\n```\n\nDefault port is 5000, you can change it in `server.py`.\n\n## Index\n```\n$ curl \"http://127.0.0.1:5000/\"\n{\n    \"name\": \"Python REST API Example\",\n    \"summary\": \"This is simple REST API architecture with pure Python\",\n    \"actions\": [\n        \"add\",\n        \"delete\",\n        \"list\",\n        \"search\"\n    ],\n    \"version\": \"1.0.0\"\n}\n```\n\n## List Items\n```\n$ curl \"http://127.0.0.1:5000/list\"\n{\n    \"count\": 3,\n    \"items\": [\n        {\n            \"id\": 1000,\n            \"name\": \"cat\",\n            \"description\": \"cat is meowing\"\n        },\n        {\n            \"id\": 1001,\n            \"name\": \"dog\",\n            \"description\": \"dog is barking\"\n        },\n        {\n            \"id\": 1002,\n            \"name\": \"bird\",\n            \"description\": \"bird is singing\"\n        }\n    ]\n}\n```\n\n## Search\n```\n$ curl \"http://127.0.0.1:5000/search?q=d\"\n{\n    \"count\": 2,\n    \"items\": [\n        {\n            \"id\": 1001,\n            \"name\": \"dog\",\n            \"description\": \"dog is barking\"\n        },\n        {\n            \"id\": 1002,\n            \"name\": \"bird\",\n            \"description\": \"bird is singing\"\n        }\n    ]\n}\n```\n\n## Delete Item\n```\n$ curl \"http://127.0.0.1:5000/delete\" -H \"Content-Type: application/json\" -d '{\"id\": 1001}'\n{\n    \"deleted\": 1001\n}\n```\n\n## Add Item\n```\n$ curl \"http://127.0.0.1:5000/add\" -H \"Content-Type: application/json\" \\\n\u003e -d '{\"name\": \"fish\", \"description\": \"fish is swimming\"}'\n{\n    \"id\": 1005,\n    \"name\": \"fish\",\n    \"description\": \"fish is swimming\"\n}\n```\n\n## List Again\n```\n$ curl \"http://127.0.0.1:5000/list\"\n{\n    \"count\": 3,\n    \"items\": [\n        {\n            \"id\": 1000,\n            \"name\": \"cat\",\n            \"description\": \"cat is meowing\"\n        },\n        {\n            \"id\": 1002,\n            \"name\": \"bird\",\n            \"description\": \"bird is singing\"\n        },\n        {\n            \"id\": 1003,\n            \"name\": \"fish\",\n            \"description\": \"fish is swimming\"\n        }\n    ]\n}\n```\n\n\n# License\nThe Unlicense. Feel free to use or change it how you need.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fynsrc%2Fpython-simple-rest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fynsrc%2Fpython-simple-rest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fynsrc%2Fpython-simple-rest-api/lists"}