{"id":17132964,"url":"https://github.com/cutwell/easy-python-remote-interfaces","last_synced_at":"2025-09-13T13:05:16.344Z","repository":{"id":89428334,"uuid":"104268400","full_name":"Cutwell/easy-python-remote-interfaces","owner":"Cutwell","description":"RESTful API's using Python Modules","archived":false,"fork":false,"pushed_at":"2021-01-31T15:50:40.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T05:44:15.488Z","etag":null,"topics":["ajax","api-wrapper"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Cutwell.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":"2017-09-20T21:14:40.000Z","updated_at":"2021-01-31T15:50:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"88bb8fe8-1d2c-4342-9e8d-9716a875c114","html_url":"https://github.com/Cutwell/easy-python-remote-interfaces","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Cutwell/easy-python-remote-interfaces","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cutwell%2Feasy-python-remote-interfaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cutwell%2Feasy-python-remote-interfaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cutwell%2Feasy-python-remote-interfaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cutwell%2Feasy-python-remote-interfaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cutwell","download_url":"https://codeload.github.com/Cutwell/easy-python-remote-interfaces/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cutwell%2Feasy-python-remote-interfaces/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268133552,"owners_count":24201373,"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-07-31T02:00:08.723Z","response_time":66,"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":["ajax","api-wrapper"],"created_at":"2024-10-14T19:29:00.699Z","updated_at":"2025-07-31T23:03:49.289Z","avatar_url":"https://github.com/Cutwell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Easy-Python-Remote-Interfaces\n---\n\n1. Download the package and run setup.py to install the module.\n```bash\n$ python3 setup.py install\n```\n2. Then insert this statement to the end of your module to run it as an API.\n```python\nif __name__ == \"__main__\":\n    from APyI import run\n    run(function, args=())\n```\n\n### Function arguments\nWhen calling the API.run method, you must pass the target function object as well as the arguments this function takes.\nIf you intend to call the API through JQuery Ajax, you must pass the name of each argument inside the args tuple, e.g.:\n```python\nrun(function_name, args=(\"string\", \"integer\"))\n```\n - Note: if you only intend to call the API via the URL method, you can leave args blank.\n\n### Server options\nYou can specify a variety of arguments when executing the run command. These arguments can be used for both the command line and scripted forms of APyI, as they are effectively the same code.\n\nAll arguments can be specified as key word arguments, e.g.:\n```python\nrun(function, args=(), ip=\"127.0.0.1\", port=5000)\n```\n\n\n#### Required arguments\n| Action | Example Usage |\n| :-: | :-: |\n| Specify a function target for API | APyI.API.run(function_name) |\n| Specify the arguments the function uses | APyI.API.run(args=(\"string\", \"integer\")) |\n\n#### Optional arguments\n| Action | Example Argument | Default |\n| :-: | :-: | :-: |\n| Specify IP to host API from | ip=\"127.0.0.1\" | ip=\"localhost\" |\n| Specify port to host API from | port=8080 | port=5000 |\n| Change argument separator | separator=\"\\_\" | separator=\"+\" |\n\n\n### Making API requests\nYou can make a request to the server the same way you would make a request to a regular API. You can make requests in the following form:\n```\nlocalhost:5000/\u003cfunction name\u003e/\u003cstring input\u003e\n```\nWhere the \u003cfunction name\u003e is the name of the function you are running, and \u003cstring input\u003e is a single string containing the necessary inputs for the function.\n - Note: When calling the API in this method, all outputs are returned as a single string.\n\nYou can also use JQuery and Ajax to make requests to the API. You should structure your requests like so:\n```javascript\n$.ajax({\n\turl: \"localhost:5000/_\u003cfunction name\u003e_ajax\",\n\t\n\t// optional arguments are passed in a dictionary\n\tdata: {string:\"this is an example\", integer:42,},\n\t\n\tsuccess: function(result){\n\t\t// handle the request\n\t}\n});\n```\n - Note: The default fall-back for an empty/non-existent argument is a None value.\n - Note: Unlike the URL method, output types are retained using this method.\n\nIf the module or target function should encounter an error during handling of a request, a server error 500 code is returned, either as a JSON or string, dependent on the method used to make the request originally.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutwell%2Feasy-python-remote-interfaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcutwell%2Feasy-python-remote-interfaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutwell%2Feasy-python-remote-interfaces/lists"}