Coder Social home page Coder Social logo

alphagov / ckanext-s3-resources Goto Github PK

View Code? Open in Web Editor NEW

This project forked from datagovsg/ckanext-s3-resources

0.0 18.0 2.0 64 KB

CKAN Extension to upload resources to AWS S3 https://data.gov.sg

License: MIT License

Python 100.00%
govuk datagovuk

ckanext-s3-resources's Introduction

CKAN Extension to upload resources to AWS S3

This extension can be used to upload your CKAN resources to AWS S3 instead of the CKAN server. You can blacklist certain resource types (e.g. APIs) from being uploaded to S3. A paster command is provided to migrate resources to S3.

Requirements

  • boto3 - for connecting to S3

Setup/Configuration

For the extension to work, you need to ensure that the following configuration options have been set in your configuration file *.ini:

  • ckan.datagovsg_s3_resources.s3_aws_access_key_id - AWS access key ID. Obtained from AWS.
  • ckan.datagovsg_s3_resources.s3_aws_secret_access_key - AWS secret access key ID. Obtained from AWS.
  • ckan.datagovsg_s3_resources.s3_bucket_name - The name of the bucket on S3 to upload the resources to.
  • ckan.datagovsg_s3_resources.s3_url_prefix - Base URL (https://s3.data.gov.sg)
    • Resource URLs will be in the form of <base_url><package_name>/<resource_filename>
      • e.g. https://s3.data.gov.sg/package-123/resource-123.csv
    • Package zip URLs will be in the form of <base_url><package_name>/<package_name>.zip
      • e.g. https://s3.data.gov.sg/package-123/package-123.csv
    • e.g. ckan.datagovsg_s3_resources.s3_url_prefix = https://bucket-name.s3.amazonaws.com/
  • ckan.datagovsg_s3_resources.upload_filetype_blacklist (optional) - A space separated list of file formats to ignore.
    • e.g. ckan.datagovsg_s3_resources.upload_filetype_blacklist = csv pdf xls
  • ckan.datagovsg_s3_resources.s3_aws_region_name (optional) - Specify which AWS region to use.
    • e.g. ap-southeast-1

Migration

The extension includes a paster command to help migrate the existing resources to S3. The command can be run by doing:

paster --plugin=plugin_name migrate_s3

ckanext-s3-resources's People

Contributors

joelchoo avatar brucebolt avatar deborahchua avatar pallani avatar kentsanggds avatar

Watchers

Steve Laing avatar Anika Henke avatar Tom avatar James Cloos avatar Mark Hurrell avatar William Palmer avatar Jani Kraner avatar Rebecca Law avatar Sakis avatar Dilwoar Hussain avatar Karl Baker avatar  avatar Leena Gupte avatar  avatar Sebastian Schmieschek avatar Stephen Harker avatar Richard Morton avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.