{"id":49565281,"url":"https://github.com/morphisdom/morphapiwrapper","last_synced_at":"2026-05-03T11:31:20.192Z","repository":{"id":59355461,"uuid":"536825046","full_name":"morphisdom/morphapiwrapper","owner":"morphisdom","description":"Wrapper functions for creating APIs in Morphisdom","archived":false,"fork":false,"pushed_at":"2022-09-20T13:53:49.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T11:48:32.780Z","etag":null,"topics":["flask","grpc","morphisdom","python","restapi"],"latest_commit_sha":null,"homepage":"","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/morphisdom.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":"2022-09-15T01:50:10.000Z","updated_at":"2022-09-21T08:20:26.000Z","dependencies_parsed_at":"2022-09-19T13:11:05.425Z","dependency_job_id":null,"html_url":"https://github.com/morphisdom/morphapiwrapper","commit_stats":null,"previous_names":["morphisdom/morphapihelper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/morphisdom/morphapiwrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morphisdom%2Fmorphapiwrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morphisdom%2Fmorphapiwrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morphisdom%2Fmorphapiwrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morphisdom%2Fmorphapiwrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morphisdom","download_url":"https://codeload.github.com/morphisdom/morphapiwrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morphisdom%2Fmorphapiwrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32567143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: 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":["flask","grpc","morphisdom","python","restapi"],"created_at":"2026-05-03T11:31:19.047Z","updated_at":"2026-05-03T11:31:20.187Z","avatar_url":"https://github.com/morphisdom.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# morphapiwrapper\n### Wrapper functions for creating APIs in Morphisdom\n\n[![Build Status](https://travis-ci.org/joemccann/dillinger.svg?branch=master)](https://travis-ci.org/joemccann/dillinger)\n\n\nThe morphapiwrapper package contains the wrapper functions to build a API for morphisdom\n\n### Get started\nYou can install the package by running the following command\n\n```python\npip install morphapiwrapper\n```\n\nThen load the package in Python by running the following command\n```python\nfrom morphapiwrapper import app, addapproute\n```\n\n### Write your custom function\nYou can write your custom function with this package and serve it as an API in morphisdom\nYour custom function should always take two arguments. Namely _requestdata_ and _filereaderwriter_.  \n_requestdata_ is the variable which would get the data passed during the API call for the client. \nFor multiargument API in morphisdom _requestdata_ holds a list whose elements corresponds to individual arguments of the API function in sequence.\nHowever _requestdata_ can also hold string, number, boolean (for single argument API) and dictionary.\n_filereaderwriter_ is an handle for downloading GCS or remote HTTP content into localdirectory. \nif _requestdata_ contains and GCS file URI or HTTP url then the funtion _filereaderwriter.download_input_data(requestdata)_ downloads all those files and returns the name of the local files in the same order. The number of elements in _requestdata_ and _downloadeddata_ remains same.\n\n\nThe following function demonstrates a simple function to be served as a Morphisdom API.\nThe _requestdata_ is downloaded and returned as output.\n\nIn order to log billing API calls the billunit needs to be set greater than 0. \n\n```python\ndef testfunction(requestdata,filereaderwriter):\n\tdownloadeddata = filereaderwriter.download_input_data(requestdata)\n\tprint(downloadeddata)\n\tbillunit = 2\n\treturn downloadeddata,billunit\n```\n\n### Wrap your function\nOnce your function is created wrap your function in an flask app with the following code snippet\n\n```python\napp = addapproute(app, testfunction)\n```\n\nThe returned app is a flask app which has a route _/testfunction_ added in it. \nOn calling this route _testfunction_ is executed\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorphisdom%2Fmorphapiwrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorphisdom%2Fmorphapiwrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorphisdom%2Fmorphapiwrapper/lists"}