{ "info": { "author": "Rich Jones", "author_email": "rich@openwatch.net", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# zappa-django-utils\n\n[![PyPI](https://img.shields.io/pypi/v/zappa-django-utils.svg)](https://pypi.python.org/pypi/zappa-django-utils)\n[![Slack](https://img.shields.io/badge/chat-slack-ff69b4.svg)](https://slack.zappa.io/)\n[![Gun.io](https://img.shields.io/badge/made%20by-gun.io-blue.svg)](https://gun.io/)\n[![Patreon](https://img.shields.io/badge/support-patreon-brightgreen.svg)](https://patreon.com/zappa)\n\n\nSmall utilities for making [Zappa](https://github.com/Miserlou/Zappa) deployments slightly easier for Django applications.\n\nThis project was inspired by Edgar Roman's [Zappa Django Guide](https://github.com/edgarroman/zappa-django-guide).\n\n## Installation\n\nInstall via `pip`:\n\n $ pip install zappa-django-utils\n\nAdd to your installed apps:\n\n INSTALLED_APPS += ('zappa_django_utils',)\n\n## Usage\n\n### Using an S3-Backed Database Engine\n\n**ZDU** includes the ability to use `s3sqlite`, an [S3-synced SQLite database](https://blog.zappa.io/posts/s3sqlite-a-serverless-relational-database) as a Django database engine.\n\nThis will cause problems for applications with concurrent writes**, but it scales very well for high-read applications that don't have concurrent writes (like CMSes), and it's orders of magnitude cheaper than AWS RDS.\n\n** Concurrent writes will often be lost and not show up in concurrent readers. This is because the database is transferred between S3 storage and the Lambda instance for each request.\n\n#### Django Settings & Commands\n\n```python\nDATABASES = {\n 'default': {\n 'ENGINE': 'zappa_django_utils.db.backends.s3sqlite',\n 'NAME': 'sqlite.db',\n 'BUCKET': 'your-db-bucket'\n }\n}\n```\n\nAnd... that's it! Since SQLite keeps the database in a single file, you will want to keep it as small and defragmented as possible. It is good to occasionally perform a database vacuum, especially after deleting or updating data. There's a command to vacuum your database:\n\n```bash\nzappa manage [instance] s3sqlite_vacuum\n```\n\n### Creating a Postgres Database\n\nOnce you have your RDS set up, your VPC/Subnet/Security Groups set up, and your `DATABASES` setting set up, you can create the database with:\n\n $ zappa manage create_pg_db\n\nThen you're ready to `python manage.py makemigrations` and `zappa update; zappa manage migrate`!\n\n### Creating a Default Admin User \n\nYou'll probably need a default user to manage your application with, so you can now:\n\n $ zappa manage create_admin_user\n\nOr you can pass some arguments:\n\n $ zappa manage create_admin_user one two three\n\nThis will internally make this call:\n\n```python\nUser.objects.create_superuser('one', 'two', 'three')\n```\n\nNow log in and immediately change the admin user's email and password.\n\n### Creating/Dropping a Postgres Schema\n\nYou can create a [Postgres schema](https://www.postgresql.org/docs/current/static/ddl-schemas.html) with:\n\n $ zappa manage create_pg_schema\n\nand drop it with:\n\n $ zappa manage drop_pg_schema\n\n## License\n\n(c) 2017, Rich Jones, MIT License\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Miserlou/zappa-django-utils", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "zappa-django-utils", "package_url": "https://pypi.org/project/zappa-django-utils/", "platform": "", "project_url": "https://pypi.org/project/zappa-django-utils/", "project_urls": { "Homepage": "https://github.com/Miserlou/zappa-django-utils" }, "release_url": "https://pypi.org/project/zappa-django-utils/0.4.0/", "requires_dist": [ "Django (>=1.9)" ], "requires_python": "", "summary": "Helpers for Django Zappa deployments", "version": "0.4.0" }, "last_serial": 3939490, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1e93609d7035ad5653cec8bbdfec533e", "sha256": "24e1b8acd0cd10c6a8be34648e99633e9d926de12dad1489e0cdea7522c6b5d1" }, "downloads": -1, "filename": "zappa_django_utils-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "1e93609d7035ad5653cec8bbdfec533e", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5088, "upload_time": "2017-08-11T17:08:41", "url": "https://files.pythonhosted.org/packages/d6/47/bd3e5bf900634de1480be94c5a18dfbd9515f86d956d1a87fdfb7763dff4/zappa_django_utils-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b154fc75a77fde1c672ce713d2a5c602", "sha256": "76738a694a8286780df5ce956c5fe846c3621d9fc5637d5417cff2f597c137aa" }, "downloads": -1, "filename": "zappa-django-utils-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b154fc75a77fde1c672ce713d2a5c602", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3418, "upload_time": "2017-08-11T17:08:39", "url": "https://files.pythonhosted.org/packages/cf/07/8ec2085038e3438b722b7257de43eacaf675d78e2795252a51184b9fb5b3/zappa-django-utils-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "2a342437346dbbfcf86725569ba9ae02", "sha256": "c0042d101be1e80559c0e749a7e1a5484dd8a266d0cf0436a60bb97f37d94f1d" }, "downloads": -1, "filename": "zappa_django_utils-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "2a342437346dbbfcf86725569ba9ae02", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5918, "upload_time": "2017-08-11T17:27:26", "url": "https://files.pythonhosted.org/packages/94/40/dceda6c73f8f61e24cc8b4adf5bb38e5aed86bc93d2a66c71060f4822796/zappa_django_utils-0.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec483460dea8e56cecd325aa24284aab", "sha256": "1ff8741151c822b1106249f6bc06d124c4d58ccab8af9e82d47a6f77fb17d3e6" }, "downloads": -1, "filename": "zappa-django-utils-0.0.2.tar.gz", "has_sig": false, "md5_digest": "ec483460dea8e56cecd325aa24284aab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3588, "upload_time": "2017-08-11T17:27:24", "url": "https://files.pythonhosted.org/packages/03/32/2f240093f6fe4cf9e9f3e6d5c28688d57c354c03a1e36571c0a84a87b04a/zappa-django-utils-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "f4024ede621f5efe6a2dfe328cbccbf2", "sha256": "e11a3f94523a266e1835e8852eb453df7653e8739c955c7d88003ef9702e5235" }, "downloads": -1, "filename": "zappa_django_utils-0.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "f4024ede621f5efe6a2dfe328cbccbf2", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5919, "upload_time": "2017-08-11T17:30:45", "url": "https://files.pythonhosted.org/packages/50/a6/356e3e1805623c9d6cfb6b17f86e9d368fcad3f4da52a309f12ba1607f15/zappa_django_utils-0.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cf68bda15ada99e3d5c10e53f0515213", "sha256": "f8fd62597b895176563220dc0d7bcd8af3ae2e799819ed2c237f767f0dd33908" }, "downloads": -1, "filename": "zappa-django-utils-0.0.3.tar.gz", "has_sig": false, "md5_digest": "cf68bda15ada99e3d5c10e53f0515213", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3592, "upload_time": "2017-08-11T17:30:44", "url": "https://files.pythonhosted.org/packages/8a/b8/5779ea57ec4489c948afce1aef1c7d41ca7e83c55f48889d9df3c7c4830d/zappa-django-utils-0.0.3.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "a59422b839351fe7d984c16607459585", "sha256": "8c267b13adf4da5d537d6940222f82eab2b67a3a33a4a6038a3e64c928342fc7" }, "downloads": -1, "filename": "zappa_django_utils-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a59422b839351fe7d984c16607459585", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 5906, "upload_time": "2017-08-11T19:19:11", "url": "https://files.pythonhosted.org/packages/a5/b0/887c7e21ab703cafeed1a9579f09aef829859446ac65789b71c251329a52/zappa_django_utils-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fdabe0c6a66e4e56d6558f8fc88aee43", "sha256": "6eaa64c143aeda6ecfa3e0b381d476c17624fd263b93bf2cf289ec6b97b37694" }, "downloads": -1, "filename": "zappa-django-utils-0.1.0.tar.gz", "has_sig": false, "md5_digest": "fdabe0c6a66e4e56d6558f8fc88aee43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3588, "upload_time": "2017-08-11T19:19:09", "url": "https://files.pythonhosted.org/packages/0f/1c/6187fd93bfab7c246d0ff99b109820aeb55b50c4d83976f8b15f2838d4c2/zappa-django-utils-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2caed3d027c6a101aa109bdf0ddac5ba", "sha256": "867c14f45716eb775ebdbe3bd44ece1b2b64d3ef74c5f5719e5d0f0c6c5a839f" }, "downloads": -1, "filename": "zappa_django_utils-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2caed3d027c6a101aa109bdf0ddac5ba", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 7703, "upload_time": "2017-09-29T08:18:46", "url": "https://files.pythonhosted.org/packages/0f/41/9801cd10fa7a6f613fff28521eb6a338101a574b7aa331fb1433d5f83ff2/zappa_django_utils-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0a3715e94d5dc74a410e9ed3489f71cc", "sha256": "233f1df571b097464fe12d4ca6054e238ad2a335512efa6c353a852ffbf25b2c" }, "downloads": -1, "filename": "zappa-django-utils-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0a3715e94d5dc74a410e9ed3489f71cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4015, "upload_time": "2017-09-29T08:18:45", "url": "https://files.pythonhosted.org/packages/f2/60/ddd098d1bc10651f27c28348469d718739bf56af8f514b85c60404601426/zappa-django-utils-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "c25059b67913e555dd8925434a2bceb8", "sha256": "77c863e459341b60ee189530ce9000c1ae641b3a961e4461f422203bd74bb822" }, "downloads": -1, "filename": "zappa_django_utils-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "c25059b67913e555dd8925434a2bceb8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10584, "upload_time": "2017-10-17T19:46:15", "url": "https://files.pythonhosted.org/packages/59/5c/d29df752d962e54c477f96eb2eb9a006b07c7d71ec5edc22ed1aae39e8ea/zappa_django_utils-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e9baf066998fb11c8342f906c6bc7c1c", "sha256": "5cc6530a81a3dd72d4869a8af1385a4f28810e7f150ccf238139117b99a1b1c7" }, "downloads": -1, "filename": "zappa-django-utils-0.3.0.tar.gz", "has_sig": false, "md5_digest": "e9baf066998fb11c8342f906c6bc7c1c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6557, "upload_time": "2017-10-17T19:46:14", "url": "https://files.pythonhosted.org/packages/2e/56/7c80c1bf29c05c08156abe9d72436fc11f77a73a625658ea82f6e1fe89b3/zappa-django-utils-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "6f8c60a7f2f263579a4fd49654e9933f", "sha256": "0912eb4f41ae6860f7b62c5580848d390c92a68a3afb64f4fbb683a89ae70d8c" }, "downloads": -1, "filename": "zappa_django_utils-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6f8c60a7f2f263579a4fd49654e9933f", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 10889, "upload_time": "2017-11-08T21:00:57", "url": "https://files.pythonhosted.org/packages/94/7a/757fcf24b46a23ce454b5dd25f333436f3290cfc1fd2fc2b0ad66b73098f/zappa_django_utils-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b0e0fe544ce2ec4b1143b3b180d5f12b", "sha256": "6c43bc15926aa915ab59c00038a4726739b450859a54679d49317178606beba4" }, "downloads": -1, "filename": "zappa-django-utils-0.3.1.tar.gz", "has_sig": false, "md5_digest": "b0e0fe544ce2ec4b1143b3b180d5f12b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6879, "upload_time": "2017-11-08T21:00:56", "url": "https://files.pythonhosted.org/packages/f9/5d/a9d996e806f0cbdc1c317705cb4afd9df0543ed840536ec4df1f74945d7a/zappa-django-utils-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "fca977a17e28534106e66064020cf251", "sha256": "9d6d14b8cf4184c025f224d34657d56986de2f6bbde48573efd264daa92046a5" }, "downloads": -1, "filename": "zappa_django_utils-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "fca977a17e28534106e66064020cf251", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10479, "upload_time": "2018-06-07T12:18:41", "url": "https://files.pythonhosted.org/packages/49/db/2438d10cc85916bd12852008e415a228013f1d35abdc3d271e7805df268c/zappa_django_utils-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e4705117b21e4dcf4dc6981df4494e3", "sha256": "8c624f81329453ebf5785e502a08b0a63d26c90148c93a12d3a8f34e213cbef8" }, "downloads": -1, "filename": "zappa-django-utils-0.4.0.tar.gz", "has_sig": false, "md5_digest": "0e4705117b21e4dcf4dc6981df4494e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8436, "upload_time": "2018-06-07T12:18:42", "url": "https://files.pythonhosted.org/packages/c2/f7/f87b6b87a221022ba7df184721316c08381b58ca6f9a3ee694add5d1ec2b/zappa-django-utils-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fca977a17e28534106e66064020cf251", "sha256": "9d6d14b8cf4184c025f224d34657d56986de2f6bbde48573efd264daa92046a5" }, "downloads": -1, "filename": "zappa_django_utils-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "fca977a17e28534106e66064020cf251", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10479, "upload_time": "2018-06-07T12:18:41", "url": "https://files.pythonhosted.org/packages/49/db/2438d10cc85916bd12852008e415a228013f1d35abdc3d271e7805df268c/zappa_django_utils-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e4705117b21e4dcf4dc6981df4494e3", "sha256": "8c624f81329453ebf5785e502a08b0a63d26c90148c93a12d3a8f34e213cbef8" }, "downloads": -1, "filename": "zappa-django-utils-0.4.0.tar.gz", "has_sig": false, "md5_digest": "0e4705117b21e4dcf4dc6981df4494e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8436, "upload_time": "2018-06-07T12:18:42", "url": "https://files.pythonhosted.org/packages/c2/f7/f87b6b87a221022ba7df184721316c08381b58ca6f9a3ee694add5d1ec2b/zappa-django-utils-0.4.0.tar.gz" } ] }