{ "info": { "author": "George Brighton", "author_email": "oss@gebn.co.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "wood\n====\n\n.. image:: https://img.shields.io/pypi/status/wood.svg\n :target: https://pypi.python.org/pypi/wood\n.. image:: https://img.shields.io/pypi/v/wood.svg\n :target: https://pypi.python.org/pypi/wood\n.. image:: https://img.shields.io/pypi/pyversions/wood.svg\n :target: https://pypi.python.org/pypi/wood\n.. image:: https://travis-ci.org/gebn/wood.svg?branch=master\n :target: https://travis-ci.org/gebn/wood\n.. image:: https://coveralls.io/repos/github/gebn/wood/badge.svg?branch=master\n :target: https://coveralls.io/github/gebn/wood?branch=master\n\nWood is a toolbox for representing directory trees, calculating comparisons\nbetween them, and effecting those changes in S3, CloudFront and Cloudflare. It\nstarted as a set of deploy scripts for my personal website, but grew into\nsomething that I was too chuffed with to keep hidden away in the bowls of\nanother website repository. It's not as refined as, say, requests, but should\nbe useful to anyone looking to efficiently deploy a website to AWS, and/or\nusing Cloudflare as a CDN.\n\nNotably, unlike the AWS CLI tools or boto3, wood does not rely on file\ntimestamps, instead using MD5 checksums to make the minimum number of changes\npossible in S3. It also has an algorithm for aggregating invalidation paths to\nmake the CloudFront free tier go as far as possible. Syncers and invalidators\nare implemented in a generic way, allowing easy extension to additional\nservices as needed.\n\nFeatures\n--------\n\n- Tree representation\n- Tree comparison\n\n - Action that comparison in S3\n - Invalidate paths as necessary in CloudFront and Cloudflare\n\nDemo\n----\n\n.. code-block:: python\n\n import wood\n\n # low-level comparison of two local directories\n comparison = wood.compare('~/dir', '~/.snapshot/hourly.1/dir')\n comparison.new() # files added since the snapshot\n comparison.modified() # files modified since the snapshot\n comparison.deleted() # files deleted since the snapshot\n\n\n import pathlib\n import boto3\n\n local_base = pathlib.Path('/path/to/web/root')\n bucket = boto3.resource('s3').Bucket('example.com')\n\n # create representations of the local and remote trees\n to_deploy = wood.root(local_base)\n deployed = wood.s3.objects_to_root(bucket.objects.all())\n\n # compare the two as if they were local directories\n comparison = wood.compare(to_deploy, deployed)\n\n # write all changes (additions, modifications, deletions) to the S3 bucket\n syncer = wood.s3.Syncer(local_base, bucket)\n syncer.sync(comparison)\n\n # invalidate the minimum amount in CloudFront to ensure the changes are\n # visible, using prefix grouping where possible\n cloudfront = boto3.client('cloudfront')\n invalidator = wood.cloudfront.Invalidator(cloudfront, '{distribution}',\n '{reference}')\n invalidator.invalidate(comparison)\n\n # do the same for Cloudflare in the case of a second CDN\n invalidator = wood.cloudflare.Invalidator(sess, email, key, zone,\n 'https://example.com/')\n invalidator.invalidate(comparison)\n\nWhy \"wood\"?\n-----------\n\nBecause it started as a tree comparison tool, and grew out from there. It's\nalso a little rough around the edges.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gebn/wood", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "wood", "package_url": "https://pypi.org/project/wood/", "platform": "", "project_url": "https://pypi.org/project/wood/", "project_urls": { "Homepage": "https://github.com/gebn/wood" }, "release_url": "https://pypi.org/project/wood/1.0.3/", "requires_dist": [ "backoff", "boto3", "botocore", "more-itertools", "requests" ], "requires_python": "", "summary": "Compare directories, efficiently sync changes to AWS, and invalidate CDNs.", "version": "1.0.3" }, "last_serial": 3197742, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "d8a6a0b6c34573d66b92b940292aff26", "sha256": "3df4e12e1ddb3e3f15d99813769d8266e47b6c32270e5034237e9312066862e6" }, "downloads": -1, "filename": "wood-1.0.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "d8a6a0b6c34573d66b92b940292aff26", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18591, "upload_time": "2017-09-23T00:36:32", "url": "https://files.pythonhosted.org/packages/04/d9/c36e3379056db277df18852a2218e959afae3701f3caa9d56deeea8d50e3/wood-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "994532b6bf4803a5c6ed8e7fce86d3fd", "sha256": "ec3950fdb58f416c7e9102a79e5e5ea49a1d29dc69367588fdb506f8484b9b91" }, "downloads": -1, "filename": "wood-1.0.0.tar.gz", "has_sig": true, "md5_digest": "994532b6bf4803a5c6ed8e7fce86d3fd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14327, "upload_time": "2017-09-23T00:36:42", "url": "https://files.pythonhosted.org/packages/5d/e9/a8ec3402298977b7c9bd35253c7ab4344bc789b49ce07151bfb923273011/wood-1.0.0.tar.gz" } ], "1.0.0rc1": [ { "comment_text": "", "digests": { "md5": "e06f0d93f03986ad8e9cd65e2f2d9a84", "sha256": "ed7f6449b9b43c4bad9b2dbab14d5a8e7680411ee453f989b3d3ace00994dfda" }, "downloads": -1, "filename": "wood-1.0.0rc1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "e06f0d93f03986ad8e9cd65e2f2d9a84", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18647, "upload_time": "2017-09-22T22:47:12", "url": "https://files.pythonhosted.org/packages/37/9e/a097102e4de730f910bde4d95d6d044f70f9bb5fd1d31fdc98fe0fa599b9/wood-1.0.0rc1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8f480c8e99df475e34cf4bccb250ed54", "sha256": "29f599c212e94bcf0f99dffa68834412cc4f5b818dcfc51272b71c7ffe33e4b1" }, "downloads": -1, "filename": "wood-1.0.0rc1.tar.gz", "has_sig": true, "md5_digest": "8f480c8e99df475e34cf4bccb250ed54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14356, "upload_time": "2017-09-22T22:47:24", "url": "https://files.pythonhosted.org/packages/69/02/594c715ad636ff7b6bb695aa0f77bebb0bbfc18b8e6aef8143246127acfc/wood-1.0.0rc1.tar.gz" } ], "1.0.0rc2": [ { "comment_text": "", "digests": { "md5": "61bacd6d0f0204e07dc72ad75555ecb0", "sha256": "0e8d9abc62b746e5c73db4363796b9ca924513705070fe1e0d97a5d1a4a22bd7" }, "downloads": -1, "filename": "wood-1.0.0rc2-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "61bacd6d0f0204e07dc72ad75555ecb0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18632, "upload_time": "2017-09-22T23:08:43", "url": "https://files.pythonhosted.org/packages/c9/d6/47fc1af2472776cc99e7fc77c83de14cfb772ada3fa1c2c7d695a2c93b64/wood-1.0.0rc2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "84ff2fb78ff5c5c5e974bb5f7b9bbe5c", "sha256": "afc2106c21c646988b075d47fd6f66df0f66cef3b31c99790291727450d97fa2" }, "downloads": -1, "filename": "wood-1.0.0rc2.tar.gz", "has_sig": true, "md5_digest": "84ff2fb78ff5c5c5e974bb5f7b9bbe5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14333, "upload_time": "2017-09-22T23:08:57", "url": "https://files.pythonhosted.org/packages/36/90/567aad878074b1487e8123216fd88e872c498d811de0eee5b8d91f440269/wood-1.0.0rc2.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "8259d06e01a052f4346b709e7986f70e", "sha256": "d42379586a75e1e0293fb3c2743a046d37cd67f6b486ec301374405f7f97a189" }, "downloads": -1, "filename": "wood-1.0.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "8259d06e01a052f4346b709e7986f70e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18783, "upload_time": "2017-09-23T01:02:24", "url": "https://files.pythonhosted.org/packages/79/9b/cf9092c375b0fb0449a3f0e407772502ec1c28e6f1ee47c84bbfad0cdd9e/wood-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "46d8aecbd36b72c4aa4b136f7a98d1c9", "sha256": "58c04a9a69628ae4338c5453f04e3e4463638bc6ed9901d4de8780851d17e71e" }, "downloads": -1, "filename": "wood-1.0.1.tar.gz", "has_sig": true, "md5_digest": "46d8aecbd36b72c4aa4b136f7a98d1c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14482, "upload_time": "2017-09-23T01:02:40", "url": "https://files.pythonhosted.org/packages/d1/c4/71e85052886ac19a9fd25ee9afb763a475d9fc875cbe73d4c501210d1557/wood-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "3dd7912484c84bfcac45eccb262882cc", "sha256": "96c6dfed3a148b3f4108bb35317c4bb519a9dedc3bfd3145636e8855ced647f7" }, "downloads": -1, "filename": "wood-1.0.2-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "3dd7912484c84bfcac45eccb262882cc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18785, "upload_time": "2017-09-23T01:15:41", "url": "https://files.pythonhosted.org/packages/4c/cb/0a1090e357140d2d771090e84f4259cf2806c95970386bba9582aba215a0/wood-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1f4b6b3343907bf10297178fd2baa62", "sha256": "2692340f1ea36ceca4a95ccd1252b4b7699e618a3104b69880a14e4b477b4d76" }, "downloads": -1, "filename": "wood-1.0.2.tar.gz", "has_sig": true, "md5_digest": "e1f4b6b3343907bf10297178fd2baa62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14482, "upload_time": "2017-09-23T01:15:49", "url": "https://files.pythonhosted.org/packages/d5/c3/8da8590bd95ef9805c4cab05e7e91461506519c4d75a4ccd85fa0c14d3da/wood-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "58e27bafe4ceda45e29b27798340016f", "sha256": "f69a999e046a00cce4b9927246a05ff4123bbdecc73d00aca419106a0532dc3e" }, "downloads": -1, "filename": "wood-1.0.3-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "58e27bafe4ceda45e29b27798340016f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20462, "upload_time": "2017-09-23T22:01:42", "url": "https://files.pythonhosted.org/packages/f8/19/e4d301af1125e82c45eab9f38b41894cb92b70f2a9bc5d4fe4011015ba08/wood-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "72c94818bad649b0f4975e5bff9610ea", "sha256": "6c3d6c4e3f4a6f29c6f7fa48be0304112c2be0e7cb3e0adeb21777f3c248e725" }, "downloads": -1, "filename": "wood-1.0.3.tar.gz", "has_sig": true, "md5_digest": "72c94818bad649b0f4975e5bff9610ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15640, "upload_time": "2017-09-23T22:01:54", "url": "https://files.pythonhosted.org/packages/5e/65/0e34734cbe30825c533265c2110f47093c89f247d30023e9929d00f8fc29/wood-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "58e27bafe4ceda45e29b27798340016f", "sha256": "f69a999e046a00cce4b9927246a05ff4123bbdecc73d00aca419106a0532dc3e" }, "downloads": -1, "filename": "wood-1.0.3-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "58e27bafe4ceda45e29b27798340016f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20462, "upload_time": "2017-09-23T22:01:42", "url": "https://files.pythonhosted.org/packages/f8/19/e4d301af1125e82c45eab9f38b41894cb92b70f2a9bc5d4fe4011015ba08/wood-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "72c94818bad649b0f4975e5bff9610ea", "sha256": "6c3d6c4e3f4a6f29c6f7fa48be0304112c2be0e7cb3e0adeb21777f3c248e725" }, "downloads": -1, "filename": "wood-1.0.3.tar.gz", "has_sig": true, "md5_digest": "72c94818bad649b0f4975e5bff9610ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15640, "upload_time": "2017-09-23T22:01:54", "url": "https://files.pythonhosted.org/packages/5e/65/0e34734cbe30825c533265c2110f47093c89f247d30023e9929d00f8fc29/wood-1.0.3.tar.gz" } ] }