{"id":24822113,"url":"https://github.com/sebbekarlsson/phpflask","last_synced_at":"2025-10-13T20:31:10.648Z","repository":{"id":62541666,"uuid":"88421469","full_name":"sebbekarlsson/PHPFlask","owner":"sebbekarlsson","description":"🍶 Flask for PHP","archived":false,"fork":false,"pushed_at":"2019-09-10T08:11:14.000Z","size":354,"stargazers_count":13,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-31T10:05:24.792Z","etag":null,"topics":["flask","jinja2","mvc","php","php-flask","php-framework","php-library","python","routing","twig"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/sebbekarlsson.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}},"created_at":"2017-04-16T15:14:07.000Z","updated_at":"2024-10-07T15:36:20.000Z","dependencies_parsed_at":"2022-11-02T15:46:48.264Z","dependency_job_id":null,"html_url":"https://github.com/sebbekarlsson/PHPFlask","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/sebbekarlsson%2FPHPFlask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebbekarlsson%2FPHPFlask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebbekarlsson%2FPHPFlask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebbekarlsson%2FPHPFlask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebbekarlsson","download_url":"https://codeload.github.com/sebbekarlsson/PHPFlask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236396254,"owners_count":19142170,"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":["flask","jinja2","mvc","php","php-flask","php-framework","php-library","python","routing","twig"],"created_at":"2025-01-30T18:05:46.302Z","updated_at":"2025-10-13T20:31:05.378Z","avatar_url":"https://github.com/sebbekarlsson.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask for PHP!\n\n## Supports:\n* Blueprints\n* Function routes\n* Jinja-like templating (Using Twig)\n\n## Requirements:\n* PHP 5.6 and above\n* Composer\n\n## About\n\u003e The goal of this project is to be able to write\n\u003e flask-like applications in PHP.\n\n## Installation\n\u003e Clone down the repository inside your project\n\u003e (preferably as a submodule)\n\n\u003e And then:\n\n        cd PHPFlask/\n        composer install\n\n\u003e And then in your project:\n\n        require_once('PHPFlask/src/index.php');\n\n## Installing with composer\n\u003e You can also install using composer:\n\n        composer install sebbekarlsson/php-flask\n\n## Full installation guide\n\u003e Still clueless?\n\n\u003e [Read the full installation guide](INSTALLATION.md)\n\n## Blueprint example:\n\n        class FruitsBP extends Blueprint {\n            var $fruits;\n            \n            function __construct() {\n                parent::__construct();\n\n                $this-\u003ebase_url = '/fruits';\n\n                $this-\u003eroute('/', 'main');\n            }\n\n            function init() {\n                $this-\u003efruits = [\n                    'apple',\n                    'banana',\n                    'raspberry',\n                    'papaya',\n                    'orange'\n                ];\n            }\n\n            function main() {\n                return json_encode($this-\u003efruits);\n            }\n        }\n        \n\u003e And then registering it:\n        \n        $app-\u003eregister_blueprint(new FruitsBP());\n        \n \n## Function example:\n\n        $app-\u003eroute('/fruits', function() {\n            return json_encode([\n                'apple',\n                'banana',\n                'raspberry',\n                'papaya',\n                'orange'\n            ]); \n        });\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebbekarlsson%2Fphpflask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebbekarlsson%2Fphpflask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebbekarlsson%2Fphpflask/lists"}