{"id":14974235,"url":"https://github.com/italomaia/empty","last_synced_at":"2025-10-27T06:32:01.622Z","repository":{"id":35200004,"uuid":"39458558","full_name":"italomaia/empty","owner":"italomaia","description":"Sometimes, starting your flask project takes too much work. Well, empty leverages that for you.","archived":false,"fork":false,"pushed_at":"2019-01-20T22:27:33.000Z","size":54,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-28T18:41:18.543Z","etag":null,"topics":["boilerplate","flask","python","tox"],"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/italomaia.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","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":"2015-07-21T17:01:13.000Z","updated_at":"2021-10-21T09:32:13.000Z","dependencies_parsed_at":"2022-09-11T04:22:25.710Z","dependency_job_id":null,"html_url":"https://github.com/italomaia/empty","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italomaia%2Fempty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italomaia%2Fempty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italomaia%2Fempty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italomaia%2Fempty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/italomaia","download_url":"https://codeload.github.com/italomaia/empty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219861742,"owners_count":16555987,"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":["boilerplate","flask","python","tox"],"created_at":"2024-09-24T13:50:15.971Z","updated_at":"2025-10-27T06:32:01.279Z","avatar_url":"https://github.com/italomaia.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"What have we here?\n==================\n\nEmpty is a soft wrapper around the amazing Flask web framework; it\nadds new pre-defined configuration which makes it easier to create\nrobuts projects.\n\nWhat comes packed?\n==================\n\n- Looks up blueprints in a apps/ folder inside your project root. You may now have your blueprints better organized.\n- Loads extensions automagically.\n- Loads blueprint modules automagically.\n- Gives you *configure_* methods loaded in the right order, that you may simply override.\n- Has a few pre-built filters (**date** and **datetime**, for now)\n\nUsage\n=====\n\nCreating your firs Empty application is quite simple. Just do the following:\n\n.. code:: python\n\n    from empty import app_factory\n    import config  # your config module\n\n    # config can also be None; no problem\n    app = app_factory('project-name', config)\n    app.run()\n\n    # or\n    from empty import Empty\n    import config  # your config module\n\n    app = Empty('project-name')\n    app.configure(config)\n    app.run()\n\nAll nice and cuzzy. Now, imagine you would like to load custom\nconfiguration rules in your application. To do that,\njust define a environment variable called **FLASK_CONFIG**\npointing to the configuration file, which can be a python file.\n\n.. code:: python\n\n    FLASK_CONFIG=config/dev.py\n    # or\n    FLASK_CONFIG=config/testing.py\n\nBlueprints\n==========\n\nFor Empty to load your blueprints for you, make sure\nthe blueprint instance can be imported directly from\nthe blueprint package or module. A good suggestion\ncould be to declare your blueprint instance like this:\n\n    apps/myblueprint\n    .. __init__.py (import blueprint instance here)\n    .. bp.py (declare blueprint instance here)\n\nThen, in your config module/object/whatever, declare\nyou wish to load your blueprint, like this:\n\n.. code:: python\n\n    # loading it this way, url_prefix will be /myblueprint\n    BLUEPRINTS = ['myblueprint']\n    # like this, you can provide custom configuration\n    BLUEPRINTS = [\n        ('myblueprint', {\n            # .. blueprint configuration goes here ..\n        })\n    ]\n\nExtensions\n==========\n\nFlask extensions are a great way to shorten your work.\nTo load extensions with Empty, create a module,\ndeclare your extensions there and load them through\nyour configuration.\n\n.. code:: python\n\n    # file: extensions.py\n    from flask_sqlalchemy import SQLAlchemy\n    db = SQLAlchemy()\n\n    # config.py\n    EXTENSIONS = [\n        'extensions.db'\n    ]  # and that's it!\n\nThe code above loads and initializes the extensions for you.\nSome extensions, like flask-security, may require extra\narguments (besides app) to load properly. For these cases,\ndeclare a function besides your extension instance in the\nfollowing manner:\n\n.. code:: python\n\n    def \u003cextension_instance_name\u003e_init_kwargs():\n        return ext_kwargs\n\n**ext_kwargs** should be a dict with the necessary extra\n**init_app** parameters.\n\n\nConfig\n======\n\n`example config file \u003chttps://github.com/italomaia/flask-vue-semantic-docker/blob/master/app/config.py\u003e`_\n\nYou're advised to create a python module to work as your project configuration.\nDEV, TEST or PROD specific configurations should be loaded through **FLASK_CONFIG**.\n\nThat said, there are a few quite helpful configurations Empty will recognize\nby default. See the list below:\n\n- BLUEPRINTS - a list (['blog', 'messages',...]) or dictionary ({'blog': dict(**options), 'messages': dict(**options), ...}) describing which blueprints to load. Blueprints are loaded **by name** from an option **apps/** folder in your project root (preferably) or directly from the project root. \n- EXTENSIONS - a list with the path to your extension instances. Something like this: ['extensions.db'] where 'extensions' is a module and db is an instance of your extension. If you define an \"\u003cEXT_INSTANCE_NAME\u003e_init_kwargs\" function where your extension instance is, its output will be used as extra arguments to your extension initialization routine.\n- BP_MODULES - list of modules  uto loaded from your blueprints. The default value is: ``('admin', 'models', 'schemas', 'views', 'api')``\n\nClick support\n=============\n\n- (planned) command to make it easy to create a new blueprint\n- (planned) command to list your routes\n\nIntegrations\n------------\n\nEmpty integrates quite with with many projects, but there are few that\nare just too good! Adding them to empty would probably go against the\nwhole idea of something that doesn't get in your way. So, what we'll do\nis to describe a few easy-to-follow recipes with empty on how to\ncreate the most common setups. These recipes are **WIP**, of now.\n\nRecipes\n=======\n\n**WIP**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitalomaia%2Fempty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitalomaia%2Fempty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitalomaia%2Fempty/lists"}