{"id":32475790,"url":"https://github.com/cgdeboer/environize","last_synced_at":"2026-05-07T09:34:03.166Z","repository":{"id":57426632,"uuid":"149198608","full_name":"cgdeboer/environize","owner":"cgdeboer","description":"Environment and state savvy DataMigration tools for Django.","archived":false,"fork":false,"pushed_at":"2018-09-19T10:42:13.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-26T21:26:06.256Z","etag":null,"topics":["django","postgresql","python"],"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/cgdeboer.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2018-09-17T22:59:21.000Z","updated_at":"2024-09-08T00:14:47.000Z","dependencies_parsed_at":"2022-09-19T06:41:04.646Z","dependency_job_id":null,"html_url":"https://github.com/cgdeboer/environize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cgdeboer/environize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgdeboer%2Fenvironize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgdeboer%2Fenvironize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgdeboer%2Fenvironize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgdeboer%2Fenvironize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cgdeboer","download_url":"https://codeload.github.com/cgdeboer/environize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgdeboer%2Fenvironize/sbom","scorecard":{"id":272368,"data":{"date":"2025-08-11","repo":{"name":"github.com/cgdeboer/environize","commit":"1d1bfd6d50b961a0ea82c7c74548d4db7a49fcf3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T13:42:27.638Z","repository_id":57426632,"created_at":"2025-08-17T13:42:27.638Z","updated_at":"2025-08-17T13:42:27.638Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32731557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["django","postgresql","python"],"created_at":"2025-10-26T21:19:52.548Z","updated_at":"2026-05-07T09:34:03.161Z","avatar_url":"https://github.com/cgdeboer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Environize\n========================================\n\n.. image:: https://travis-ci.org/cgdeboer/environize.svg?branch=master\n    :target: https://travis-ci.org/cgdeboer/environize\n\n.. image:: https://img.shields.io/pypi/v/environize.svg\n    :target: https://pypi.org/project/environize/\n\n.. image:: https://raw.githubusercontent.com/cgdeboer/environize/master/docs/environize.png\n\n**Environize enables environment and state savvy DataMigration tools for Django**\n\n1. Decorators\n    - adds a pair of decorators (**only_in** and **except_in**) for use with the **migrations.RunPython** method.\n    - use django's DataMigrations to allow dev data and prod data to be different.\n    - exclude large data creation migrations from tests which may define their own data.\n\n2. Command(s)\n    - adds a **loaddata** method that loads JSON fixtures into the database based on the state of the migration.\n    - different from ``./manage.py loaddata`` or ``call_command(\"loaddata\")``, which both load fixtures to the database based on the current state of models.\n    - no more updating fixtures to keep them current. The data model in the fixture is tied to the state of your models in the migration.\n\nDecorators - Usage\n------------------\n\n*Exclude Tests*\n\n.. code-block:: python\n\n    from django.db import migrations\n    import environize\n\n    # runs in every env except testing\n    @environize.except_in(envs=[\"test\"])\n    def except_test_data(apps, schema_editor):\n        Ham = apps.get_model(\"app\", \"Ham\")\n        Ham.objects.create(name=\"not-test\")\n\n    @environize.except_in(envs=[\"test\"])\n    def remove_hams(apps, schema_editor):\n        Ham = apps.get_model(\"app\", \"Ham\")\n        Ham.objects.all().delete()\n\n\n    class Migration(migrations.Migration):\n\n        dependencies = [\n            ('app', '0002_auto_20180916_1122'),\n        ]\n\n        operations = [\n            migrations.RunPython(except_test_data, remove_hams)\n        ]\n\n*Production Only Data*\n\n.. code-block:: python\n\n    from django.db import migrations\n    import environize\n\n    # runs in every env except testing\n    @environize.only_in(envs=[\"production\"])\n    def add_prod_data(apps, schema_editor):\n        Ham = apps.get_model(\"app\", \"Ham\")\n        Ham.objects.create(name=\"not-test\")\n\n    @environize.only_in(envs=[\"production\"])\n    def remove_hams(apps, schema_editor):\n        Ham = apps.get_model(\"app\", \"Ham\")\n        Ham.objects.all().delete()\n\n\n    class Migration(migrations.Migration):\n\n        dependencies = [\n            ('app', '0002_auto_20180916_1122'),\n        ]\n\n        operations = [\n            migrations.RunPython(add_prod_data, remove_hams)\n        ]\n\n\nCommands - Usage\n------------------\n\n*You are responsible for ensuring fixtures are loaded in the correct order with respect to data relationships.*\n\n.. code-block:: python\n\n    import os\n    from django.db import migrations\n    import environize\n\n    PATH = 'path/to/fixtures/'\n\n    def load_fixture(apps, schema_editor):\n        fixture_file = os.path.join(PATH, 'myfixture.json')\n        environize.loaddata(apps, fixture_file)\n\n\n    class Migration(migrations.Migration):\n\n        dependencies = [\n            ('app', '0003_auto_20180916_1122'),\n        ]\n\n        operations = [\n            migrations.RunPython(load_fixture, lambda x, y: None)\n        ]\n\n\n\nFeature Support\n---------------\n\nEnvironize officially supports:\n    - Python 2.7 on Django 1.11 LTS\n    - Python 3.5+ on Django 2+\n    - *Postgresql and Sqllite only*\n    - *JSON Fixtures only*\n\n\nInstallation\n------------\n\nTo install Environize, use `pipenv \u003chttp://pipenv.org/\u003e`_ (or pip, of course):\n\n.. code-block:: bash\n\n    $ pipenv install environize\n\n\n*Inside various settings files set an ENVIRONMENT variable.*\n\n.. code-block:: python\n\n    # /settings_production.py\n    ENVIRONMENT = 'production'\n\n    # /settings_qa.py\n    ENVIRONMENT = 'qa'\n\n    # /settings_dev.py\n    ENVIRONMENT = 'dev'\n\nThe default env keys are listed below but can be overridden by setting ENVIRONIZE_ENVS in your django settings:\n\n.. code-block:: python\n\n    # these are the default env keys\n    ENVIRONIZE_ENVS = (\"dev\", \"test\", \"ci\", \"qa\", \"staging\", \"production\")\n\n    # by default this key will be used if one is not set in a settings file.\n    DEFAULT_ENV = \"dev\"\n\n\nDocumentation\n-------------\n\nTBD\n\n\nHow to Contribute\n-----------------\n\n#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.\n#. Fork `the repository`_ on GitHub to start making your changes to the **master** branch (or branch off of it).\n#. Write a test which shows that the bug was fixed or that the feature works as expected.\n#. Send a pull request. Make sure to add yourself to AUTHORS_.\n\n.. _`the repository`: https://github.com/cgdeboer/environize\n.. _AUTHORS: https://github.com/cgdeboer/environize/blob/master/AUTHORS.rst\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgdeboer%2Fenvironize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcgdeboer%2Fenvironize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgdeboer%2Fenvironize/lists"}