Skip to main content

Lightweight tool for investigating data files in an s3 repository

Project description

cfs3

Package of tools for manipulating data held in S3 which can make use of the CF compliant metadata in the files, and use, if it exists extra information conforming to a user defined "Data Reference Syntax" (DRS) which covers some structured requirements for data and file attributes and filenames.

For now, you need to git clone it, and install from the cloned repository using pip install --use-pep517 -e .

You will almost certainly need to configure your access details using a minio configuration file as described below.

s3view

Lightweight tool for navigating around an S3 repository, utilising minio tools (hence, to use it, you need to set up a minio configuration file (config.json) in your ~./mc directory. See below.)

To run it, simply run the script s3view, and there is help within that.

Currently commands supported are:

  • loc (for changing minio locations)
  • cb (for changing buckets)
  • cd, ls, rm (all do what you would expect)
  • mv (only lets you rename stuff within a bucket. Note that this is expensive as it really involves a copy. Try not to need to do it!)

Note that unlike other packages, we treat each bucket as it's own independent file system. We could tream them like top level directories, but we don't. For now.

Yes we know there are easier ways to do most of this (the minio command line tools for example), but this package does different things by default, and we want to be able to use elements of it in other code. We may well extend it to be a bit more "climate data aware" as well. Early days.

Testing and Reliability

The unittest framework is not yet ready, so it's very much caveat emptor for now.

JASMIN Access

For those of you using this on JASMIN, the procedure to get going on the object store is

  1. You need to have applied for, and got access to one or more tenancies (in the example below, I'll show you how I got set up for the hiresgw tenany, you will need to do this for each and every S3 tenancy you have access to).

  2. Create your secret key here: https://s3-portal.jasmin.ac.uk/object-store/hiresgw-o/create-keys. Note that you need a different secret key for each object store tenancy.

Look out for the use of quotes in your secret key, you will have to escape them in your configuration files. E.g. if your secret key looks like gubbins_"_moregubbins you will need to enter it in your config files as gubbins_\"_moregubbins

  1. Do your minio configuration as below.

Minio Configuration

If you are working inside JASMIN and from outside JASMIN, you can set up your minio configuration files in each place so that your code is complete agnostic about where you are, it just "gets it right".

In this case, you will want to copy two versions of your config and secret key into your .mc/config.json, one for JASMIN itself, and one for your (remote) sites (e.g. RACC, laptop etc).

Mine look like:

  • at JASMIN:
"hrs3":{
            "url": "http://hiresgw-o.jc.rl.ac.uk",
			"accessKey": "Stuff",
			"secretKey": "Longer \" Stuff",
			"api": "S3v4",
      	    "path": "auto"    
		},

and elsewhere:

"hrs3":{
            "url": "https://hiresgw-o.s3-ext.jc.rl.ac.uk",
			"accessKey": "Stuff",
			"secretKey": "Longer \" Stuff",
			"api": "S3v4",
      	    "path": "auto"    
		},

Note the workspace is hiresgw-o in both cases, but it is https in one and http in the other, and the s3-ext in the elsewhere one. Note also that this is just one part of the minio configuration file, you will have multiple entries in your file, which will then look something like this:

{
        "version": "10",
        "aliases": {
            "hrs3": { ...},
            "another": { ...}
        }
}

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

cfs3-0.2.2.tar.gz (59.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cfs3-0.2.2-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

File details

Details for the file cfs3-0.2.2.tar.gz.

File metadata

  • Download URL: cfs3-0.2.2.tar.gz
  • Upload date:
  • Size: 59.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cfs3-0.2.2.tar.gz
Algorithm Hash digest
SHA256 91e86d26c164f8f5e7997fd11fc026522a688384c21d611cf678a055a79b4274
MD5 15d894261fc1db51b9a73d114266c705
BLAKE2b-256 91a91c03d518154945e70408b64427f362afd81bf178d9b7e4270ff27a2d576a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cfs3-0.2.2.tar.gz:

Publisher: build-and-deploy-on-pypi.yml on NCAS-CMS/cfs3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cfs3-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: cfs3-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 37.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cfs3-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 acfc69621b96f4ff558ac8b83ac132366a6ba2051b3ea33d00c98586bccbe13b
MD5 273b66fa260d49de1862913ec1bb0860
BLAKE2b-256 2405a97cce1a0b9f01e4e3d6e9a08300416c0eb2da2961c9c8e32ee184aa6ce7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cfs3-0.2.2-py3-none-any.whl:

Publisher: build-and-deploy-on-pypi.yml on NCAS-CMS/cfs3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page