{"id":24761056,"url":"https://github.com/ziozzang/generic-restful-api-server","last_synced_at":"2026-04-09T08:33:04.023Z","repository":{"id":16802607,"uuid":"19561416","full_name":"ziozzang/Generic-RESTful-API-Server","owner":"ziozzang","description":"Generic RESTful API Server using Python","archived":false,"fork":false,"pushed_at":"2014-05-08T06:21:18.000Z","size":148,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-27T09:41:28.845Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ziozzang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-08T05:15:51.000Z","updated_at":"2023-05-29T05:16:02.000Z","dependencies_parsed_at":"2022-09-24T10:23:16.838Z","dependency_job_id":null,"html_url":"https://github.com/ziozzang/Generic-RESTful-API-Server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ziozzang/Generic-RESTful-API-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziozzang%2FGeneric-RESTful-API-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziozzang%2FGeneric-RESTful-API-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziozzang%2FGeneric-RESTful-API-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziozzang%2FGeneric-RESTful-API-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ziozzang","download_url":"https://codeload.github.com/ziozzang/Generic-RESTful-API-Server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziozzang%2FGeneric-RESTful-API-Server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272965355,"owners_count":25023066,"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","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-01-28T18:20:48.010Z","updated_at":"2026-04-09T08:33:03.974Z","avatar_url":"https://github.com/ziozzang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Generic RESTful API Server\n==========================\n\nPython 으로 범용의 RESTful API 서버를 구현 해봄. Flask 와 Django 를 사용하여 구현 하였음\n\n\n알려진 이슈\n===========\n\nHTTP Response code 전달에 이슈가 있어서 현재 Django 의 경우 Error code 전달이 애매한 상황임.\n\n\n설치\n====\n\n코드는 DB 커넥션부 구현을 위하여 pysqlpool 을 사용 하고 있다. 이 모듈은 MySQL 에 대하여 커넥션 풀링을 구현하여 준다.\n\n\n```\napt-get install python-pip python-mysqldb\npip install pysqlpool\n```\n\n코드는 xml 출력을 위하여 dict2xml 을 사용 하고 있다.\n\n```\npip install dict2xml\n```\n\n테스트 클라이언트\n=================\n\n해당 서버는 Cloudstack 의 시그니처 생성 로직에 호환된다. 해당 부분을 지원하는 ucloud python 클라이언트를 통하여 테스트가 가능하다.\n\nhttps://github.com/ziozzang/ucloud\n\n\nFlask 에서 사용\n===============\n\n코드는 웹 프레임워크로 Flask 를 사용 하고 있다. 이 모듈은 Python 웹 프레임워크를 구현 하여 주고 있다.\n\n```\napt-get install python-flask\n```\n\n웹서버를 구동하기 위하여 gunicorn 을 사용 하고 있다.\n\n```\napt-get install gunicorn\n```\n\n\nDjango 에서 사용\n================\n\nDjango 에서 사용하기 위해서 다음과 같이 설정 하도록 한다.\n\n장고 설치\n\n```\npip install django\n```\n\n프로젝트 생성\n```\ndjango-admin.py startproject mysite\n```\n\n앱 설정\n```\n./manage.py startapp hello\n```\n\n- 앱 안에 views.py 를 포함한 py 소스 복사.\n- commands.py 수정\n\nurls 에 다음의 형식으로 url 설정\n\n```\n\nfrom api_server import views\nurlpatterns = patterns('',\n    url(r'^api$', views.generic_api_call)\n)\n```\n\n테스트 장고 서버 실행\n```\n./manage.py runserver 0.0.0.0:7878\n```\n\n한계점 : 오류 코드 리턴에 이슈가 있음\n\n\n테스트 API\n==========\n\n현재 테스트 API로 echo 가 있음. params 아래에 응답을 돌려주도록 되어 있음\n\n\n라이센스\n========\n\nMIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziozzang%2Fgeneric-restful-api-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fziozzang%2Fgeneric-restful-api-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziozzang%2Fgeneric-restful-api-server/lists"}