{"id":17018170,"url":"https://github.com/loitd/flaskstarter","last_synced_at":"2025-03-22T16:11:00.383Z","repository":{"id":72977624,"uuid":"154777947","full_name":"loitd/flaskstarter","owner":"loitd","description":"Loitd Flask Starter Template","archived":false,"fork":false,"pushed_at":"2020-08-22T16:24:22.000Z","size":2505,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-27T16:47:33.824Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loitd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-26T04:37:24.000Z","updated_at":"2018-10-28T02:34:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"575f0f6a-119e-4c73-aa29-a7eab3a54b60","html_url":"https://github.com/loitd/flaskstarter","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/loitd%2Fflaskstarter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loitd%2Fflaskstarter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loitd%2Fflaskstarter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loitd%2Fflaskstarter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loitd","download_url":"https://codeload.github.com/loitd/flaskstarter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244982043,"owners_count":20542300,"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-10-14T06:44:46.712Z","updated_at":"2025-03-22T16:11:00.365Z","avatar_url":"https://github.com/loitd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flaskstarter\nLoitd Flask Starter Template\n\n# How to run\n## Install VirtualEnvironment\n\tpip3 install virtualenvwrapper\n\tpip3 install virtualenvwrapper-win\n### Create new virtualenvironment if not exist\n\tmkvirtualenv -p C:\\Python36\\python.exe rocket\n### Show all virtual environments:\n\tlsvirtualenv\n\trmvirtualenv rocket\n\tcpvirtualenv ENVNAME [TARGETENVNAME]\n\tallvirtualenv pip install -U pip\n### Switch to new created environment\n\tworkon rocket\n### Save and reinstall the requirement\n\t(rocket)$ pip freeze \u003e requirements.txt\n\tpip install -r requirements.txt\n## Database Migration\n### Alembic init\nAlembic is a database migrations tool written by the author of SQLAlchemy.\nWe’ll create our alembic “migration environment” via the alembic init command.\n\talembic init alembic\nEditing the alembic.ini File\n\tsqlalchemy.url = postgresql://scott:tiger@localhost/test\n### Create first revision\nFirst we run alembic revision to generate a migration script.\n\talembic revision -m \"create account table\"\n\talembic revision\nThen we’ll open up the newly generated Python file in `myapp/alembic/versions/` and fill in the `upgrade` and `downgrade` functions using the tools provided by Alembic’s `op` object. \n### Upgrade or downgrade using revisions\nOnce we have our migration script ready, we can run `alembic upgrade head` to migrade our data to the latest version.\n\talembic upgrade head\nAbove, we use ae1 to refer to revision ae1027a6acf. Alembic will stop and let you know if more than one version starts with that prefix.\n\talembic upgrade ae1\nTo move two versions from the current\n\talembic upgrade +2\nNegative values are accepted for downgrades:\n\talembic downgrade -1\n\talembic downgarde base\nRelative identifiers may also be in terms of a specific revision. For example, to upgrade to revision ae1027a6acf plus two additional steps:\n\talembic upgrade ae10+2\n### Getting some information with Alembic\n\talembic current -v\n\talembic history -v\n\talembic history -r1975ea:ae1027\n### Cons\nThere's currently no command to delete migrations from your versions directory\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floitd%2Fflaskstarter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floitd%2Fflaskstarter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floitd%2Fflaskstarter/lists"}