Utility for uploading static site files to an S3 bucket
Project description
Chanterelle is a command line utility written in Python 3 that synchronizes the contents of an S3 bucket with a local static website. This tool has no dependency on Jekyll or Ruby, but assumes a default configuration that works with the default structure of a Jekyll site.
Chanterelle was designed to reduce the monetary cost of using the S3 API by only making changes that are necessary to a bucket. Files are not uploaded if already present in the bucket with the same content, and bulk list and delete operations are used.
Installation
To install with Chanterelle you will need Python 3 and setuptools. Run the following to install the latest release of Chanterelle directly from PyPI:
$ pip install chanterelle
Configuration
Chanterelle can be configured using a YAML file placed in the project root
called _upload.yml
. Jekyll’s _config.yml
is not read by
Chanterelle. The following is a table of keys for the configuration file:
Key |
Description |
---|---|
bucket |
Name of the S3 bucket to synchronize. This key is required. |
profile |
Name of the AWS profile to use. The default profile will be used if omitted. |
site_root |
Path to the root of the generated site. Default value is
|
mime_types |
Map of file extension (including dot) to mime-type that will be in addition to the system’s map to determine the Content-Type of a file. |
charset |
Content-Type charset assigned to files that are subtypes of
the |
strip_html |
If set to |
delete_old |
If set to |
AWS Credentials
In addition to _upload.yml
you will also need to configure AWS
credentials. These are ommited from _upload.yml
so it can be checked
into version control without sharing keys with contributors.
There are several ways to manually configure the credentials that Chanterelle uses, but the easiest way for those only using a single set of credentials is to use the configure command of the aws command line tool:
$ aws configure
Usage
Once you have created _upload.yml
and set AWS credentials, you can run
Chanterelle from the command line:
$ chanterelle
Licensing
Chanterelle is licensed under the GNU General Public License v3.0 (GNU GPLv3), see LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file chanterelle-1.0.2.tar.gz
.
File metadata
- Download URL: chanterelle-1.0.2.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b207d1691b408b85338c2b44872586eaaf5ce64c75a84d1311f9dc4628e75fc |
|
MD5 | cde3435f9e27b0a15cc5ad126360d67d |
|
BLAKE2b-256 | cdb3d156e196d4082ae89d7b07bfacaf61e056d7b45f42ab474c56c91a4c1709 |