{"id":20033172,"url":"https://github.com/dbr/pyerweb","last_synced_at":"2025-05-05T05:31:03.414Z","repository":{"id":451993,"uuid":"75291","full_name":"dbr/pyerweb","owner":"dbr","description":"An absurdly small web-framework in Python [Not actively maintained]","archived":false,"fork":false,"pushed_at":"2009-04-26T17:43:24.000Z","size":92,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T17:21:25.708Z","etag":null,"topics":[],"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/dbr.png","metadata":{"files":{"readme":"README.markdown","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}},"created_at":"2008-11-13T11:08:53.000Z","updated_at":"2019-08-13T13:42:20.000Z","dependencies_parsed_at":"2022-08-02T20:30:22.576Z","dependency_job_id":null,"html_url":"https://github.com/dbr/pyerweb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbr%2Fpyerweb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbr%2Fpyerweb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbr%2Fpyerweb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbr%2Fpyerweb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbr","download_url":"https://codeload.github.com/dbr/pyerweb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252445800,"owners_count":21749120,"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":[],"created_at":"2024-11-13T09:44:47.773Z","updated_at":"2025-05-05T05:31:03.180Z","avatar_url":"https://github.com/dbr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pyerweb: an absurdly small Python web-framework\n\nCurrently pyerweb is basically a simple routing system, which allows you to do the following:\n\n    from pyerweb import GET, runner\n\n    @GET(\"^/view/(.+?)\")\n    def view(key):\n        return \"Viewing %s\" % (key)\n\nThis maps /view/anything to calling view() with an argument of \"anything\"\n\nYou simply decorate a function with `@GET`, `@PUT` `@POST` or `@DELETE`, the argument is a regular expression (in a string), for example:\n\n    @POST(\"^/0-9+$\")\n\n..will match a POST request to `/1` or `/44532`\n\nGroups in the regular expression will be passed to the decorated function as arguments, for example:\n\n    @POST(\"^/(0-9)+$\")\n    def view(the_number):\n        pass\n\n..will grab the supplied number as `the_number` argument\n\nThe `runner` function is the WSGI compatible runner. For example, using \"spawning\" you can simply run:\n\n    spawn myscript.runner\n\nOr, to use pyerweb as a CGI script (also works for the Google App Engine):\n\n    import wsgiref.handlers\n    from pyerweb import GET, runner\n\n    @GET(\"^/view/(.+?)\")\n    def view(key):\n        return \"Viewing %s\" % (key)\n\n    if __name__ == \"__main__\":\n        wsgiref.handlers.CGIHandler().run(runner)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbr%2Fpyerweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbr%2Fpyerweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbr%2Fpyerweb/lists"}