{"id":28569634,"url":"https://github.com/abilian/flask-super","last_synced_at":"2026-02-18T14:31:38.982Z","repository":{"id":213808953,"uuid":"734783143","full_name":"abilian/flask-super","owner":"abilian","description":"Patterns and idioms to structure your Flask applications","archived":false,"fork":false,"pushed_at":"2025-10-23T18:25:07.000Z","size":394,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T20:38:29.348Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abilian.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-22T15:52:52.000Z","updated_at":"2025-10-23T18:25:10.000Z","dependencies_parsed_at":"2023-12-23T09:33:01.866Z","dependency_job_id":"4e30881e-e547-4164-989e-869107376a01","html_url":"https://github.com/abilian/flask-super","commit_stats":null,"previous_names":["abilian/flask-plus","abilian/flask-super"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/abilian/flask-super","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abilian%2Fflask-super","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abilian%2Fflask-super/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abilian%2Fflask-super/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abilian%2Fflask-super/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abilian","download_url":"https://codeload.github.com/abilian/flask-super/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abilian%2Fflask-super/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29582318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T13:56:48.962Z","status":"ssl_error","status_checked_at":"2026-02-18T13:54:34.145Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2025-06-10T17:15:18.663Z","updated_at":"2026-02-18T14:31:33.973Z","avatar_url":"https://github.com/abilian.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask-Super\n\n[![image](https://img.shields.io/pypi/v/flask_super.svg)](https://pypi.python.org/pypi/flask_super)\n\n[![Documentation Status](https://readthedocs.org/projects/flask-super/badge/?version=latest)](https://flask-super.readthedocs.io/en/latest/?version=latest)\n\n\u003e \"Any sufficiently complicated Python program contains an ad-hoc, informally-specified\n\u003e bug-ridden slow implementation of half of the Zope Component Architecture.\" (S. Fermigier, December 2023).\n\n\n\u003e [!WARNING]\n\u003e Due to PyPI refusing the submission of a package called \"FLask-Plus\", the package\n\u003e has been renamed (temporarily?) \"Flask-Super\".\n\u003e\n\u003e (I know this sucks. Either way, it's temporary. Stay tuned.)\n\n\n## Flask patterns and idoms\n\n-   Free software: Apache Software License 2.0\n\n\n## Features\n\n- Decorator-based registration system for services (using [svcs](https://svcs.hynek.me/))\n- Powerful inspection CLI command (`flask inspect` and `flask config`).\n- Flask initialisation helpers.\n\n\n## Status\n\nThis is a preview. Expect the API to change.\n\n## Sample usage\n\n```python\n\nimport svcs\nfrom flask import Flask\nfrom flask_super import register_services\nfrom flask_super.scanner import scan_package\n\n# Assuming you have developped the proper decorators and registration logic\n# in app.lib (or any other module)\nfrom app.lib import register_routes, register_components\n\n\ndef create_app():\n    app = Flask(__name__)\n\n    svcs.flask.init_app(app)\n    scan_package(\"app.services\")\n    register_services(app)\n\n    # Or just scan a package if using a framework like SQLAlchemy which\n    # automatically registers classes on import\n    scan_package(\"app.models\")\n\n    # You may also scan custom things (e.g. models, routes, components, etc.)\n    scan_package(\"app.routes\")\n    register_routes(app)\n    scan_package(\"app.components\")\n    register_components(app)\n\n    return app\n\n\napp = create_app()\n```\n\nCurrently, `flask-super` provides the following decorators:\n\n- `@service`: register a service with a per-request lifecycle (on the `svcs` registry)\n- `@singleton`: register a singleton service (on the `svcs` registry)\n\n\n## A real-life example\n\nHere is the initialisation code of a Flask application using `flask-super`:\n\n```python\ndef create_app(config: Any = None) -\u003e Flask:\n    # When testing\n    if config:\n        app = Flask(__name__)\n        app.config.from_object(config)\n\n    # Otherwise\n    else:\n        # Not needed when called from CLI, but needed when\n        # called from a WSGI server\n        load_dotenv(verbose=True)\n\n        app = Flask(__name__)\n        app.config.from_prefixed_env()\n\n        finish_config(app)\n\n    init_app(app)\n    return app\n\n\ndef finish_config(app: Flask):\n    app.config.from_object(\"app.config.Config\")\n\n\ndef init_app(app: Flask):\n    # First: Logging \u0026 Observability (e.g. sentry)\n    init_logging(app)\n\n    # Scan modules that may provide side effects\n    scan_package(\"app.models\")\n    scan_package(\"app.services\")\n    scan_package(\"app.controllers\")\n    scan_package(\"app.cli\")\n\n    # Scan 3rd-party modules\n    scan_package(\"flask_super\")\n\n    # Extensions, then services\n    init_extensions(app)\n    svcs.flask.init_app(app)\n    register_services(app)\n\n    # Web\n    register_views(app)\n    register_controllers(app)\n\n    # Security\n    register_rules()\n\n    # CLI\n    register_commands(app)\n```\n\n## Credits\n\nThis package was created with [Cruft](https://cruft.github.io/cruft/)\nand the\n[abilian/cookiecutter-abilian-python](https://github.com/abilian/cookiecutter-abilian-python)\nproject template.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabilian%2Fflask-super","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabilian%2Fflask-super","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabilian%2Fflask-super/lists"}